/* =========================================================
   STUDIO FRU — STYLE.CSS (clean + annotated)
   (Same rules, just re-ordered + de-duplicated for clarity)
   ========================================================= */

/* =========================
   1) GLOBAL TOKENS (EDIT HERE)
   ========================= */
:root{
  /* Layout */
  --page-margin: 20px;
  --page-margin-top: 12px;
  --gutter: 20px;

  /* Colors */
  --text: #111;
  --bg: #fff;

  /* Header */
  --logo-w: 60px;
  --stage-top-offset: 120px;

  /* Loop spacing */
  --loop-gap: 14px;
  --loop-bottom: 14px;

  /* Media sizing (desktop defaults) */
  --media-max-h: 700px;
  --media-h-l: 63vh;
  --media-h-m: 52vh;
  --media-h-s: 41vh;

  /* Captions */
  --caption-size: 10px;
  --caption-color: #878787;
  --caption-gap: 12px;
}


/* =========================
   2) BASE RESET + PAGE LOCK
   ========================= */
*{ box-sizing: border-box; }

html, body{
  height: 100%;
  margin: 0;
  overflow: hidden; /* lock scrolling on the main page */
}

body{
  background: var(--bg);
  color: var(--text);

  font-family: "neue-haas-grotesk-text",
               system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* =========================================================
   3) HEADER — 8 COLUMN GRID (DESKTOP)
   ========================================================= */
.header{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;

  /* NOTE: your current header padding (kept) */
  padding: 8px 20px 0 20px;

  display: grid;
  grid-template-columns: repeat(8, 1fr);
  column-gap: var(--gutter);
  align-items: start;

  z-index: 10;
}

/* Col 1 — LOGO */
.logo{
  grid-column: 1 / span 1;
  width: var(--logo-w);
  display: inline-flex;
  justify-self: start;

  text-decoration: none;
}

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

/* Exact grid placement */
.col-services{ grid-column: 3 / span 2; } /* cols 3–4 */
.col-about{    grid-column: 5 / span 2; } /* cols 5–6 */
.col-contact{  grid-column: 7 / span 1; } /* col 7 */
.col-legal{    grid-column: 8 / span 1; } /* col 8 */

/* Header typography */
.col-title{
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
  margin: 0 0 10px 0;
  font-weight: 400;
}

.col-list{
  list-style: none;
  padding: 0;
  margin: 0;

  font-size: 12px;
  line-height: 1.2;
  font-weight: 400;
}

.col-text{
  margin: 0;

  font-size: 12px;
  line-height: 1.15;
  max-width: 34ch;
  font-weight: 400;
}

/* Inline links in header text */
.link{
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Legal column (right side) */
.copyright{
  color: #cfcfcf;
  font-size: 10px;
  line-height: 1.1;
}

.legal-links{
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.legal-link{
  font-size: 10px;
  line-height: 1.1;
  color: #cfcfcf;
  text-decoration: none;
}

.legal-link:hover{
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* =========================================================
   4) LEGAL PAGES (IMPRINT + PRIVACY)
   ========================================================= */
.legal-page{
  overflow-y: auto;   /* allow scrolling on legal pages */
  overflow-x: hidden;
}

/* Hide stage + loop on legal pages */
.legal-page .stage,
.legal-page .loop,
.legal-page .white-space{
  display: none;
}

/* Main legal wrapper */
.legal{
  max-width: 45vw;     /* width constraint */
  min-width: 320px;

  margin: 0;           /* left aligned */
  padding: 8px 20px 80px 20px;

  font-family: "neue-haas-grotesk-text",
               system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  font-size: 12px;
  line-height: 1.2;
  color: var(--text);
}

.legal h1{
  font-family: "neue-haas-grotesk-text",
               system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  font-size: 12px;
  font-weight: 400;
  margin: 0 0 32px 0;
}

.legal h2{
  font-family: "neue-haas-grotesk-text",
               system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;

  margin: 40px 0 8px 0;
  color: #6f6f6f;
}

/* Links inside legal pages */
.legal a{
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Optional spacing block */
.legal .spacer{
  height: 24px;
}


/* =========================================================
   5) STAGE + LOOP (MAIN PAGE)
   ========================================================= */
.stage{
  height: 100vh;
  height: 100svh;

  display: flex;
  flex-direction: column;

  /* pushes loop down below header */
  padding-top: var(--stage-top-offset);
}

/* Controlled top whitespace on desktop */
/* Desktop spacer: flexible so it can shrink when the viewport height is small */
.white-space{
  flex: 1 1 auto;
  min-height: 0;

  /* keeps your “nice desktop breathing room” when there IS space */
  max-height: 220px;
}

/* Loop wrapper */
.loop{
  padding: 0 var(--page-margin) var(--loop-bottom);
}

/* Viewport (interaction surface) */
.loop-viewport{
  overflow-x: hidden;
  overflow-y: visible;
  width: 100%;

  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

/* Track (the moving row) */
.loop-track{
  display: flex;
  gap: var(--loop-gap);
  align-items: flex-end;

  width: max-content;
  will-change: transform;
  transform: translate3d(0,0,0);

  /* make sure captions are allowed to “hang” outside without being clipped */
.stage,
.loop,
.loop-viewport {
  overflow: visible;
}

/* give the bottom a tiny bit more breathing room for captions */
.loop{
  padding-bottom: calc(var(--loop-bottom) + var(--caption-gap) + 6px);
}
}


/* =========================================================
   6) ITEMS + MEDIA + CAPTIONS
   ========================================================= */
.item{
  flex: 0 0 auto;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  width: fit-content;
}

/* Media element baseline */
.item img,
.item video{
  display: block;
  width: auto;
  height: auto;

  max-height: min(var(--media-max-h), var(--media-h-l));
  object-fit: contain;

  pointer-events: none; /* IMPORTANT: dragging shouldn’t select media */
  user-select: none;
}

/* Size modifiers */
.item.size-l img,
.item.size-l video{
  max-height: min(var(--media-max-h), var(--media-h-l));
}

.item.size-m img,
.item.size-m video{
  max-height: min(var(--media-max-h), var(--media-h-m));
}

.item.size-s img,
.item.size-s video{
  max-height: min(var(--media-max-h), var(--media-h-s));
}

/* Caption */
.caption{
  margin-top: var(--caption-gap);
  font-size: var(--caption-size);
  line-height: 1.2;
  color: var(--caption-color);
  letter-spacing: 0;
}

/* OPTIONAL: caption link styling (for “visit website ↗”) */
.caption a{
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* =========================================================
   7) MOBILE
   ========================================================= */
@media (max-width: 980px){
  :root{
    --loop-gap: 18px;
    --stage-top-offset: 180px;

    --logo-w: 115px;
    --media-max-h: 400px;

    /* mobile via svh (more stable on mobile browsers) */
    --media-h-l: 45svh;
    --media-h-m: 34svh;
    --media-h-s: 28svh;
  }

  /* Typography */
  body{ font-size: 14px; }

  .col-text,
  .col-list,
  .link{
    font-size: 14px;
    line-height: 1.25;
  }

  /* Header becomes stacked */
  .header{
    grid-template-columns: 1fr;
    row-gap: 18px;
  }

  .logo{ grid-column: 1; }

  /* Hide services on mobile */
  .col-services{ display: none; }

  /* Stack remaining columns */
  .col-about,
  .col-contact,
  .col-legal{
    grid-column: 1;
  }

  /* Hide headings + copyright on mobile */
  .col-title{ display: none; }
  .copyright{ display: none; }

  /* Legal links inline on mobile */
  .legal-links{
    flex-direction: row;
    gap: 12px;
    margin-top: 0;
  }

  /* White space behavior on mobile:
     keep the loop pinned near the bottom without weird gaps */
  .white-space{
    flex: 1 1 auto;
    min-height: 0;
    height: clamp(24px, 10vh, 120px);
  }

  /* Loop spacing */
  .loop{
    margin-top: 0;
    margin-bottom: 0;
  }

  /* Legal pages on mobile */
  .legal{
    padding: 96px 20px 64px 20px;
    font-size: 14px;
    line-height: 1.55;
  }

  .legal h1{
    margin-bottom: 24px;
  }
}
