/* ============================================================
   August Fog Studios — one-pager
   Palette: Fog #F1F0EA · Ink #202326 · Pacific #748894
            Cypress #405B50 · Afterglow #D98A5F
   ============================================================ */

:root {
  --fog: #f1f0ea;
  /* the torn scan's own paper colour — kept for reference; the tear is masked
     and takes Fog now, so nothing on the page is painted with it */
  --paper: #faf2ea;
  --tear: clamp(2rem, 4.4vw, 3.75rem);
  --ink: #202326;
  --pacific: #748894;
  --cypress: #405b50;
  --afterglow: #d98a5f;

  /* Afterglow sits at 2.4:1 on Fog, so text uses shifted values of the same hue:
     -text for small labels (4.8:1), -script for large display type (3.3:1),
     -light for labels on the dark bands (4.5:1). The pure hue stays on
     icons, rules and borders, where it carries no reading load. */
  --afterglow-text: #a0552f;
  --afterglow-script: #c0703f;
  --afterglow-light: #f0c6a8;

  --ink-70: rgba(32, 35, 38, 0.72);
  --ink-muted: rgba(32, 35, 38, 0.68);
  --rule: rgba(32, 35, 38, 0.12);

  --sans:
    "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    sans-serif;
  --serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --geo: "Jost", var(--sans);
  --script: "Caveat", ui-rounded, cursive;

  --shell: 1140px;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --nav-size: 0.72rem;
  --nav-tracking: 0.14em;
}

/* ---------- base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  height: auto;
}
p {
  margin: 0 0 1.1em;
}
p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* keep anchor targets clear of the sticky header */
[id] {
  scroll-margin-top: 6.5rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--fog);
  padding: 0.75rem 1.25rem;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--afterglow-text);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- type primitives ---------- */

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 1.4rem;
}
.display--sm {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem);
}
.display--hero {
  font-size: clamp(2.6rem, 1.4rem + 5vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
  margin-bottom: 1.6rem;
}
.display em {
  font-style: italic;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--afterglow-text);
  margin: 0 0 0.6rem;
}
.eyebrow--rule {
  color: var(--ink-muted);
  padding-bottom: 0.7rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--afterglow);
  display: inline-block;
}

.script {
  font-family: var(--script);
  font-weight: 500;
  color: var(--afterglow-script);
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.lede {
  color: var(--ink-70);
}

/* ---------- header ---------- */

/* Fixed, not sticky, so the hero photograph runs to the very top edge and the
   bar rides over it. Transparent at rest; fades to solid Fog on first scroll. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--fog) 0%, transparent);
  backdrop-filter: blur(0px);
  transition:
    background 0.4s var(--ease),
    backdrop-filter 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}
.site-header.is-stuck {
  background: var(--fog);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5rem;
}

.lockup {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}
.lockup__type {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.lockup__wordmark {
  display: block;
  height: 1.05rem;
  width: auto;
}
.lockup__sub {
  font-family: var(--geo);
  font-size: 0.62rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* shared uppercase nav treatment — header + footer */
.site-nav,
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.25rem);
}
.site-nav a,
.footer__nav a {
  font-size: var(--nav-size);
  font-weight: 500;
  letter-spacing: var(--nav-tracking);
  text-transform: uppercase;
  text-decoration: none;
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.site-nav a {
  padding-bottom: 0.25rem;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover {
  border-color: var(--afterglow);
  color: var(--afterglow-text);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(100svh, 52rem);
  /* the header is fixed, so the hero clears it with padding instead of flow */
  padding: calc(5rem + clamp(2rem, 5vw, 4rem)) 0 clamp(6rem, 10vw, 9rem);
  overflow: hidden;
}
.hero__art {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--fog);
}
.hero__art picture {
  display: block;
  height: 100%;
}
.hero__art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 64% 62%;
}
/* The photograph already dissolves to white on the left; the scrim only has to
   carry it far enough for the headline to sit on flat ground. */
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    color-mix(in srgb, var(--fog) 97%, transparent) 0%,
    color-mix(in srgb, var(--fog) 90%, transparent) 26%,
    color-mix(in srgb, var(--fog) 66%, transparent) 46%,
    color-mix(in srgb, var(--fog) 22%, transparent) 66%,
    transparent 82%
  );
}

.hero__inner {
  position: relative;
}
.hero__copy {
  max-width: 40rem;
}
.hero__eyebrow {
  color: var(--ink-muted);
  letter-spacing: 0.19em;
  margin-bottom: 1.5rem;
}
.hero__lede {
  max-width: 34rem;
  margin: 0;
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.25rem);
  line-height: 1.6;
}

/* ---------- scroll cue ---------- */

.scroll-cue {
  position: absolute;
  left: 50%;
  /* clear of the torn sheet edge that overlaps the foot of the hero */
  bottom: calc(var(--tear) + clamp(1rem, 2.5vw, 2rem));
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  text-decoration: none;
  color: var(--fog);
  /* soft ink halo so Fog stays legible on the bright fog of the photo */
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--ink) 35%, transparent));
  transition: color 0.28s var(--ease);
}
.scroll-cue__arrow {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  animation: cue-drift 2.6s var(--ease) infinite;
}
.scroll-cue__arrow svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}
.scroll-cue:hover {
  color: var(--afterglow-text);
}

@keyframes cue-drift {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.55;
  }
  50% {
    transform: translateY(6px);
    opacity: 1;
  }
}

/* ---------- torn sheet edge ---------- */

/* One tear only, where the page proper is torn away from the hero photograph.
   The scan is a mask so the sheet takes Fog. Lives on .philosophy today;
   move the .sheet-tear class onto .products when that section ships. */
.sheet-tear {
  position: relative;
  background: var(--fog);
}
.sheet-tear::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  margin-bottom: -1px;
  height: var(--tear);
  background: var(--fog);
  -webkit-mask-image: url("assets/torn-top.webp");
  mask-image: url("assets/torn-top.webp");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  pointer-events: none;
}

/* ---------- link + button ---------- */

.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.link-cta__arrow {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--rule);
  border-radius: 50%;
  transition:
    transform 0.28s var(--ease),
    border-color 0.28s var(--ease),
    background 0.28s var(--ease);
}
.link-cta__arrow svg {
  width: 0.95rem;
  height: 0.95rem;
  display: block;
}
.link-cta:hover .link-cta__arrow {
  transform: translateX(4px);
  border-color: var(--afterglow);
  background: color-mix(in srgb, var(--afterglow) 14%, transparent);
}

/* ---------- marks (tenet / value columns) ---------- */

.marks__grid {
  --marks-gap: clamp(2.5rem, 5vw, 5rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--marks-gap);
}
.mark {
  position: relative;
}
.mark + .mark::before {
  content: "";
  position: absolute;
  left: calc(var(--marks-gap) / -2);
  top: 0.35rem;
  bottom: 0.35rem;
  width: 1px;
  background: var(--rule);
}
.mark__icon {
  width: 3.1rem;
  height: 3.1rem;
  margin-bottom: 1.5rem;
  fill: none;
  stroke: var(--afterglow);
  stroke-width: 1.25;
  stroke-linecap: round;
}
.mark .lede {
  max-width: 20rem;
}

/* ---------- products ---------- */

.products {
  padding: var(--section-y) 0;
}
/* Hairline only when Products is not the first sheet after the hero tear. */
.products:not(.sheet-tear) {
  border-top: 1px solid var(--rule);
}
.products__list {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}
.product {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: start;
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--rule);
}
.product:first-child {
  padding-top: 0;
  border-top: 0;
}
.product__icon {
  width: clamp(4rem, 9vw, 5.5rem);
  height: clamp(4rem, 9vw, 5.5rem);
  border-radius: 22.5%;
  flex: none;
}
.product__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
}
.product__desc {
  max-width: 34rem;
  margin-bottom: 1.35rem;
}
.product__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}
.link-cta--sm {
  font-size: 0.7rem;
  gap: 0.65rem;
}
.link-cta--sm .link-cta__arrow {
  width: 1.8rem;
  height: 1.8rem;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    border-color 0.25s var(--ease),
    background 0.25s var(--ease);
}
.store-button:hover {
  border-color: var(--afterglow);
  background: color-mix(in srgb, var(--afterglow) 12%, transparent);
}
.store-button__glyph {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
  flex: none;
}

/* ---------- philosophy ---------- */

/* One full-width column: headline, blurb, then the three tenets.
   Sits directly under the hero tear — no top border. */
.philosophy {
  padding: var(--section-y) 0;
}
.philosophy__headline {
  max-width: 20ch;
}
.philosophy__blurb {
  max-width: 46rem;
}
.philosophy__tenets {
  margin-top: clamp(4.5rem, 7.5vw, 6rem);
}

/* ---------- field notes ---------- */

.notes {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--rule);
}
/* Shares the philosophy section's full-width column so the two read as one
   measure; only the body copy is constrained, matching .philosophy__blurb. */
.notes__body {
  max-width: 46rem;
  margin-bottom: 2rem;
}
.notes .display--sm {
  max-width: 20ch;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--fog);
  padding-top: clamp(3rem, 6vw, 4.5rem);
  overflow: hidden;
}

/* One left column — monogram, blurb, copyright — with the nav held to the right. */
.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: clamp(2rem, 6vw, 6rem);
  row-gap: 2.5rem;
  align-items: start;
}
.footer__brand {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.6rem;
}
.footer__monogram {
  width: clamp(4.5rem, 7vw, 6rem);
  height: auto;
  display: block;
}
.footer__blurb {
  margin: 0;
  /* ≈#b2b1ad on Ink — muted, but clear of the faint end of the range */
  color: color-mix(in srgb, var(--fog) 70%, transparent);
  max-width: 38rem;
  font-size: 1rem;
  line-height: 1.75;
}

.footer__nav {
  grid-column: 2;
  grid-row: 1;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  /* sit the nav on the monogram's optical top line */
  padding-top: 0.35rem;
}
.footer__nav a {
  font-size: 0.7rem;
  color: color-mix(in srgb, var(--fog) 84%, transparent);
}
.footer__nav a:hover {
  color: var(--afterglow-light);
}

.footer__legal {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.7;
  /* ≈#aaa9a5 on Ink */
  color: color-mix(in srgb, var(--fog) 66%, transparent);
}

.footer__rule {
  grid-column: 1 / -1;
  grid-row: 2;
  height: 1px;
  margin-top: 0;
  background: color-mix(in srgb, var(--fog) 16%, transparent);
}

.footer__lower {
  padding-bottom: clamp(2.5rem, 4.5vw, 3.5rem);
}
/* ~40–64px of air above the wordmark, on top of the rule's own row gap */
.footer__mark {
  margin-top: clamp(7rem, 8.5vw, 9rem);
}
.footer__mark img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.22;
}

/* ---------- motion: emergence ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(6px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease),
    filter 0.6s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-block: 0.9rem;
    min-height: 0;
  }
  .site-nav {
    gap: 1.1rem;
  }
  .site-nav a {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
  }
  .marks__grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .mark + .mark {
    padding-top: 2.25rem;
  }
  .mark + .mark::before {
    top: 0;
    bottom: auto;
    left: 0;
    right: 0;
    width: auto;
    height: 1px;
  }
  .product {
    grid-template-columns: 1fr;
  }
  .footer__inner {
    grid-template-columns: 1fr;
  }
  .footer__brand,
  .footer__nav,
  .footer__rule {
    grid-column: 1;
    grid-row: auto;
  }
  .footer__nav {
    align-items: flex-start;
    padding-top: 0;
  }
  .hero {
    min-height: min(100svh, 44rem);
    padding-bottom: clamp(9rem, 34vw, 14rem);
  }
  .hero__art img {
    object-position: 76% 68%;
  }
  .hero__scrim {
    background: linear-gradient(
      180deg,
      color-mix(in srgb, var(--fog) 94%, transparent) 0%,
      color-mix(in srgb, var(--fog) 80%, transparent) 40%,
      color-mix(in srgb, var(--fog) 30%, transparent) 78%,
      transparent 100%
    );
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
