/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Palette — warm paper + ink + teal accent (deliberately not
     cream/terracotta, not near-black+neon, not broadsheet) */
  --paper: #FAF9F6;
  --surface: #FFFFFF;
  --ink: #14151A;
  --ink-soft: #33343C;
  --muted: #6B6C76;
  --faint: #9A9AA4;
  --line: #E7E5DF;

  --teal: #64c6c6;
  --teal-tint: #e7f5f5;
  --teal-deep: #207777;
  --gold: #C7A24A;

  --on-dark: #F3F1EC;
  --on-dark-muted: #A8A9B4;

  /* Type */
  --serif: 'Fraunces', 'Iowan Old Style', 'Georgia', serif;
  --sans: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  /* Layout */
  --max: 1200px;
  --max-narrow: 760px;
  --gutter: 32px;

  --radius-sm: 4px;
  --radius: 10px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(20,21,26,0.05);
  --shadow-md: 0 16px 32px -12px rgba(20,21,26,0.18);
  --shadow-lg: 0 32px 64px -16px rgba(20,21,26,0.28);
  --shadow-teal: 0 20px 40px -14px rgba(36, 122, 113, 0.35);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--teal); color: var(--on-dark); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

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

.wrap-narrow {
  max-width: var(--max-narrow);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

em { font-family: var(--serif); font-style: italic; color: var(--teal); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--teal);
}

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn-primary { background: var(--teal); color: var(--on-dark); box-shadow: var(--shadow-teal); }
.btn-primary:hover { transform: translateY(-2px); background: var(--teal-deep); }

.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.btn-on-dark { border-color: rgba(243,241,236,0.3); color: var(--on-dark); }
.btn-on-dark:hover { border-color: var(--on-dark); background: rgba(243,241,236,0.08); transform: translateY(-2px); }

.btn-arrow::after { content: "→"; transition: transform 0.2s ease; }
.btn:hover .btn-arrow::after,
.btn.btn-arrow:hover::after { transform: translateX(3px); }

/* ============================================================
   NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,249,246,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
}

.brand .mark {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--on-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--gutter);
}

.nav-links a:not(.btn) {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
}

.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-links a:not(.btn):hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  align-items: center;
  justify-content: center;
}

.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 16px; height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -5px; }
.nav-toggle span::after { position: absolute; top: 5px; }

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 76px 0 0 0;
    background: var(--paper);
    flex-direction: column;
    justify-content: center;
    gap: var(--gutter);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a:not(.btn) { font-family: var(--serif); font-size: 28px; }
  .nav-toggle { display: flex; }
  .nav-toggle.open span { background: transparent; }
  .nav-toggle.open span::before { transform: translateY(5px) rotate(45deg); }
  .nav-toggle.open span::after { transform: translateY(-5px) rotate(-45deg); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 96px 0 64px;
  position: relative;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 1.04;
  margin-top: 18px;
}

.hero .lede {
  max-width: 46ch;
  color: var(--muted);
  font-size: 19px;
  margin-top: 22px;
}

.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hero-stats .stat b {
  display: block;
  font-family: var(--serif);
  font-size: 28px;
}

.hero-stats .stat span {
  font-size: 13px;
  color: var(--muted);
}

/* Hero mockup visual */
.hero-mock {
  position: relative;
}

.mock-frame {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}

.mock-topbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.mock-topbar span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--line);
}

.mock-body {
  padding: 28px;
  background:
    linear-gradient(135deg, var(--teal-tint), #FFFFFF 60%);
  min-height: 320px;
  position: relative;
}

.mock-line { height: 10px; border-radius: 5px; background: rgba(20,21,26,0.08); margin-bottom: 12px; }
.mock-line.short { width: 40%; }
.mock-line.medium { width: 65%; }
.mock-line.wide { width: 90%; }

.mock-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 18px;
  margin-top: 22px;
  width: 68%;
}

.mock-card .dot { width: 30px; height: 30px; border-radius: 50%; background: var(--teal); margin-bottom: 14px; }

.floating-badge {
  position: absolute;
  background: var(--ink);
  color: var(--on-dark);
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 8px;
}

.floating-badge.b1 { top: -18px; right: 12px; animation: float-a 6s ease-in-out infinite; }
.floating-badge.b2 { bottom: -16px; left: -20px; animation: float-b 7s ease-in-out infinite; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }

.floating-badge .dot-live { width: 6px; height: 6px; border-radius: 50%; background: #4ADE80; }

@keyframes float-a { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes float-b { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ============================================================
   MARQUEE STRIP
   ============================================================ */
.marquee-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  padding: 22px 0;
}

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

.marquee-track span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--faint);
  padding: 0 28px;
  white-space: nowrap;
}

.marquee-track span.bullet { font-family: var(--sans); font-style: normal; color: var(--teal); }

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

/* ============================================================
   SECTION HEADS
   ============================================================ */
section { padding: 108px 0; }

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

.section-head h2 {
  font-size: clamp(32px, 4vw, 46px);
  margin-top: 14px;
  max-width: 16ch;
}

.section-head .section-note {
  max-width: 34ch;
  color: var(--muted);
  font-size: 15px;
}

/* ============================================================
   WORK — alternating showcase rows
   ============================================================ */
.work-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

.work-row:first-child { padding-top: 0; }
.work-row:last-child { border-bottom: none; padding-bottom: 0; }

.work-row:nth-child(even) .work-media { order: 2; }

.work-media {
  aspect-ratio: 4 / 3.1;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.work-row:hover .work-media { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.work-media .dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.55) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  opacity: 0.5;
}

.work-media .index-mark {
  position: absolute;
  bottom: 20px; right: 24px;
  font-family: var(--mono);
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  background: rgba(20,21,26,0.35);
  padding: 6px 12px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.work-info .index-label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--teal);
  margin-bottom: 12px;
  display: block;
}

.work-info h3 { font-size: 30px; margin-bottom: 14px; }

.work-info p { color: var(--muted); margin-bottom: 20px; max-width: 46ch; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }

.tag {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--teal);
  background: var(--teal-tint);
  padding: 5px 12px;
  border-radius: 999px;
}

.work-link {
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}

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

@media (max-width: 860px) {
  .work-row { grid-template-columns: 1fr; gap: 28px; }
  .work-row:nth-child(even) .work-media { order: 0; }
}

/* ============================================================
   DARK SECTION — process / approach
   ============================================================ */
.dark-section {
  background: var(--ink);
  color: var(--on-dark);
  border-radius: var(--radius-lg);
  margin: 0 var(--gutter);
  padding: 96px var(--gutter);
}

@media (min-width: 1264px) {
  .dark-section { margin: 0 auto; max-width: var(--max); }
}

.dark-section .eyebrow { color: var(--gold); }
.dark-section .eyebrow::before { background: var(--gold); }
.dark-section h2 { color: var(--on-dark); }
.dark-section .section-note { color: var(--on-dark-muted); }

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 64px;
}

@media (max-width: 900px) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .process-grid { grid-template-columns: 1fr; }
}

.process-step .num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 34px;
  color: var(--gold);
  margin-bottom: 18px;
}

.process-step h4 { color: var(--on-dark); font-size: 18px; margin-bottom: 10px; }
.process-step p { color: var(--on-dark-muted); font-size: 14.5px; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
}

@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }

.about-portrait {
  aspect-ratio: 0.85;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--ink) 0%, var(--teal-deep) 100%);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-portrait::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 18px 18px;
}

.about-portrait .initials {
  position: absolute; bottom: 28px; left: 28px;
  font-family: var(--serif);
  font-size: 56px;
  color: var(--on-dark);
}

.about-copy p { color: var(--muted); margin-bottom: 18px; max-width: 54ch; }

.skill-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 900px) { .testimonial-grid { grid-template-columns: 1fr; } }

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.testimonial-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

.testimonial-card .quote-mark {
  font-family: var(--serif);
  font-size: 44px;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 12px;
}

.testimonial-card p.quote {
  color: var(--ink-soft);
  flex: 1;
  margin-bottom: 24px;
}

.testimonial-author { display: flex; align-items: center; gap: 12px; }

.testimonial-author .avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--teal-tint);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}

.testimonial-author .name { font-weight: 600; font-size: 14.5px; }
.testimonial-author .role { font-size: 13px; color: var(--muted); }

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  background: linear-gradient(120deg, var(--teal), var(--teal-deep));
  border-radius: var(--radius-lg);
  margin: 0 var(--gutter);
  padding: 80px var(--gutter);
  text-align: center;
  position: relative;
  overflow: hidden;
}

@media (min-width: 1264px) {
  .cta-band { margin: 0 auto; max-width: var(--max); }
}

.cta-band::before {
  content: "";
  position: absolute;
  top: -30%; left: 50%;
  width: 500px; height: 500px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,255,255,0.14), transparent 70%);
}

.cta-band .eyebrow { color: var(--on-dark); opacity: 0.85; justify-content: center; }
.cta-band .eyebrow::before { background: var(--on-dark); }

.cta-band h2 {
  color: var(--on-dark);
  font-size: clamp(30px, 4.4vw, 48px);
  margin: 18px auto 30px;
  max-width: 20ch;
}

.cta-band .btn-primary { background: var(--on-dark); color: var(--teal-deep); box-shadow: none; }
.cta-band .btn-primary:hover { background: #fff; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: var(--on-dark);
  margin-top: 108px;
  padding-top: 88px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(243,241,236,0.12);
}

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand .brand { color: var(--on-dark); }
.footer-brand .brand .mark { background: var(--on-dark); color: var(--ink); }
.footer-brand p { color: var(--on-dark-muted); margin-top: 16px; max-width: 32ch; font-size: 14.5px; }

.footer-col h5 {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  margin-bottom: 18px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 14.5px; color: var(--on-dark); opacity: 0.85; transition: opacity 0.15s ease; }
.footer-col a:hover { opacity: 1; color: var(--gold); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
  font-size: 13px;
  color: var(--on-dark-muted);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom a:hover { color: var(--gold); }

/* ============================================================
   PROJECT DETAIL PAGE
   ============================================================ */
.project-hero { padding: 64px 0 0; }

.back-link {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--muted);
  display: inline-flex;
  gap: 8px;
  margin-bottom: 28px;
}
.back-link:hover { color: var(--teal); }

.project-hero h1 { font-size: clamp(34px, 5vw, 54px); max-width: 18ch; }
.project-hero .lede { color: var(--muted); font-size: 18px; margin-top: 18px; max-width: 50ch; }

.meta-row {
  display: flex;
  gap: 48px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.meta-item .label {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.meta-item .value { font-size: 15px; font-weight: 500; }

.project-media-lg {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  margin: 56px 0;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.project-media-lg .dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.5) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  opacity: 0.45;
}

.project-body-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
}

@media (max-width: 860px) { .project-body-grid { grid-template-columns: 1fr; } }

.project-content h2 { font-size: 24px; margin: 40px 0 14px; }
.project-content h2:first-child { margin-top: 0; }
.project-content p { color: var(--muted); margin-bottom: 16px; }

.project-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}

.project-gallery .g-item {
  aspect-ratio: 1;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-card h5 {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--faint);
  margin-bottom: 18px;
}

.sidebar-card .meta-item { margin-bottom: 18px; }
.sidebar-card .meta-item:last-of-type { margin-bottom: 24px; }

.project-nav-links {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 88px;
  padding-top: 32px;
}

.project-nav-links a { font-family: var(--mono); font-size: 14px; }
.project-nav-links a:hover { color: var(--teal); }

/* ============================================================
   PASSWORD LOCK GATE
   ============================================================ */
.lock-panel {
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  box-shadow: var(--shadow-md);
}

.lock-icon { font-size: 34px; margin-bottom: 16px; }

.lock-panel h3 { font-size: 22px; margin-bottom: 12px; }

.lock-panel p { color: var(--muted); font-size: 15px; margin-bottom: 24px; }

.lock-panel form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.lock-panel input[type="password"] {
  flex: 1;
  min-width: 180px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--sans);
}

.lock-panel input[type="password"]:focus {
  outline: none;
  border-color: var(--teal);
}

.lock-error {
  color: var(--teal);
  font-size: 13.5px;
  margin-top: 14px;
  margin-bottom: 0;
  min-height: 18px;
}
