/* Moran Weinish portfolio — layout and components.
   Mobile-first. Breakpoints: 768 (tablet), 1024 (desktop).
   Desktop values match the Figma frame at 1920px; fluid below that. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--content), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* forced line breaks that only apply on wide screens — put the space before the <br> (CLAUDE.md §7) */
br.wide { display: none; }
@media (min-width: 1024px) { br.wide { display: inline; } }
br.xwide { display: none; }
@media (min-width: 1600px) { br.xwide { display: inline; } }

/* ---------- labels (Space Mono, uppercase, tracked) ---------- */
.label {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--accent);
  border-top: 2px solid var(--accent); /* 73:320 / 18:579: 2px, text 12 below the top */
  padding-top: 10px;
  display: inline-block;
  line-height: 1.5;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  border-radius: var(--r-pill);
  font-weight: 600; font-size: 19px; line-height: 1.31; /* Figma 'Auto' for Assistant, not 1 */
  padding: 16px 34px;
  transition: transform .25s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.btn-dark { background: var(--ink); color: #fff; }
.btn-outline { border: 1px solid var(--outline-btn); color: var(--ink); padding: 16px 30px; }
.btn-rose { background: var(--rose); color: var(--plum); font-weight: 700; font-size: 20px; }
@media (hover: hover) {
  .btn-dark:hover { background: var(--accent); transform: translateY(-2px); }
  .btn-outline:hover { border-color: var(--ink); background: #fff; transform: translateY(-2px); }
  .btn-rose:hover { background: #fff; transform: translateY(-2px); }
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(46, 26, 34, 0.04);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; font-size: 20px; letter-spacing: -0.19px; color: var(--ink); }
.brand-mark {
  width: 39px; height: 39px; border-radius: 50%; background: var(--ink); color: var(--on-plum);
  display: grid; place-items: center; font-weight: 800; font-size: 18px; line-height: 1;
}
.nav-links { display: none; align-items: center; gap: 38px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-weight: 600; font-size: 17px; color: var(--nav); transition: color .2s; }
.nav-links .btn { padding: 11px 22px; font-size: 17px; color: var(--on-plum); }
@media (hover: hover) { .nav-links a:not(.btn):hover { color: var(--accent); } }
/* Work opens a list of the case studies on hover or keyboard focus — CSS only, so it
   works without JS (Itzik 2026-09-29; not in the Figma file, built from the site's tokens) */
.has-menu { position: relative; }
.has-menu > a { display: inline-flex; align-items: center; gap: 5px; }
.has-menu .chev { width: 12px; height: 12px; transition: transform .25s var(--ease); }
.nav-links .menu {
  position: absolute; top: 100%; left: -14px; z-index: 60; min-width: 200px; margin: 0; padding: 8px; list-style: none;
  background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 24px 48px -20px rgba(46, 26, 34, .28);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
}
/* an invisible bridge over the gap, so moving the pointer down to the list doesn't close it */
.nav-links .menu::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; }
.has-menu:hover > .menu, .has-menu:focus-within > .menu {
  opacity: 1; visibility: visible; transform: translateY(14px); transition-delay: 0s;
}
.has-menu:hover .chev, .has-menu:focus-within .chev { transform: rotate(180deg); }
.nav-links .menu a {
  /* names only; the list's left edge lines up with the W of Work: 8px list padding + 14px link padding = 14px + 8px offset */
  display: block; white-space: nowrap;
  padding: 11px 6px 11px 6px; border-radius: 10px; color: var(--ink); font-size: 16px; font-weight: 600; line-height: 1.25;
  transition: background-color .2s;
}
.nav-links .menu a:hover, .nav-links .menu a:focus-visible { background: var(--bg); color: var(--ink); }
.nav-links .menu a[aria-current="page"] { background: var(--bg); }
.nav-toggle {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; content: ""; position: relative; transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }
.nav.open .nav-toggle span { background: transparent; }
.nav.open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }
.nav-drawer {
  display: none; border-top: 1px solid var(--border); background: #fff;
}
.nav.open .nav-drawer { display: block; }
.nav-drawer { box-shadow: 0 12px 24px -12px rgba(46, 26, 34, .18); }
/* The list carries .wrap for its width, and `.nav .wrap` makes that a horizontal
   flex row — which is what squeezed Work / About / Get in touch onto one line.
   It is a vertical menu: full-width rows, one divider each, the button last. */
.nav-drawer ul.wrap { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; min-height: 0; list-style: none; margin: 0 auto; padding: 6px 0 22px; }
.nav-drawer li + li { border-top: 1px solid var(--border); }
.nav-drawer li:last-child { border-top: 0; padding-top: 14px; }
.nav-drawer a { display: flex; align-items: center; justify-content: space-between; padding: 16px 2px; font-weight: 600; font-size: 20px; line-height: 1.2; color: var(--ink); }
.nav-drawer a:not(.btn)::after { content: "→"; font-weight: 400; color: var(--muted-2); }
.nav-drawer .btn { display: flex; justify-content: center; width: 100%; padding: 15px 24px; margin-top: 4px; color: var(--on-plum); }
@media (min-width: 1024px) {
  .nav .wrap { min-height: var(--nav-h); }
  .brand { font-size: 24px; }
  .nav-links { display: flex; }
  .nav-toggle, .nav-drawer { display: none !important; }
}

/* ---------- hero ---------- */
.hero { padding: 48px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
.hero h1 {
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.02;
  font-size: clamp(36px, 10.4vw, 44px); /* phones: 40 at 390, 39 at 375 */
  color: var(--ink);
}
@media (min-width: 768px) { .hero h1 { font-size: clamp(44px, 4.7vw, 90px); } }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede {
  margin-top: 29px; max-width: 640px;
  font-size: clamp(18px, 1.25vw, 24px); line-height: 1.55; color: var(--body);
}
/* Figma 18:503 breaks after "journey." — but only from 1440 up does the first
   line fit whole (below that the 18px floor outgrows the 640*k measure), so
   the break waits until then instead of leaving a short line */
.hero .lede br.wide { display: none; }
@media (min-width: 1440px) { .hero .lede br.wide { display: inline; } }
.hero .actions { margin-top: 42px; display: flex; flex-wrap: wrap; gap: 14px; }
/* at 375 the two pills are 14px too wide for one row and "About me" drops alone */
@media (max-width: 479.98px) {
  .hero .actions { margin-top: 32px; gap: 10px; }
  .hero .actions .btn { padding-inline: 24px; }
}
/* on a phone the stacked illustration is decoration below the buttons — 300 keeps it
   from taking a whole screen of its own */
.hero-art { width: min(100%, 300px); margin-inline: auto; aspect-ratio: 547 / 497; }
.hero-art img { width: 100%; height: auto; animation: card-in 1.5s var(--ease) .1s both, float 7s ease-in-out 1.6s infinite; }
@media (min-width: 768px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(280px, 40%); }
  .hero-art { width: min(100%, 547px); }
}
@media (min-width: 1024px) {
  /* Figma: text column 960, gap 160, art 547 — of the 1660 content column.
     Those add up to 1667, so the art already overhangs the gutter by 7 (art at
     x 1250, 18:485); it sits 4 above the text. Figma measures the bottom
     padding from the buttons (99 to the strip), so the art's lower 62 hangs
     into it instead of pushing the hero taller. */
  .hero { padding: calc(80 * var(--k)) 0 calc(99 * var(--k)); }
  .hero .wrap { grid-template-columns: 57.83% 32.95%; gap: 9.64%; align-items: start; }
  .hero .lede { max-width: calc(640 * var(--k)); margin-top: calc(29 * var(--k)); }
  .hero .actions { margin-top: calc(42 * var(--k)); gap: calc(14 * var(--k)); }
  .hero-art { margin-inline: auto 0; margin-top: calc(-4 * var(--k)); margin-bottom: calc(-62 * var(--k)); }
}

/* The hero illustration ships as one flat PNG, so the per-card entrance and the
   three float speeds that the Figma file has are not on the site — only the whole
   image fades in and bobs. The .c1/.c2/.c3 and .float/.f2/.f3 rules that used to
   sit here matched nothing and have been removed; restoring the staggered version
   means inlining the three vector cards, which is a layout decision for Moran. */
@keyframes card-in { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-9px) rotate(-1deg); } }

/* ---------- "what I do" strip ---------- */
/* Below 1024 the items wrap onto rows, and a "/" between them would end up
   orphaned at a line's start or end (CSS can't tell where a row breaks). So
   each item is its own outlined chip — separated on every row, centred under
   the label. Moran 2026-09-29: "make spacers between each". */
.strip { background: var(--plum); color: var(--on-plum); padding: 24px 0 26px; }
.strip .wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.strip .label { color: var(--rose); border: 0; padding: 0; font-size: 16px; }
.strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; font-size: 16px; }
.strip li { padding: 5px 14px; line-height: 1.4; white-space: nowrap; border: 1px solid rgba(229, 163, 160, .42); border-radius: var(--r-pill); }
/* tablet: six chips don't fit one row and wrapped 5 + 1, leaving "Figma" alone —
   a zero-height full-width flex item after the third chip makes it 3 + 3 */
@media (min-width: 480px) and (max-width: 1023.98px) {
  .strip li:nth-child(n+4) { order: 2; }
  .strip ul { row-gap: 0; }   /* the break line itself carries the 8 */
  .strip ul::after { content: ""; order: 1; flex-basis: 100%; height: 8px; }
}
@media (min-width: 1024px) { .strip li + li::before { content: "/"; color: #fff; margin-right: calc(26 * var(--k)); } }
@media (min-width: 1024px) {
  .strip { padding: calc(26 * var(--k)) 0; }
  /* Figma: the strip insets 146, not the 130 the rest of the page uses */
  .strip .wrap { width: min(calc(1628 * var(--k)), 100% - 2 * calc(146 * var(--k))); flex-direction: row; flex-wrap: nowrap; gap: calc(44 * var(--k)); }
  .strip .label { font-size: 18px; }
  .strip ul { flex: 1; justify-content: center; gap: 8px calc(26 * var(--k)); font-size: 18px; }
  .strip li { padding: 0; line-height: inherit; white-space: normal; border: 0; border-radius: 0; }
}
@media (min-width: 1200px) {
  /* Figma 18:461: the list box runs 300→1712, 62 short of the strip's right
     edge, so the items centre 31 left of the free space's middle. Not below
     1200: the 18px items have no slack there and "Figma" drops to a 2nd line. */
  .strip ul { margin-right: calc(62 * var(--k)); }
}

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section-head { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 44px; }
.about .wrap > .label, .footer .label { align-self: flex-start; }
.h2 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; font-size: clamp(36px, 2.9vw, 56px); color: var(--ink); }
@media (min-width: 1024px) { .section { padding: calc(96 * var(--k)) 0; }
  .section-head { gap: calc(14 * var(--k)); margin-bottom: calc(44 * var(--k)); } }
/* Figma 18:515: "Case studies" is 56px with Auto line height, a 73-tall box */
#work .h2 { line-height: 1.31; }

/* ---------- case-study cards ---------- */
.cards { display: grid; gap: 28px; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
/* Moran 2026-09-29: inset as in Figma. 18:518 centres four 374.7 cards with a 28
   gap in the 1660 column, so they sit 38.6 in from the heading (x 169 / 571 / 974 / 1377) */
@media (min-width: 1200px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: calc(28 * var(--k)); padding-inline: calc(38.6 * var(--k)); } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card > a { display: flex; flex-direction: column; flex: 1; }
/* Figma card is 374.7 x 472 with a 372.7 x 230 media band inside the 1px border.
   A fixed 230px in a fluid card tightens the crop as the card narrows, so it is a
   ratio instead — which also keeps the TravelHub date row (66:624) in frame. */
.card-media { aspect-ratio: 372.7 / 230; overflow: hidden; position: relative; background: var(--bg); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card-body { padding: 26px 28px; display: flex; flex-direction: column; flex: 1; }
.card-meta { font-family: var(--mono); font-size: 14px; letter-spacing: .84px; text-transform: uppercase; color: var(--muted-2); margin-bottom: 12px; }
/* Figma 66:376 body: meta 26 · h3 59 · text 102 · CTA 192 · 26 below = 240, so the card is 472.
   h3 and CTA use Assistant's Auto line height (1.31), not 1.3 / 1.5. */
.card h3 { font-weight: 700; font-size: 28px; letter-spacing: -0.01em; line-height: 1.31; margin-bottom: 7px; }
.card p { font-size: 17px; line-height: 26px; color: var(--muted-3); flex: 1; }
.card-cta { margin-top: 11px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; line-height: 1.31; color: var(--accent); }
.card-cta svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
@media (min-width: 1200px) {
  /* the four-across row is the Figma layout, so its spacing scales with it */
  .card-body { padding: calc(26 * var(--k)) calc(28 * var(--k)); }
  .card-meta { margin-bottom: calc(12 * var(--k)); }
  .card h3 { margin-bottom: calc(7 * var(--k)); }
  .card-cta { margin-top: calc(11 * var(--k)); }
  /* with a 15px floor the description keeps its three lines down to ~1440 */
  .card p { font-size: max(15px, calc(17 * var(--k))); line-height: 1.53; }
}
@media (hover: hover) {
  .card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -24px rgba(46, 26, 34, .35); border-color: #e2cfce; }
  /* the TravelHub card's picture is an inline SVG, not an <img>, so it needs its own zoom */
  .card:hover .card-media img, .card:hover .mock-th .th-phone { transform: scale(1.04); }
  .card:hover .card-cta svg { transform: translateX(4px); }
}

/* TravelHub card art — Figma 66:520 is 372.7 x 230: the trips-home phone on a
   coral-to-white wash, clipped to the top 208px of the device. The phone itself
   is generated from the .fig, so this only has to place and crop it. */
/* The wash is pink at the top (66:520's gradient runs top→bottom; shot 1 agrees). */
.mock-th { background: linear-gradient(to bottom, rgba(255, 188, 164, .5) 0%, #ffffff 78.2%); position: relative; overflow: hidden; container-type: inline-size; }
.mock-th .th-phone {
  position: absolute;
  left: 7.6%;            /* 28.33 / 372.7 */
  top: 9.57%;            /* 22 / 230     */
  width: 84.79%;         /* 316 / 372.7  */
  height: auto;
  /* 66:525: a 1px ring @5% and 0 30 60 rgba(20,18,12,.16), in card widths (cqw)
     so the shadow shrinks with the phone; px first as the fallback */
  filter: drop-shadow(0 0 1px rgba(20, 18, 12, .05)) drop-shadow(0 30px 60px rgba(20, 18, 12, .16));
  filter: drop-shadow(0 0 1px rgba(20, 18, 12, .05)) drop-shadow(0 8.05cqw 16.1cqw rgba(20, 18, 12, .16));
  transform-origin: 50% 0; transition: transform .6s var(--ease);
}

/* ---------- about ---------- */
.about { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 64px 0 80px; }
.about-grid { display: grid; gap: 40px; margin-top: 60px; align-items: start; }
.about-photo { position: relative; width: min(340px, 100%); margin-inline: auto; }
/* Moran 2026-09-29: no backing card behind the photo (18:582 has none) */
.about-photo img { position: relative; width: 100%; height: auto; aspect-ratio: 340 / 420; object-fit: cover; border-radius: var(--r-photo); }
.about-text .h2 { font-size: clamp(32px, 2.6vw, 50px); line-height: 1.12; max-width: 835px; }
.about-text p { margin-top: 32px; font-size: clamp(18px, 1.15vw, 22px); line-height: 1.6; color: var(--body); max-width: 1200px; }
.about-text p + p:not(.strong) { margin-top: 16px; }
.about-text .strong { font-weight: 600; }
.skills { margin-top: 64px; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr; }
.skill { padding: 28px 0 0; }
.skill dt { font-family: var(--mono); font-size: 14px; letter-spacing: .78px; text-transform: uppercase; color: var(--muted); }
.skill dd { margin: 16px 0 0; font-size: 18px; line-height: 28px; color: var(--body-2); }
.skill dd span { white-space: nowrap; }
@media (min-width: 640px) { .skills { grid-template-columns: repeat(2, 1fr); gap: 0 40px; }
  .skill dd { font-size: 20px; line-height: 30px; } }
@media (min-width: 1024px) {
  /* Figma 18:578: 159 from the skills row to the section's end (the dl's default
     1em margin is dropped so the number is the whole gap) */
  .about { padding: calc(96 * var(--k)) 0 calc(159 * var(--k)); }
  /* 18:579 → 18:581: 86 from the bottom of "About me" to the photo and heading */
  /* 18:581 is 436 tall (not the photo's 420), so the skills rule sits 86 below that */
  .about-grid { grid-template-columns: calc(340 * var(--k)) minmax(0, 1fr); gap: calc(64 * var(--k)); align-items: start; margin-top: calc(86 * var(--k)); min-height: calc(436 * var(--k)); }
  /* Figma: photo is exactly 340×420; 18:583 sits at (+12, -12) in its column, so its
     top is 12 above the heading's (Moran 2026-09-29) */
  .about-photo img { width: calc(340 * var(--k)); height: calc(420 * var(--k)); left: calc(12 * var(--k)); top: calc(-12 * var(--k)); }
  /* 18:603 is one text box with a hard return, so the two paragraphs sit line on
     line; 40 below the heading, 18 above "Good design…" (73:587) */
  .about-text .h2 + p { margin-top: calc(40 * var(--k)); }
  .about-text p + p:not(.strong) { margin-top: 0; }
  .about-text .strong { margin-top: calc(18 * var(--k)); }
  /* Moran 2026-09-29: inset as in Figma. 18:606's rule spans the full 1660, but its
     four 393.3 columns are centred inside it, 43 in — first text at x 173 */
  .skills { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: calc(86 * var(--k)); margin-bottom: 0; padding-inline: calc(43.4 * var(--k)); }
  /* 18:607 / 18:617 / 18:612 / 28:2: text 40 after each divider; 40 before the
     divider only on columns 1 and 3 — 2 and 4 run to their edge (text 353 wide),
     which keeps "Information architecture · Prioritization" on one line */
  .skill { padding: calc(36 * var(--k)) 0 0 0; }
  .skill:nth-child(odd) { padding-right: calc(40 * var(--k)); }
  .skill + .skill { padding-left: calc(40 * var(--k)); }
  .skill:not(:last-child) { border-right: 1px solid var(--border); }
  .skill dd { margin-top: calc(16 * var(--k)); font-size: max(16px, calc(20 * var(--k))); line-height: 1.5; }
}

/* ---------- footer / contact ---------- */
.footer { background: var(--plum); color: var(--on-plum); padding: 96px 0 36px; }
.footer-top { display: grid; gap: 48px; padding-bottom: 56px; border-bottom: 1px solid var(--plum-border); }
.footer .label { border: 0; padding: 0; font-size: 20px; color: var(--rose); }
.footer .h2 { color: var(--on-plum); font-weight: 800; font-size: clamp(44px, 3.85vw, 74px); line-height: 1; letter-spacing: -0.03em; margin: 22px 0 30px; }
.footer .btn-rose svg { width: 20px; height: 20px; animation: nudge 3.6s ease-in-out infinite; transition: transform .3s var(--ease); }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@media (hover: hover) { .footer .btn-rose:hover svg { animation: none; transform: translateX(8px); } }
.elsewhere .label { color: var(--rose-muted); letter-spacing: 1.04px; }
.elsewhere ul { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 16px; }
.elsewhere a { font-size: 19px; line-height: 1.31; color: var(--on-plum-link); transition: color .2s; }
@media (min-width: 1024px) { .elsewhere .label { margin-top: calc(8 * var(--k)); } }
@media (hover: hover) { .elsewhere a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; } }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 30px; padding-bottom: 0; }
.footer-bottom .brand { color: var(--on-plum); font-size: 22px; }
.footer-bottom .brand-mark { background: var(--rose); color: var(--plum); width: 37px; height: 37px; }
.footer-bottom small { font-size: 18px; color: var(--rose-muted); }
@media (min-width: 1024px) {
  /* Figma: 103 below the bottom row, of which 30 is already .footer-bottom's padding-top */
  /* Figma 18:623 / 255:6135 has 283 from the email button to the rule and 153 under the brand row;
     Itzik asked for it a bit shorter (2026-09-29): 190 / 110 */
  .footer { padding: calc(155 * var(--k)) 0 calc(110 * var(--k)); }
  .footer-top { grid-template-columns: minmax(0, 1fr) auto; gap: calc(196 * var(--k)); padding-bottom: calc(190 * var(--k)); }
  .footer-bottom small { font-size: 22px; }
  /* 18:624 / 18:633: 22 / 30 around the h2, 20 label→links, 16 between links */
  .footer .h2 { margin: calc(22 * var(--k)) 0 calc(30 * var(--k)); }
  .elsewhere ul { margin-top: calc(20 * var(--k)); gap: calc(16 * var(--k)); }
  .footer-bottom { padding-top: calc(30 * var(--k)); }
}

/* ---------- back to top ---------- */
.to-top {
  /* bottom right: the convention on a left-to-right site (Itzik 2026-09-29) */
  position: fixed; right: 28px; bottom: 28px; z-index: 40;
  width: 59px; height: 59px; border-radius: 50%;
  /* Figma: fill #FFFFFF 45% · stroke #8A2C46 3px inside · drop shadow 4/7 blur 12.1 #000 12% · glass (frost 100) */
  background: rgba(255,255,255,.45);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: inset 0 0 0 3px var(--cs-accent, var(--accent)), 4px 7px 12.1px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.7);
  color: var(--cs-accent, var(--accent));
  display: grid; place-items: center;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
/* over the footer it takes the footer's palette instead of the case accent */
.to-top {
  transition: opacity .3s, transform .3s var(--ease),
              box-shadow .3s var(--ease), color .3s var(--ease), background-color .3s var(--ease);
}
.to-top.on-footer {
  background: rgba(74, 26, 46, .45);
  box-shadow: inset 0 0 0 3px var(--rose), 4px 7px 12.1px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .18);
  color: var(--rose);
}
.to-top svg { width: 22px; height: 22px; }
/* phones: smaller, on the right where lines end ragged, clear of the home indicator;
   js/site.js only shows it while scrolling up */
@media (max-width: 767px) {
  .to-top { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 46px; height: 46px; }
  .to-top svg { width: 18px; height: 18px; }
}

/* ---------- scroll reveal ----------
   Content is visible by default. The animation only exists once site.js has
   set .reveal-ready on <html>, so with JS off — or if the script throws before
   it gets there — the page is fully readable instead of blank. */
.reveal { opacity: 1; transform: none; }
.reveal-ready .reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.reveal-ready .reveal.in { opacity: 1; transform: none; }
.reveal-ready .reveal[data-delay="1"] { transition-delay: .1s; }
.reveal-ready .reveal[data-delay="2"] { transition-delay: .2s; }
.reveal-ready .reveal[data-delay="3"] { transition-delay: .3s; }

/* ---------- splash ----------
   Plays on the first page of a visit and on every refresh (js/splash.js adds
   .splash-seen when moving between pages
   visits). It must never be able to hide the page, so the *declared* state is
   hidden and the animation owns the visible phase — if the animation does not
   run (reduced motion, old browser, CSS error) the splash simply is not there,
   and if JS does not run it still lifts itself after ~2.6s. Same rule as
   .reveal in CLAUDE.md §6: the un-animated fallback is the readable page. */
.splash {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: var(--plum); color: var(--on-plum);
  visibility: hidden;
  animation: splash-out 5.2s var(--ease) both;
}
.splash-in { display: grid; justify-items: center; gap: 22px; padding: 0 24px; text-align: center; animation: splash-lift 5.2s var(--ease) both; }
.splash-name {
  margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .26em;
  font-weight: 800; font-size: clamp(40px, 6vw, 104px); line-height: 1.05; letter-spacing: -0.03em;
}
.splash-name > span { display: inline-block; overflow: hidden; padding-bottom: .06em; }
.splash-name b { display: inline-block; font-weight: inherit; animation: splash-rise 1.6s var(--ease) .35s both; }
.splash-name > span + span b { animation-delay: .6s; }
.splash-bar {
  display: block; width: min(420px, 70vw); height: 1px; background: var(--rose);
  transform-origin: center; animation: splash-bar 1.8s var(--ease) 1.1s both;
}
.splash-role {
  margin: 0; display: flex; align-items: center;
  font-family: var(--mono); font-size: clamp(13px, 1.05vw, 18px); letter-spacing: .12em;
  text-transform: uppercase; color: var(--rose);
}
/* mono, so every glyph is 1ch + the tracking: typing is a width animation in 24 steps */
.splash-role span {
  display: inline-block; overflow: hidden; white-space: nowrap;
  width: calc(24 * (1ch + .12em)); animation: splash-type 1.5s steps(24, end) 1.6s both;
}
.splash-role i { display: inline-block; width: 2px; height: 1.2em; margin-left: 4px; background: var(--rose); animation: splash-caret .6s steps(1) 1.6s 7 both; }
.splash-seen .splash, .splash-skip .splash { display: none; }

@keyframes splash-out {
  0%, 72% { visibility: visible; transform: none; }
  100% { visibility: hidden; transform: translateY(-100%); }
}
@keyframes splash-lift {
  0%, 68% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-48px); }
}
@keyframes splash-rise { from { transform: translateY(110%); } to { transform: none; } }
@keyframes splash-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes splash-type { from { width: 0; } }
@keyframes splash-caret { 50% { opacity: 0; } }

/* the home hero art would otherwise play its entrance behind the splash */
html:not(.splash-seen):not(.splash-skip) .hero-art img { animation-delay: 4s, 5.5s; }

@media (prefers-reduced-motion: reduce) {
  .splash { display: none; }
  html:not(.splash-seen):not(.splash-skip) .hero-art img { animation-delay: 0s, 0s; }
}

/* ---------- reduced motion: everything static ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal, .reveal-ready .reveal { opacity: 1; transform: none; }
}
