/* ============================================================
   Gal Zakin — Portfolio
   Design tokens — fixed 5-color palette:
   navy #041624 · teal #16606c · cream #fbedd6 · orange #fc7d02 · rust #77290f
   Light sections: cream + teal. Dark band: navy + orange. Footer: teal.
   ============================================================ */
:root {
  /* Light pages: cream + teal */
  --bg: #f7f0e2;
  --bg-raise: #fff7e9;
  --card: #fffaf0;
  --ink: #071e2c;
  --ink-soft: #42525c;
  --muted: #837d71;
  --accent: #16606c;
  --accent-deep: #0f4b55;
  --accent-ink: #fbedd6;
  --glow1: rgba(22, 96, 108, 0.14);
  --glow2: rgba(252, 125, 2, 0.12);
  --line: rgba(7, 30, 44, 0.16);
  --line-soft: rgba(7, 30, 44, 0.08);
  --nav-bg: rgba(247, 240, 226, 0.82);
  --footer-bg: #16606c;
  --footer-ink: #fbedd6;
  --shadow-card: 0 2px 6px rgba(7, 30, 44, 0.05), 0 20px 46px -20px rgba(7, 30, 44, 0.25);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-btn: 999px;
  --font-display: "Geist", "Inter", sans-serif;
  --display-weight: 700;
  --display-tracking: -0.03em;
  --em-style: normal;
  --font-body: "Geist", -apple-system, "Segoe UI", sans-serif;
  --maxw: 1120px;
  --maxw-text: 720px;
}

/* ============================================================
   Dark hero band (homepage only). Same family as the light pages —
   a literal inversion: the light pages' ink becomes the canvas,
   their cream becomes the ink, and the SAME teal (#16606c) fills
   buttons; a lighter tint of it carries text accents on dark.
   ============================================================ */
.dark-band {
  --bg: #071e2c;
  --ink: #fbedd6;
  --ink-soft: #d8cbb2;
  --accent-2: #5cabb8;
  --line: rgba(251, 237, 214, 0.18);
  --line-soft: rgba(251, 237, 214, 0.08);
  --glow1: rgba(22, 96, 108, 0.35);
  --glow2: rgba(92, 171, 184, 0.14);
  --font-display: "Anton", "Geist", sans-serif;
  --display-weight: 400;
  --display-tracking: 0.015em;
  background: var(--bg);
  color: var(--ink);
}

/* Poster-type treatment: tall condensed uppercase display headings */
.dark-band h1,
.dark-band h2,
.dark-band h3 {
  text-transform: uppercase;
  line-height: 1;
}

.dark-band .hero h1 {
  font-size: clamp(3.6rem, 13vw, 10rem);
  line-height: 0.9;
  margin: 26px 0 30px;
}

.dark-band .hero h1 em { color: var(--accent-2); }

/* Deliberate glyph overlap: the closing period sits at the end of the
   word, its left edge slipping just behind the R's right leg */
.hero h1 .tuck {
  display: inline-block;
  margin-left: -0.15em;
  position: relative;
  z-index: -1;
}

.hero-intro {
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0 0 34px;
}

/* Case-study cards keep a dark surface; quote cards stay the
   default light card, matching the About page's testimonials. */
.work-card {
  --card: #0e2b3c;
  --ink: #fbedd6;
  --ink-soft: #d8cbb2;
  --accent-2: #5cabb8;
  --line: rgba(251, 237, 214, 0.18);
  --line-soft: rgba(251, 237, 214, 0.08);
  --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.1), 0 18px 40px -18px rgba(0, 0, 0, 0.4);
  color: var(--ink);
}
.work-card .work-link { color: var(--accent-2); }

/* ============================================================
   Poster font cameos on the light pages: only the big headlines
   ============================================================ */
.section-head h2,
.case-hero h1,
.next-case h2,
.footer h2 {
  font-family: "Anton", var(--font-display);
  font-weight: 400;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  line-height: 1.02;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.35s ease, color 0.35s ease;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

::selection { background: var(--accent); color: var(--accent-ink); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   Typography helpers
   ============================================================ */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: var(--display-weight, 700);
  line-height: 1.08;
  letter-spacing: var(--display-tracking, -0.02em);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2, var(--accent));
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1.5px;
  background: var(--accent-2, var(--accent));
}

.lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 46ch;
}

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

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }

.nav-cta {
  padding: 10px 20px;
  border-radius: var(--radius-btn);
  background: var(--accent);
  color: var(--accent-ink) !important;
  font-weight: 600;
  transition: background 0.2s;
}

.nav-cta:hover { background: var(--accent-deep, var(--accent)); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s, opacity 0.25s;
}

/* ============================================================
   Hero (home)
   ============================================================ */
.hero {
  padding: 190px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.hero::before {
  width: 560px;
  height: 560px;
  top: -220px;
  right: -140px;
  background: radial-gradient(circle, var(--glow1), transparent 65%);
  animation: drift1 16s ease-in-out infinite;
}

.hero::after {
  width: 460px;
  height: 460px;
  bottom: -220px;
  left: -140px;
  background: radial-gradient(circle, var(--glow2), transparent 65%);
  animation: drift2 20s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 30px) scale(1.08); }
}

@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -25px) scale(1.05); }
}

.hero .wrap { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(2.8rem, 6.6vw, 5rem);
  max-width: 15ch;
  margin: 22px 0 26px;
}

.hero h1 em {
  font-style: var(--em-style, normal);
  color: var(--accent);
}

.hero .lede { margin-bottom: 38px; }

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s, color 0.2s;
}

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover {
  background: var(--accent-deep, var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--accent) 50%, transparent);
}

.btn-ghost {
  border: 1.5px solid var(--line);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn svg { width: 17px; height: 17px; }

/* Fact strip */
.facts {
  margin-top: 84px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.fact { padding: 28px 28px 0 0; }

.fact strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.15;
}

.fact span { font-size: 0.92rem; color: var(--muted); }

/* ============================================================
   Marquee
   ============================================================ */
.marquee {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  padding: 18px 0;
  user-select: none;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}

.marquee span {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.marquee span::after {
  content: "✦";
  margin: 0 28px;
  color: var(--accent);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .hero::before, .hero::after { animation: none; }
  .case-figure img { transition: none; transform: none; }
}

/* ============================================================
   Sections
   ============================================================ */
.section { padding: 90px 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 54px;
}

.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-top: 14px; }

/* ============================================================
   Work cards
   ============================================================ */
.work-list { display: grid; gap: 36px; }

.work-card {
  display: grid;
  grid-template-columns: 5fr 6fr;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.work-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.work-card .work-copy { padding: 52px 48px; }

.work-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
}

.work-card h3 { font-size: 1.85rem; margin-bottom: 14px; }

.work-card p { color: var(--ink-soft); font-size: 1rem; margin-bottom: 26px; }

.work-link {
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
}

.work-link::after { content: "→"; transition: transform 0.2s; }
.work-card:hover .work-link::after { transform: translateX(5px); }

.work-media { align-self: stretch; min-height: 340px; position: relative; overflow: hidden; }

.work-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.work-card:hover .work-media img { transform: scale(1.03); }

/* secondary (demoted) card */
.work-card.small {
  grid-template-columns: 6fr 5fr;
  max-width: 780px;
}

.work-card.small .work-copy { padding: 38px 40px; }
.work-card.small h3 { font-size: 1.45rem; }
.work-card.small .work-media { min-height: 240px; }

/* ============================================================
   Quotes
   ============================================================ */
.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.quote {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow-card);
}

.quote::before {
  content: "“";
  font-family: var(--font-display);
  font-size: 3.4rem;
  line-height: 0.6;
  color: var(--accent);
  display: block;
}

.quote blockquote {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.quote figcaption { font-size: 0.9rem; color: var(--muted); margin-top: auto; }
.quote figcaption strong { color: var(--ink); display: block; font-weight: 600; }

/* ============================================================
   About teaser / about page
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 70px;
  align-items: start;
}

.portrait {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 110px;
}

.about-body h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: 14px 0 22px; }
.about-body p { color: var(--ink-soft); margin-bottom: 18px; max-width: 62ch; }
.about-body p strong { color: var(--ink); }

/* timeline */
.timeline { margin: 26px 0 10px; border-top: 1px solid var(--line); }

.tl-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.tl-when { font-size: 0.9rem; color: var(--muted); padding-top: 3px; font-weight: 500; }

.tl-what strong { display: block; font-weight: 600; }
.tl-what span { font-size: 0.95rem; color: var(--ink-soft); }

/* skills */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.chip {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.subhead {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 46px;
}

/* ============================================================
   Case study pages
   ============================================================ */
.case-hero { padding: 170px 0 60px; position: relative; overflow: hidden; }

.case-hero::before {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  top: -240px;
  right: -160px;
  border-radius: 50%;
  filter: blur(90px);
  background: radial-gradient(circle, var(--glow1), transparent 65%);
  pointer-events: none;
}

.case-hero .wrap { position: relative; z-index: 1; }

.case-hero h1 { font-size: clamp(2.4rem, 5.4vw, 3.9rem); max-width: 21ch; margin: 20px 0 20px; }

.case-hero .lede { max-width: 60ch; }

.case-meta {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}

.case-meta div dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.case-meta div dd { font-weight: 550; font-size: 0.98rem; }

.case-figure { margin: 40px 0; }

.case-figure img {
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-card);
}

.case-figure figcaption {
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: var(--maxw-text);
}

.case-section { padding: 44px 0; }

.case-section .text { max-width: var(--maxw-text); }

.case-section h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin: 12px 0 20px;
}

.case-section p { color: var(--ink-soft); margin-bottom: 18px; }
.case-section p strong, .case-section li strong { color: var(--ink); }

.case-section ul { margin: 0 0 18px 20px; color: var(--ink-soft); }
.case-section li { margin-bottom: 12px; }

/* tl;dr box */
.tldr {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 30px 34px;
  margin: 56px 0 8px;
  box-shadow: var(--shadow-card);
}

.tldr h2 { font-size: 1rem; font-family: var(--font-display); font-weight: 700; margin-bottom: 10px; }
.tldr p { color: var(--ink-soft); margin: 0; font-size: 1rem; }

/* results stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 34px 0 10px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-card);
}

.stat strong {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  line-height: 1.1;
  margin-bottom: 8px;
}

.stat span { color: var(--ink-soft); font-size: 0.95rem; }

/* pull quote inside case */
.case-pull {
  border-left: 3px solid var(--accent);
  padding-left: 26px;
  margin: 34px 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.45;
  max-width: 32ch;
}

/* next project footer */
.next-case {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  padding: 70px 0 90px;
}

.next-case a {
  text-decoration: none;
  display: block;
}

.next-case .eyebrow { margin-bottom: 14px; }

.next-case h2 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  display: inline-flex;
  align-items: center;
  gap: 18px;
  transition: color 0.2s;
}

.next-case a:hover h2 { color: var(--accent); }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: 100px 0 46px;
  border-radius: 34px 34px 0 0;
  margin-top: -34px;
  position: relative;
}

.footer .eyebrow { color: color-mix(in srgb, var(--footer-ink) 70%, transparent); }
.footer .eyebrow::before { background: var(--footer-ink); }

.footer h2 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  margin: 18px 0 30px;
  max-width: 18ch;
}

.footer-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 80px; }

.footer .btn-primary { background: var(--footer-ink); color: var(--footer-bg); }
.footer .btn-primary:hover {
  box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--footer-ink) 40%, transparent);
}

.footer .btn-ghost {
  border-color: color-mix(in srgb, var(--footer-ink) 35%, transparent);
  color: var(--footer-ink);
}
.footer .btn-ghost:hover { border-color: var(--footer-ink); color: var(--footer-ink); }

.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid color-mix(in srgb, var(--footer-ink) 20%, transparent);
  padding-top: 28px;
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--footer-ink) 75%, transparent);
}

.footer-base nav { display: flex; gap: 26px; }
.footer-base a { color: var(--footer-ink); text-decoration: none; font-weight: 500; }
.footer-base a:hover { text-decoration: underline; }

/* ============================================================
   Reveal animation
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in { opacity: 1; transform: none; }

/* Staggered hero entrance */
.hero h1 { display: flex; flex-direction: column; }
.hero h1 .line { display: block; }

.hero-stagger.d0 { transition-delay: 0s; }
.hero-stagger.d1 { transition-delay: 0.1s; }
.hero-stagger.d2 { transition-delay: 0.22s; }
.hero-stagger.d3 { transition-delay: 0.34s; }
.hero-stagger.d4 { transition-delay: 0.46s; }
.hero-stagger.d5 { transition-delay: 0.58s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .work-card, .work-card.small { grid-template-columns: 1fr; }
  .work-media { min-height: 260px; order: -1; }
  .work-card .work-copy { padding: 34px 30px; }
  .quotes { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .portrait { position: static; max-width: 380px; }
  .case-meta { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 6px; }
  .fact { padding: 18px 0 0; }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    top: 72px;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 18px 24px 26px;
    display: none;
  }

  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; font-size: 1.1rem; }
  .nav-links .nav-cta { display: inline-flex; margin-top: 10px; padding: 12px 24px; }

  .nav-toggle { display: flex; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .hero { padding: 150px 0 70px; }
  .section { padding: 64px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
}

