/* Oberdoerfer & Krebs — the landing page (index.html), 17 Oct 2026.
   Shared with workshop/tune.html, so the page and its tuning copy cannot drift apart.
   Built from the workshop test landing-a3.html (the original design direction A, stripped
   back), with the values Bruno tuned at 1536 px. Every adjustable value is in :root below.
   The previous style.css (the first landing page with "who we are", the unused product and
   Works grids, the TeX Gyre Heros switch-back) is in the git history, commit 4443ebc. */

@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: only light;   /* always light: the site does not follow a device's dark mode */

  --ground: #F2F1EE;          /* the page */
  --bar-ground: #FAF9F7;      /* the navigation bar and the contact box: a little lighter */
  --ink: #111111;

  --margin: 32px;             /* left and right of everything (16px on phones) */
  --width: min(1800px, 100vw - 2 * var(--margin));
  --cols: 12;                 /* the invisible grid (4 on phones) */

  /* The name: "Oberdoerfer [logo] Krebs" (the logo in place of the "&", test 6 Nov 2026),
     Inter 600, letter spacing -0.045em, one line from the left page margin to the right one,
     on phones too. Its size is that width divided by the name's width at 1px size
     (--name-ratio). The logo is as tall as the name's capitals (--cap): its top on the
     capitals' tops, its bottom on the baseline. */
  --rf: 0.05em;               /* extra space between the r and f of "Oberdoerfer" (the two touched) */
  --name-ratio: 8.507;        /* the name's width / its size: measured 8.4896 in Edge, 6 Nov 2026
                                 ("Oberdoerfer [logo] Krebs"; was 8.514 for "Oberdoerfer & Krebs"),
                                 at --rf 0.05em, plus 0.2% so it never sticks out. IF THE NAME'S TEXT,
                                 WEIGHT, LETTER SPACING OR --rf CHANGES, MEASURE AGAIN
                                 (workshop/tune.html does it live). */
  --cap: 0.7275;              /* Inter's cap height / size */
  --logo-aspect: 0.79987;     /* the logo's width / height (727.02 / 908.92); for reference (the CSS uses aspect-ratio) */
  --name-size: calc(var(--width) / var(--name-ratio));

  /* Hairline rules (Bruno, 17 Oct 2026; as in direction A): a thin line from margin to margin
     under the header on every page, and under the studio text on the landing page */
  --rule-weight: 1px;         /* drawn as a border: whole screen pixels, never blurred; 0.5px
                                 shows as one device pixel on 2x screens, 1px on 1x */
  --rule-grey: 17;            /* its colour as a grey level 0–255: 17 = #111111 */
  --rule-header-above: 25px;  /* from the name's baseline to the header line */
  --rule-header-below: 25px;  /* from the header line to what follows (studio text, or a page's content) */
  --head-h: calc(var(--margin) + var(--name-size) * var(--cap) + var(--rule-header-above) + var(--rule-weight) + var(--rule-header-below));
  --logo-h: 32px;             /* the fixed logo of the inner pages: its height (style.css, "THE FIXED LOGO") */
  --logo-gap: 32px;           /* ... and from it to the content */   /* the header's height: where the content starts (the inner pages redefine it, "THE FIXED LOGO") */
  --rule-text-above: 25px;    /* from the studio text's last baseline to its line */
  --rule-text-below: 25px;    /* from that line to the works */

  /* THE SITE GREY (Bruno, 18 Oct 2026): ONE grey for the whole site, a grey level 0–255:
     107 = #6B6B6B, 4.72 : 1 on the ground (passes WCAG AA); was 112 = #707070 (4.38 : 1).
     Used by the studio text, the product pages' secondary lines and the fold-outs' text. */
  --site-grey: 107;

  /* Fold-outs (18 Oct 2026; Claude's values, to be judged): see "Fold-outs" below */
  --fold-heading-weight: 400; /* the heading's weight (body text: 400) */
  --fold-space: 16px;         /* (on the product pages' 8/16/32 ruler; 14px until 18 Oct 2026) from each fold-out's hairline to its heading's capitals, from the
                                 heading's baseline to the next hairline, and around open text */

  /* Studio text: the provisional "who we are" text between the header and the works
     (tuned by Bruno at 1536 px, 17 Oct 2026) */
  --studio-text-size: 25px;
  --studio-text-weight: 650;
  --studio-text-grey: var(--site-grey);   /* its colour: the site grey (a grey level 0–255) */
  --studio-text-cols: 10;     /* its width in columns of 12 (computers only: not shown on phones) */

  /* Works grid */
  --tile-span: 4;             /* columns of 12 per tile: 3 to a row (phones: one tile, full width) */
  --tile-gap: 16px;           /* between tiles side by side; rows are 3 times apart */
  --line-weight: 0.4px;       /* the toolpath drawings' line, on screen */
  --draw-time: 3s;            /* how long a drawing takes to draw itself */
  --fade: 0.4s;               /* drawing to photo crossfade */
  --nav-current-weight: 650; /* the current page's link in the bottom bar (the others: 400; tuned by Bruno) */
  --page-bottom: 160px;       /* below the grid (the navigation bar floats over it) */

  /* Intro: the logo printed as one thick bead (landing.js) */
  --print-time: 2.5s;         /* printing the whole bead, at one steady speed (tuned by Bruno) */
  --print-pause: 0.25s;       /* the finished logo rests, then settles left of the name (tuned by Bruno) */
  --print-direction: forward; /* forward: from the end nearest the bottom; reverse: from the other end */
}

* { box-sizing: border-box; }
html {
  background: var(--ground);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Inter", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
h1 { margin: 0; font: inherit; }

.frame { width: var(--width); margin: 0 auto; }
.row {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
}

/* ---- Top: logo and name ------------------------------------------------------------ */
/* THE BIG HEADER, on the landing page only (since 4 Nov 2026; on every page 17 Oct–4 Nov
   2026): the name from margin to margin, the logo inside it in place of the "&" (test, 6 Nov
   2026; until then the logo stood in column 1, the name from column 2). Every other page has THE FIXED LOGO
   (body class "small-head", below).
   Other pages carry a copy of the logo inline instead of landing.js drawing it. */
.cover { padding: var(--margin) 0 var(--rule-header-below); }
/* The header line, part of the header on every page */
.cover::after, .studio-text-row::after {
  content: "";
  display: block;
  height: 0;
  border-top: var(--rule-weight) solid rgb(var(--rule-grey) var(--rule-grey) var(--rule-grey));
}
.cover::after { margin-top: var(--rule-header-above); transition: opacity 0.8s linear; }
.is-intro .cover::after { opacity: 0; transition: none; }   /* appears with the rest after the intro */
.mast { align-items: start; position: relative; }
.logo-spot {
  grid-column: 1;
  display: block;
  height: calc(var(--name-size) * var(--cap));
  aspect-ratio: 727.02 / 908.92;
}
.logo-spot svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* LOGO AS THE "&" (test, 6 Nov 2026): on the landing page the logo sits inside the name in
   place of the "&", like a letter: as tall as the capitals (--cap em), its bottom on the
   baseline (an inline-block with no text inside sits on the baseline), a normal word space
   each side (the real spaces of the text). It is sized in em, so it follows the name's size.
   Screen readers and copying get the "&" inside it (.amp, hidden from view when scripts run;
   without scripts the "&" itself shows, as there is no logo then). */
.name .logo-spot { display: inline; height: auto; aspect-ratio: auto; }   /* without scripts: just the "&", in the line (not the fixed logo's block) */
.js .name .logo-spot {
  display: inline-block;
  position: relative;
  height: calc(var(--cap) * 1em);
  aspect-ratio: 727.02 / 908.92;
}
.js .name .logo-spot .amp {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.name {
  grid-column: 1 / -1;
  min-width: 0;
  font-size: var(--name-size);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
  white-space: nowrap;
  font-variation-settings: "opsz" 32;   /* Inter's 32px-and-up design at every size, so --name-ratio holds on phones */
  text-box: trim-both cap alphabetic;   /* the box runs from the capitals' tops to the baseline */
}
.name > span { display: inline-block; }
.name .rf { margin-right: var(--rf); }
p.name { margin: 0; }   /* on pages other than the landing page the name is not the heading */
/* THE FIXED LOGO (Bruno, 4 Nov 2026, replacing the small header with the name of the same day):
   every page except the landing page. The LOGO ONLY, --logo-h tall (32px), its line to scale but
   at least 1px (page.js), at the top left: --margin from the window's top (32px; 16 on phones) and
   on the left page margin. FIXED: it stays in place while the page scrolls and floats over the
   content with no background (the content passes under it); a link to the landing page (screen
   readers: "Oberdoerfer & Krebs, home"), above the content but under the bottom bar and its
   Contact box (z-index 40 < 50). No name, NO HAIRLINE. The content starts --logo-gap (32px) under
   the logo: --head-h, which also feeds every formula that counts the header (the photos' room). */
.small-head {
  --head-h: calc(var(--margin) + var(--logo-h) + var(--logo-gap));
  padding-top: var(--head-h);
}
.small-head .cover {
  position: fixed;
  z-index: 40;
  top: var(--margin);
  left: calc((100% - var(--width)) / 2);     /* the page's left margin */
  width: auto;
  margin: 0;
  padding: 0;
}
.small-head .cover::after { display: none; }
.small-head .mast { display: block; }
.small-head .logo-spot { height: var(--logo-h); }
.mast-link { display: block; }

/* ---- Studio text (index.html): a text block on the grid, left-aligned, its capitals' top
   --rule-header-below under the header line; its last baseline --rule-text-above over its
   own line, and that line --rule-text-below above the works. Fades in with the rest after
   the intro (its line too). */
.studio-text-row { padding-bottom: var(--rule-text-below); }
.studio-text-row::after { margin-top: var(--rule-text-above); }
.studio-text {
  width: calc(var(--width) * var(--studio-text-cols) / 12);
  max-width: 100%;
  margin: 0;
  font-size: var(--studio-text-size);
  font-weight: var(--studio-text-weight);
  color: rgb(var(--studio-text-grey) var(--studio-text-grey) var(--studio-text-grey));
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-box: trim-both cap alphabetic;
}

/* ---- Works: tiles of toolpath drawings that turn into photos -------------------------
   Each tile: a frame with the photo's proportions (set in the HTML), the photo filling
   it (nothing cropped), the toolpath drawing centred over it (8% inset). Without scripts
   the photos simply show. */
.works {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--tile-gap);
  row-gap: calc(var(--tile-gap) * 3);
  align-items: start;
  padding-bottom: var(--page-bottom);
}
.tile { display: block; grid-column: span var(--tile-span); }
.tile-frame { position: relative; }
.tile-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity var(--fade) linear;
}
.js .tile-photo { opacity: 0; }
.tile-drawing {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  overflow: visible;
  transition: opacity var(--fade) linear;
}
.js .tile.show-photo .tile-photo { opacity: 1; }
.tile.show-photo .tile-drawing { opacity: 0; }
/* Under the mouse or keyboard focus once the tile is "drawn": landing.js marks it when the drawing
   has finished, or at once when the mouse or focus arrives during drawing (19 Nov 2026) */
@media (hover: hover) {
  .js .tile.drawn:hover .tile-photo, .js .tile.drawn:focus-visible .tile-photo { opacity: 1; }
  .tile.drawn:hover .tile-drawing, .tile.drawn:focus-visible .tile-drawing { opacity: 0; }
}

/* ---- Navigation: a small bar floating at the bottom centre, always visible ------------ */
.navbar {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  gap: 24px;
  padding: 10px 18px 11px;
  background: var(--bar-ground);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}
/* The current page's link is set bolder (--nav-current-weight; Works on the landing page,
   Shop on the Shop pages, none on Terms; marked aria-current in the HTML). Each item
   reserves the width of its bold form (an invisible copy of its label, data-label), so
   the bar is exactly as wide on every page. */
.navbar > a, .contact-toggle { display: inline-flex; flex-direction: column; }
.navbar > a::after, .contact-toggle::after {
  content: attr(data-label);
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: var(--nav-current-weight);
  pointer-events: none;
  user-select: none;
}
.navbar > a[aria-current] { font-weight: var(--nav-current-weight); }
.contact-toggle {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
}
.contact-toggle:hover, .contact-toggle[aria-expanded="true"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* Contact box: opens above the bar, exactly as wide as it, 6px above it; the same ground,
   no border, no shadow, square corners; its text starts where "Works" starts. */
.contact-box {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  display: grid;
  gap: 12px;
  padding: 14px 18px 15px;
  background: var(--bar-ground);
  font-style: normal;
  line-height: 1.2;
  white-space: normal;
}
.contact-box[hidden] { display: none; }
.contact-box p { margin: 0; }
.contact-box .instagram { display: block; width: 16px; height: 16px; }
.contact-box .instagram svg { display: block; width: 100%; height: 100%; fill: #111111; }

/* ---- Intro: the logo draws itself large in the middle, then moves to its place -------- */
.intro-logo {
  position: fixed;
  z-index: 900;
  overflow: visible;
  pointer-events: none;
  color: var(--ink);
}
.fades { transition: opacity 0.8s linear; }
.is-intro .fades { opacity: 0; transition: none; }
.is-intro .logo-spot svg { visibility: hidden; }   /* the svg only: the "&" stays for screen readers */

/* ---- Fold-outs (18 Oct 2026): a reusable component (shop pages and About) --------------
   Markup: <div class="folds"><details class="fold"><summary class="fold-head">Heading</summary>
   <div class="fold-body">...</div></details> ...</div>. Plain HTML <details>: opens and
   closes without scripts, by mouse, Enter or Space; screen readers announce it as a
   collapsed or expanded button. Closed by default (no "open" attribute). Each fold-out sits
   between the site's hairlines (the header line's weight and colour); the open/close marker
   is a small plus of the same 1 px lines that loses its upright when open. No animation. */
.folds { border-bottom: var(--rule-weight) solid rgb(var(--rule-grey) var(--rule-grey) var(--rule-grey)); }
.fold { border-top: var(--rule-weight) solid rgb(var(--rule-grey) var(--rule-grey) var(--rule-grey)); }
.fold-head {
  display: block;
  position: relative;
  padding: var(--fold-space) 28px var(--fold-space) 0;   /* room on the right for the marker */
  list-style: none;
  font-weight: var(--fold-heading-weight);
  cursor: pointer;
  text-box: trim-both cap alphabetic;   /* the spaces are measured from the capitals and the baseline */
}
.fold-head::-webkit-details-marker { display: none; }
.fold-head::after {
  content: "";
  position: absolute;
  right: 0;
  top: calc(var(--fold-space) + 0.5em * var(--cap) - 4.5px);   /* centred on the capitals */
  width: 9px;
  height: 9px;
  background:
    linear-gradient(currentColor, currentColor) center / 9px 1px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1px 9px no-repeat;
}
.fold[open] > .fold-head::after { background: linear-gradient(currentColor, currentColor) center / 9px 1px no-repeat; }
.fold-head:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.fold-head:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* A LINK ROW among the fold-outs (18 Oct 2026): looks exactly like a fold-out's heading row
   (the same hairline, spaces, weight and size) but links to another page instead of
   opening; an arrow in the plus's place. Markup, inside .folds:
   <a class="fold fold-link" href="..."><span>Heading</span><span class="fold-arrow" aria-hidden="true">→</span></a> */
.fold-link {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: var(--fold-space) 0;
  font-weight: var(--fold-heading-weight);
}
.fold-link > span { text-box: trim-both cap alphabetic; }   /* measured from capitals and baseline, as .fold-head */
.fold-link:hover { text-decoration: none; }
.fold-link:hover > span:first-child { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.fold-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.fold-body { padding-bottom: var(--fold-space); text-box: trim-both cap alphabetic; }
/* Fold-out content in the site grey (Bruno, 18 Oct 2026): the product pages' --p-grey (so it
   follows the tune page's grey slider), elsewhere the studio text's grey (both the site grey, #6B6B6B).
   Headings stay ink. LINKS INSIDE ARE GREY TOO (Bruno, 18 Oct 2026, site-wide): no ink words in a
   grey line; a link is marked only by a thin underline in the same grey (1px, 0.2em below the
   text, as the site's hover underline); under the mouse it darkens to ink. Navigation links
   with an arrow ("Full shipping & terms →"; class="arrow-link") stay ink, underlined only under
   the mouse, like "About the project →" outside the fold-outs. */
.fold-body {
  --fold-grey: var(--p-grey, var(--studio-text-grey));
  color: rgb(var(--fold-grey) var(--fold-grey) var(--fold-grey));
}
.fold-body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.fold-body a:hover { color: var(--ink); }
.fold-body a.arrow-link { color: var(--ink); text-decoration: none; }
.fold-body a.arrow-link:hover { text-decoration: underline; }
.fold-body > * { margin: 0; }
.fold-body > * + * { margin-top: 0.6em; }

@media (prefers-reduced-motion: reduce) {
  .fades, .tile-photo, .tile-drawing, .cover::after { transition: none; }
}

/* ---- Phones ------------------------------------------------------------------------ */
@media (max-width: 700px) {
  :root {
    --margin: 16px;
    --cols: 4;
    --page-bottom: 120px;
  }
  .tile { grid-column: 1 / -1; }
  /* Phones: no studio text and no line under it (Bruno, 17 Oct 2026; revisit with the About
     page). display: none, so screen readers skip it too; the works follow the header line
     at --rule-header-below. */
  .studio-text-row { display: none; }
  .works { row-gap: calc(var(--tile-gap) * 3); }
  .navbar { gap: 20px; padding: 10px 16px 11px; }
  .contact-box { padding: 14px 16px 15px; }
}
