/* ==========================================================================
   GRUND Productions — landing page
   Black hero with the GRUND logo animation,
   light information block below. Two typefaces, three colours.
   ========================================================================== */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  src: url("../assets/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  src: url("../assets/fonts/newsreader-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --black: #000;
  --white: #fff;
  --paper: #f4f4f4;          /* information block */
  --ink: #0b0b0b;
  --muted: #6b6b6b;          /* 4.8:1 on --paper */
  --rule: rgba(0, 0, 0, .14);

  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", "Times New Roman", Times, Georgia, serif;

  --edge: clamp(20px, 2.9vw, 48px);         /* page side padding */
  --label: 11px;
  --serif-size: clamp(22px, 1.1rem + .6vw, 27px);

  --ease: cubic-bezier(.22, .61, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
:focus-visible { outline: 1.5px solid currentColor; outline-offset: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  background: var(--white); color: var(--black);
  padding: 8px 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Small uppercase labels — the A24 register */
.label {
  font-family: var(--sans);
  font-size: var(--label);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* Arrows */
.arrow { flex: 0 0 auto; transition: transform .35s var(--ease); }
.arrow--ext { width: 11px; height: 11px; }

/* ==========================================================================
   01 Hero — one video behind the whole wordmark
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  background: var(--black); color: var(--white);
  display: grid; align-items: center; justify-items: center;
  padding: clamp(40px, 8vh, 96px) 0;
  overflow: hidden;
}

/* The logo animation: a 1800×460 strip with the logo filling it, on the same
   pure black as the hero. Full width, but never taller than ~45 % of the screen. */
.logo {
  --row-edge: 2vw;
  position: relative;
  width: 100%;
  max-width: calc(45vh * 1800 / 460 + 2 * var(--row-edge));
  padding: 0 var(--row-edge);
  margin: 0 auto;
  user-select: none; -webkit-user-select: none;
}
.logo__video {
  width: 100%; height: auto; aspect-ratio: 1800 / 460;
  object-fit: contain; background: var(--black);
}
/* Autoplay refused: the poster (the final white logo) stands in */
.logo.is-still {
  aspect-ratio: 1800 / 460;
  background-size: contain; background-repeat: no-repeat; background-position: center;
  background-origin: content-box; background-clip: content-box;
}

/* Entrance: a short fade once main.js has decided video or still */
.js .logo { opacity: 0; transform: translateY(14px); }
.js.is-ready .logo {
  opacity: 1; transform: none;
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}

/* Scroll cue, bottom right: the word in thin capitals and a hairline arrow
   with a light travelling down it */
.scroll-cue {
  position: absolute; right: var(--edge); bottom: clamp(22px, 3.4vh, 36px);
  display: flex; align-items: center; gap: 14px;
  padding: 8px 0 8px 8px;
  color: var(--white);
}
.scroll-cue__text {
  font-family: var(--sans); font-size: 12px; font-weight: 200;
  letter-spacing: .28em; text-transform: uppercase; line-height: 1;
  margin-right: -.28em;   /* cancel the trailing letter-space */
  opacity: .8; transition: opacity .3s;
}
.scroll-cue:hover .scroll-cue__text { opacity: 1; }
/* the arrow is a mask, so the travelling light takes its shape */
.scroll-cue__arrow {
  position: relative; width: 11px; height: 46px; overflow: hidden;
  background: rgba(255, 255, 255, .28);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 46'%3E%3Cpath d='M5.5 0v45M1 40.5l4.5 4.5 4.5-4.5' fill='none' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 46'%3E%3Cpath d='M5.5 0v45M1 40.5l4.5 4.5 4.5-4.5' fill='none' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.scroll-cue__arrow::after {
  content: ""; position: absolute; inset: 0; background: var(--white);
  transform: translateY(-101%);
  animation: cue 2.6s var(--ease) 1.5s infinite;
}
@keyframes cue { 0% { transform: translateY(-101%); } 60%, 100% { transform: translateY(101%); } }
.js .scroll-cue { opacity: 0; pointer-events: none; }
.js.cue-on .scroll-cue { pointer-events: auto; }
/* main.js adds .cue-on once every letter of the logo is on screen */
.js.cue-on .scroll-cue { opacity: 1; transition: opacity 1.2s var(--ease); }

/* ==========================================================================
   02 Information block — About · Business Inquiries · Social
   ========================================================================== */
.info { background: var(--paper); color: var(--ink); }

/* Hairlines come from the 1px gap over the rule colour — works in every layout */
.info__grid {
  display: grid;
  grid-template-columns: 1fr 2.9fr 1fr;
  gap: 1px;
  background: var(--rule);
  border-bottom: 1px solid var(--rule);
}
.cell { background: var(--paper); padding: 40px var(--edge) 44px; min-width: 0; }
.cell .label { color: var(--ink); }
.cell h2.label { margin-bottom: 28px; }

/* About, the centrepiece: label and a serif lede on the left, the founders'
   photo on the right with their names underneath — one magazine-style spread */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "label photo" "text photo";
  column-gap: clamp(28px, 3.2vw, 56px);
  align-items: start;
}
.about__label { grid-area: label; }
.about__text {
  grid-area: text; max-width: 30ch;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(19px, .9rem + .4vw, 22px); line-height: 1.38; letter-spacing: -.005em;
  text-wrap: pretty;
}
.about__figure { grid-area: photo; }
.about__photo { aspect-ratio: 3 / 2; }
.about__photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  background: #ddd;
}
/* caption: each name under its person */
.founders {
  display: flex; justify-content: space-between; gap: 20px;
  margin-top: 14px;
}
.founder + .founder { text-align: right; }
.founder__name {
  display: block;
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; line-height: 1.4;
}
.founder__role {
  display: block; margin-top: 2px;
  font-family: var(--serif); font-size: clamp(16px, .8rem + .4vw, 18px); line-height: 1.3; color: var(--muted);
}

/* Business inquiries: one line of copy and the address */
.cell--inquiries { container-type: inline-size; }
.inquiries__text { max-width: 30ch; font-size: 15px; line-height: 1.65; margin-bottom: 18px; }
.email {
  display: inline-block; transition: color .3s;
  font-family: var(--serif); font-weight: 400; line-height: 1.25;
  letter-spacing: -.01em; white-space: nowrap;
  font-size: var(--serif-size);
  /* the whole address always fits on one line of its column */
  font-size: min(var(--serif-size), 8.4cqi);
}
.email:hover { color: var(--muted); }

/* Social: serif links */
.links li + li { margin-top: 10px; }
.links a {
  display: inline-flex; align-items: center; gap: 22px;
  font-family: var(--serif); font-weight: 400;
  font-size: var(--serif-size); line-height: 1.25; letter-spacing: -.005em;
  transition: color .3s;
}
.links a:hover { color: var(--muted); }
.links a:hover .arrow--ext { transform: translate(2px, -2px); }

/* Footer line */
.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px var(--edge) calc(22px + env(safe-area-inset-bottom, 0px));
}
.foot .label { font-weight: 500; }

/* ---------- Responsive ---------- */
/* wide: About in the middle, a narrow column on each side */
@media (min-width: 1281px) {
  .info__grid {
    grid-template-columns: minmax(270px, 1fr) minmax(0, 2.9fr) minmax(270px, 1fr);
    grid-template-rows: minmax(clamp(400px, 42vh, 520px), auto);
  }
  .cell--social { order: 1; }
  .cell--about { order: 2; }
  .cell--inquiries { order: 3; }
}
/* in between: About across the full width, the two small blocks under it */
@media (max-width: 1280px) {
  .info__grid { grid-template-columns: 1fr 1fr; }
  .cell--about { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  /* phones: the wordmark spans the screen, so the hero is only as tall as the
     logo plus a calm margin, and About (photo first) starts right under it */
  .hero { min-height: 0; padding: clamp(60px, 18vw, 110px) 0; }
  .logo { --row-edge: 10px; }   /* clear of rounded screen corners */
  .scroll-cue { display: none; }
  .info__grid { grid-template-columns: 1fr; }
  .cell { padding: 36px var(--edge) 40px; }
  .cell h2.label { margin-bottom: 22px; }
  .about {
    grid-template-columns: 1fr; grid-template-rows: none;
    grid-template-areas: "label" "photo" "text";
  }
  /* the photo runs edge to edge */
  .about__photo { margin: 0 calc(-1 * var(--edge)); }
  .about__text { margin-top: 30px; max-width: 34ch; font-size: 20px; }
  .email { font-size: min(30px, 8.4cqi); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .logo, .js.is-ready .logo { opacity: 1; transform: none; transition: none; }
  .js .scroll-cue, .js.cue-on .scroll-cue { opacity: 1; pointer-events: auto; transition: none; }
  .scroll-cue__arrow { background: rgba(255, 255, 255, .7); }
  .scroll-cue__arrow::after { animation: none; }
  .arrow { transition: none; }
}
