@import url("https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&family=Rock+Salt&display=swap");

:root {
  --paper: #f2efe7;
  --ink: #10100f;
  --last-light: #d95d31;
  --line: rgba(255,255,255,.32);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  color: white;
  background: var(--ink);
  font-family: "Figtree", Arial, sans-serif;
}

a { color: inherit; }

.holding-page {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  min-height: 100svh;
  overflow: hidden;
  padding: 0 clamp(28px, 6.5vw, 124px) 18px;
}

.hero-image,
.hero-shade,
.grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  z-index: -4;
  display: block;
  object-fit: cover;
  object-position: center center;
  animation: settle 1.4s ease-out both;
}

.hero-shade {
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(12,14,13,.72) 0%, rgba(12,14,13,.52) 30%, rgba(12,14,13,.08) 63%, rgba(12,14,13,.14) 100%),
    linear-gradient(0deg, rgba(8,10,9,.58) 0%, transparent 38%, rgba(8,10,9,.08) 74%, rgba(8,10,9,.25) 100%);
}

.grain {
  z-index: -2;
  opacity: .16;
  pointer-events: none;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 150px;
  border-bottom: 1px solid var(--line);
}

.brand { display: block; width: 108px; height: 108px; }
.brand img { display: block; width: 100%; height: 100%; object-fit: contain; }

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--last-light);
  box-shadow: 0 0 0 0 rgba(217,93,49,.5);
  animation: pulse 2.8s ease-out infinite;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  width: min(650px, 48vw);
  padding: clamp(44px, 7vh, 76px) 0 clamp(58px, 9vh, 94px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 25px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.eyebrow span { width: 34px; height: 1px; background: var(--last-light); }

h1 {
  margin: 0;
  font-size: clamp(72px, 7.1vw, 128px);
  font-weight: 500;
  line-height: .83;
  letter-spacing: -.055em;
}

.intro {
  max-width: 570px;
  margin: 34px 0 0;
  font-size: clamp(15px, 1.12vw, 18px);
  line-height: 1.52;
}

.actions {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-top: 35px;
}

.chapter-rail {
  position: relative;
  z-index: 2;
  padding-bottom: 12px;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.chapter-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 7px;
  min-height: 72px;
  padding: 14px clamp(12px, 1.4vw, 24px);
  border-right: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.72);
  text-decoration: none;
  transform-origin: center bottom;
}

.chapter-card:last-child { border-right: 0; }
.chapter-card:hover { animation: chapter-bounce .46s cubic-bezier(.2,.75,.35,1) both; }

.chapter-label {
  color: #f0a17e;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.chapter-title {
  align-self: end;
  font-size: clamp(10px, .8vw, 13px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: .01em;
}

.chapter-arrow {
  position: absolute;
  right: clamp(12px, 1.4vw, 24px);
  bottom: 14px;
  color: white;
  transition: transform .25s ease;
}

.chapter-card.is-live { color: white; transition: background .25s ease; }
.chapter-card.is-live:hover, .chapter-card.is-live:focus-visible { background: rgba(217,93,49,.12); }
.chapter-card.is-live:hover .chapter-arrow, .chapter-card.is-live:focus-visible .chapter-arrow { transform: translateX(4px); }
.chapter-card.is-live:focus-visible { outline: 2px solid white; outline-offset: -3px; }
.chapter-card.is-forming::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--last-light);
  opacity: .72;
}

.chapter-note {
  margin: 8px 0 0;
  color: rgba(255,255,255,.66);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .14em;
  text-align: right;
  text-transform: uppercase;
}

.primary-link,
.text-link {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
  text-decoration: none;
  text-transform: uppercase;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-width: 210px;
  padding: 16px 20px;
  color: var(--ink);
  background: var(--paper);
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.primary-link:hover,
.primary-link:focus-visible {
  color: white;
  background: var(--last-light);
  transform: translateY(-2px);
}

.text-link { padding: 10px 0 7px; border-bottom: 1px solid rgba(255,255,255,.68); }
.text-link:hover, .text-link:focus-visible { color: #f0a17e; border-color: #f0a17e; }
.primary-link:focus-visible, .text-link:focus-visible { outline: 2px solid white; outline-offset: 4px; }

footer {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding-top: 16px;
  border-top: 0;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.footer-credit { justify-self: start; }

.footer-credit a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
}

.footer-credit a:hover,
.footer-credit a:focus-visible { color: #f0a17e; }

.footer-credit a:focus-visible {
  outline: 2px solid white;
  outline-offset: 4px;
}

.ybe-logo-wrap {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 2px;
  overflow: visible;
  border-radius: 0;
  background: #fff;
}

.ybe-logo-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-centre {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

.step-counter { color: rgba(255,255,255,.76); }
.step-counter strong { color: #f0a17e; font-weight: 700; }
.footer-origin { justify-self: end; text-align: right; }

.analytics-pixel { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(217,93,49,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,93,49,0); }
}

@keyframes settle {
  from { opacity: .65; transform: scale(1.025); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes chapter-bounce {
  0% { transform: translateY(0); }
  52% { transform: translateY(-4px); }
  76% { transform: translateY(1px); }
  100% { transform: translateY(0); }
}

@media (max-width: 760px) {
  .holding-page {
    min-height: 100dvh;
    padding: 0 20px 14px;
  }

  .hero-image { object-position: 64% center; }
  .hero-shade {
    background:
      linear-gradient(90deg, rgba(10,12,11,.75) 0%, rgba(10,12,11,.48) 70%, rgba(10,12,11,.24) 100%),
      linear-gradient(0deg, rgba(8,10,9,.66) 0%, transparent 48%, rgba(8,10,9,.22) 100%);
  }

  .site-header { min-height: 104px; }
  .brand { width: 76px; height: 76px; }
  .status { max-width: 130px; font-size: 7px; line-height: 1.45; text-align: right; }

  .hero-copy {
    align-self: end;
    width: 100%;
    padding: 52px 0 46px;
  }

  .eyebrow { margin-bottom: 18px; font-size: 8px; }
  h1 { max-width: 420px; font-size: clamp(53px, 15.5vw, 82px); line-height: .88; }
  .intro { max-width: 390px; margin-top: 24px; font-size: 14px; line-height: 1.45; }
  .actions { align-items: flex-start; flex-direction: column; gap: 16px; margin-top: 22px; }
  .primary-link { min-width: 194px; padding: 14px 17px; }
  .text-link { font-size: 9px; }

  .chapter-rail { padding-bottom: 10px; }
  .chapter-grid {
    grid-template-columns: repeat(5, minmax(205px, 1fr));
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(217,93,49,.65) transparent;
  }
  .chapter-card { min-height: 58px; padding: 10px 12px; scroll-snap-align: start; }
  .chapter-title { padding-right: 28px; font-size: 11px; }
  .chapter-arrow { right: 12px; bottom: 10px; }
  .chapter-card.is-forming::after { top: 13px; right: 12px; }
  .chapter-note { max-width: 310px; margin-top: 9px; line-height: 1.45; text-align: left; }

  footer {
    grid-template-columns: 1fr auto;
    gap: 7px 14px;
    padding-top: 11px;
    font-size: 7px;
    line-height: 1.35;
  }

  .footer-credit { grid-column: 1 / -1; }
  .footer-centre { justify-self: start; align-items: flex-start; text-align: left; }
  .footer-origin { justify-self: end; }
  .ybe-logo-wrap { width: 28px; height: 28px; }
}

@media (max-height: 700px) and (min-width: 761px) {
  .site-header { min-height: 112px; }
  .brand { width: 82px; height: 82px; }
  .hero-copy { padding: 34px 0 42px; }
  h1 { font-size: clamp(65px, 6.5vw, 100px); }
  .intro { margin-top: 22px; }
  .actions { margin-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@font-face {
  font-family: "Rock Salt";
  src: url("RockSalt-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* A Letter to Anglesey â€” two-page founder story */
.letter-page {
  min-height: 100vh;
  background: #d9d0bf;
  color: #171713;
}

.letter-back {
  position: absolute;
  z-index: 5;
  top: 24px;
  left: clamp(20px, 5vw, 72px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f2efe7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.letter-back span {
  color: #d95d31;
  font-size: 18px;
  transition: transform .2s ease;
}

.letter-back:hover span {
  transform: translateX(-4px);
}

.letter-hero {
  position: relative;
  min-height: clamp(500px, 62vw, 720px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  color: #f2efe7;
  background:
    linear-gradient(90deg, rgba(16,16,15,.82) 0%, rgba(16,16,15,.52) 54%, rgba(16,16,15,.22) 100%),
    url("anglesey-letter-hero.png") center 58% / cover no-repeat;
}

.letter-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .18;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.letter-hero-copy {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 90px 0 70px;
}

.letter-kicker,
.letter-byline {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.letter-kicker {
  margin: 0 0 28px;
  color: #e5a25e;
}

.letter-hero h1 {
  max-width: 1200px;
  margin: 0;
  font-size: clamp(43px, 6.1vw, 94px);
  font-weight: 400;
  line-height: .94;
  letter-spacing: -.045em;
  text-transform: uppercase;
}

.letter-hero h1 span {
  display: block;
  font-size: inherit;
}

.letter-hero h1 span + span {
  margin-top: .18em;
}

.letter-deck {
  width: max-content;
  max-width: none !important;
  white-space: nowrap !important;
  margin: 34px 0 0;
  font-size: clamp(18px, 2vw, 27px);
  line-height: 1.35;
}

.letter-byline {
  margin: 34px 0 0;
  color: rgba(242,239,231,.76);
}

.letter-shell {
  width: min(900px, calc(100% - 28px));
  margin: clamp(54px, 8vw, 110px) auto;
}

.letter-sheet {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 1115px;
  margin: 0 auto;
  padding: 105px 105px 95px 150px;
  font-family: "Rock Salt", cursive;
  font-size: 14px;
  line-height: 2.02;
}

.letter-sheet + .letter-sheet {
  margin-top: 34px;
}

.letter-sheet::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url("notepaper.png") center / 100% 100% no-repeat;
  filter: drop-shadow(0 18px 20px rgba(31,27,19,.24));
  pointer-events: none;
}

.letter-sheet p {
  margin: 0 0 1.12em;
}

.letter-salutation,
.letter-thanks {
  color: #c8512f;
  font-size: clamp(24px, 3.2vw, 39px);
  line-height: 1.25;
}

.letter-salutation {
  margin-bottom: 1.2em !important;
  word-spacing: 0.5em !important;
}

.letter-place {
  position: relative;
  width: max-content;
  max-width: 90%;
  margin: 1.4em 0 1.8em;
  padding: 12px 26px 13px 18px;
  border: 0;
  border-left: 3px solid #d95d31;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(247,242,231,.82) 0 22px,
      rgba(83,104,126,.13) 22px 23px
    );
  box-shadow: 3px 5px 0 rgba(16,16,15,.08);
  transform: rotate(-1deg);
}

.letter-place::after {
  content: "13";
  position: absolute;
  top: 8px;
  right: 10px;
  color: rgba(16,16,15,.4);
  font-family: "Figtree", sans-serif;
  font-size: 8px;
  font-weight: 700;
}

.letter-place p {
  margin: 0;
}

.letter-place p:first-child {
  color: #374433;
  font-size: 1.15em;
}

.letter-place p:last-child {
  margin-top: .15em;
  color: rgba(16,16,15,.68);
  font-family: "Figtree", sans-serif;
  font-size: .7em;
  font-weight: 600;
  letter-spacing: .12em;
}

.im-home {
  margin: .35em 0 0 !important;
  color: #c8512f;
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1;
  text-align: center;
  transform: rotate(-1.3deg);
}

.letter-sheet-two {
  padding-top: 112px;
}

.letter-logo-break {
  display: flex;
  justify-content: center;
  margin: .6em 0 .9em;
}

.letter-logo-break img {
  display: block;
  width: min(310px, 65%);
  height: auto;
  transform: rotate(-1.2deg);
}

.letter-thanks {
  margin-top: .35em !important;
}

.letter-signoff {
  margin-top: .5em;
}

.letter-signoff img {
  display: block;
  width: min(315px, 60%);
  height: auto;
  object-fit: contain;
}

.letter-signoff p {
  margin: .2em 0 0;
  font-family: "Rock Salt", cursive;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hand-word {
  display: inline-block;
}

.hand-word:nth-child(6n + 1) { transform: translateY(-.045em) rotate(-.18deg); }
.hand-word:nth-child(6n + 2) { transform: translateY(.035em) rotate(.12deg); }
.hand-word:nth-child(6n + 3) { transform: translateY(-.015em) rotate(.08deg); }
.hand-word:nth-child(6n + 4) { transform: translateY(.055em) rotate(-.1deg); }
.hand-word:nth-child(6n + 5) { transform: translateY(-.025em) rotate(.16deg); }

@media (max-width: 780px) {
  .letter-hero {
    min-height: 500px;
  }

  .letter-hero h1 {
    font-size: clamp(38px, 11vw, 72px);
    line-height: .98;
  }

  .letter-sheet {
    min-height: 0;
    padding: 12% 10% 13% 17%;
    font-size: clamp(10px, 2.25vw, 14px);
    line-height: 1.9;
  }

  .letter-sheet::before {
    background-size: 100% 100%;
  }

  .letter-sheet + .letter-sheet {
    margin-top: 22px;
  }
}

@media (max-width: 540px) {
  .letter-back {
    top: 18px;
    left: 18px;
  }

  .letter-hero-copy {
    width: calc(100% - 36px);
    padding-top: 88px;
  }

  .letter-hero h1 {
    font-size: clamp(35px, 10.5vw, 58px);
    letter-spacing: -.035em;
  }

  .letter-deck {
    font-size: 17px;
    width: auto;
    max-width: 100% !important;
    white-space: normal !important;
  }

  .letter-byline {
    line-height: 1.7;
  }

  .letter-shell {
    width: calc(100% - 10px);
    margin: 35px auto;
  }

  .letter-sheet {
    padding: 13% 9% 14% 18%;
    font-size: clamp(8px, 2.35vw, 11px);
    line-height: 1.85;
  }

  .letter-salutation,
  .letter-thanks {
    font-size: clamp(19px, 6.4vw, 30px);
  }

  .im-home {
    font-size: clamp(34px, 11vw, 54px);
  }

  .letter-place {
    margin: .8em 0 1em;
    padding: 8px 11px;
  }
}
/* Paper positioning controls */

.letter-sheet-one {
  --paper-angle: 2deg;
  --paper-x: -8px;
  --paper-y: 0px;
}

.letter-sheet-two {
  --paper-angle: -2deg;
  --paper-x: 8px;
  --paper-y: 0px;
}

.letter-sheet.letter-sheet-one,
.letter-sheet.letter-sheet-two {
  transform:
    translate(var(--paper-x), var(--paper-y))
    rotate(var(--paper-angle)) !important;

  transform-origin: center center;
}


/* Reduce the angles on mobile */

@media (max-width: 620px) {
  .letter-sheet-one {
    --paper-angle: -0.5deg;
    --paper-x: 0px;
  }

  .letter-sheet-two {
    --paper-angle: 0.5deg;
    --paper-x: 0px;
  }
}

@media (max-width: 620px) {
  .manifesto {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .manifesto-copy,
  .manifesto-landscape {
    grid-column: 1;
    grid-row: auto;
  }
}


/* Printing */

@media print {
  .letter-back,
  .letter-hero,
  .letter-page footer {
    display: none;
  }

  .letter-page {
    background: #ffffff;
  }

  .letter-shell {
    width: 100%;
    margin: 0;
  }

  .letter-sheet {
    min-height: 100vh;
    break-after: page;
    transform: none !important;
  }

  .letter-sheet:last-child {
    break-after: auto;
  }
}

/* Letter-page footer: isolate it from the holding-page footer artwork. */
.letter-page > footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  padding: 34px clamp(22px, 5vw, 74px);
  border-top: 1px solid rgba(16,16,15,.18);
  background: #d9d0bf;
  color: #171713;
}

.letter-page > footer::before { content: none; }

.letter-page .footer-mark {
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  transform: none;
}

.letter-page .footer-mark img {
  display: block;
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.letter-page > footer > p {
  justify-self: auto;
  margin: 0;
  color: #171713;
  text-align: left;
}

.letter-page .footer-links {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  width: auto;
  gap: 20px;
  padding: 0;
  border: 0;
}

.letter-page .footer-links a:first-child { margin-right: 0; }

.letter-page > footer small {
  flex-basis: 100%;
  margin-top: 2px;
  color: rgba(16,16,15,.58);
}

@media (max-width: 760px) {
  .letter-page > footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .letter-page .footer-links {
    flex-wrap: wrap;
    gap: 12px 18px;
  }
}
