/* ─── Autelli Productions ─ autelli.css ─────────────────────────── */

/* 1. Variables ───────────────────────────────────────────────────── */
:root {
  --parchment:      #F5F0E8;
  --parchment-dark: #EDE7D9;
  --ink:            #1C1917;
  --ink-secondary:  #6B6560;
  --ink-tertiary:   #9C9690;
  --vert:           #2D5A3D;
  --vert-light:     #EAF0EC;
  --rule:           #DDD8CF;
  --white:          #FDFCFA;

  --display-font: 'Playfair Display', Georgia, serif;
  --body-font:    'Lora', Georgia, serif;
  --label-font:   'DM Sans', system-ui, sans-serif;

  --text-xs:   11px;
  --text-sm:   14px;
  --text-base: 17px;
  --text-lg:   20px;
  --text-xl:   28px;
  --text-2xl:  38px;
  --text-3xl:  36px;
  --text-4xl:  44px;
}

/* 2. Reset ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; }
input, textarea, button { font-family: inherit; }

/* 3. Body & Paper Grain ──────────────────────────────────────────── */
body {
  background-color: var(--parchment);
  font-family: var(--body-font);
  font-size: var(--text-base);
  color: var(--ink);
  line-height: 1.75;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

body.no-scroll { overflow: hidden; }

/* 4. Layout ──────────────────────────────────────────────────────── */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

section { position: relative; z-index: 1; }

/* 5. Navigation ──────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--parchment);
  border-bottom: 1px solid transparent;
  transition: border-bottom-color 400ms ease;
}
#nav.nav--scrolled { border-bottom-color: var(--rule); }

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.nav-wordmark {
  font-family: var(--display-font);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.nav-links-desktop { display: none; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--ink);
}

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--parchment);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.nav-overlay.is-open { display: flex; }

.nav-overlay-close {
  position: absolute;
  top: 20px; right: 24px;
  font-family: var(--label-font);
  font-size: 18px;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 6px;
}

.nav-overlay-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
.nav-overlay-links a {
  font-family: var(--display-font);
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
  transition: color 200ms ease;
}
.nav-overlay-links a:hover { color: var(--ink-secondary); }

@media (min-width: 768px) {
  .nav-inner { padding: 0 40px; }
  .nav-links-desktop {
    display: flex;
    align-items: center;
    gap: 40px;
  }
  .nav-links-desktop a {
    font-family: var(--label-font);
    font-size: var(--text-sm);
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--ink-secondary);
    transition: color 200ms ease;
  }
  .nav-links-desktop a:hover { color: var(--ink); }
  .nav-links-desktop a.active {
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
    padding-bottom: 2px;
  }
  .nav-toggle { display: none; }
}

/* 6. Footer ──────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--rule);
  padding: 48px 0;
  position: relative;
  z-index: 1;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-inner span,
.footer-inner a {
  font-family: var(--label-font);
  font-size: 13px;
  color: var(--ink-secondary);
}
.footer-inner a { transition: color 200ms ease; }
.footer-inner a:hover { color: var(--ink); }

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
  }
}

/* 7. Section Label ───────────────────────────────────────────────── */
.section-label {
  font-family: var(--label-font);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vert);
  display: block;
  margin-bottom: 16px;
}

/* 8. Buttons ─────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--ink);
  color: var(--white);
  font-family: var(--label-font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 13px 32px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 200ms ease;
}
.btn-primary:hover { background: #2D2825; }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--ink);
  font-family: var(--label-font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 13px 32px;
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  transition: background 200ms ease;
}
.btn-secondary:hover { background: var(--parchment-dark); }

/* 9. Text Links ──────────────────────────────────────────────────── */
.text-link {
  font-family: var(--body-font);
  font-size: 15px;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-bottom-color 200ms ease;
}
.text-link:hover { border-bottom-color: var(--ink); }

/* 10. Scroll Reveal ──────────────────────────────────────────────── */
.js-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.js-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.js-stagger .js-reveal:nth-child(2) { transition-delay: 100ms; }
.js-stagger .js-reveal:nth-child(3) { transition-delay: 200ms; }
.js-stagger .js-reveal:nth-child(4) { transition-delay: 300ms; }
.js-stagger .js-reveal:nth-child(5) { transition-delay: 400ms; }
.js-stagger .js-reveal:nth-child(6) { transition-delay: 500ms; }

/* ─── PAGE: INDEX ─────────────────────────────────────────────────── */

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 96px 0 40px;
  position: relative;
}

.hero-rule {
  width: 40px;
  height: 1px;
  background: var(--rule);
  margin-bottom: 40px;
}

.hero-headline {
  font-family: var(--display-font);
  font-size: var(--text-4xl);
  font-weight: 400;
  line-height: 1.1;
  color: var(--ink);
}

.hero-sub {
  font-family: var(--body-font);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--ink-secondary);
  line-height: 1.6;
  max-width: 480px;
  margin-top: 28px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.hero-scroll-signal {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--label-font);
  font-size: 12px;
  color: var(--ink-tertiary);
  z-index: 1;
  user-select: none;
}

@media (min-width: 768px) {
  .hero { padding: 100px 0 40px; }
}

@media (min-width: 1024px) {
  :root { --text-4xl: 68px; --text-3xl: 52px; }
}

/* What This Is */
.what-this-is {
  background: var(--parchment-dark);
  padding: 80px 0;
}

.what-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.what-headline {
  font-family: var(--display-font);
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 28px;
}

.what-body p { max-width: 520px; }
.what-body p + p { margin-top: 20px; }

.pull-quote {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 28px 0;
}
.pull-quote q {
  font-family: var(--display-font);
  font-style: italic;
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.4;
  quotes: none;
  display: block;
}
.pull-quote cite {
  display: block;
  font-family: var(--label-font);
  font-size: 12px;
  color: var(--ink-secondary);
  font-style: normal;
  margin-top: 16px;
}

@media (min-width: 1024px) {
  .what-grid {
    grid-template-columns: 3fr 2fr;
    align-items: center;
    gap: 80px;
  }
}

/* Work Teaser (index) */
.work-teaser { padding: 64px 0; }

.work-rows { margin-bottom: 0; }

.work-row {
  border-top: 1px solid var(--rule);
  padding: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.work-row:last-child { border-bottom: 1px solid var(--rule); }

.work-row-left {}
.work-row-name {
  font-family: var(--display-font);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
}
.work-row-category {
  font-family: var(--label-font);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-top: 6px;
}

.work-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.work-row-desc {
  font-family: var(--body-font);
  font-size: 16px;
  color: var(--ink-secondary);
  line-height: 1.65;
}

.status-tag {
  display: inline-block;
  font-family: var(--label-font);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border: 1px solid var(--rule);
  color: var(--ink-secondary);
  background: none;
  border-radius: 0;
}

.work-teaser-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

@media (min-width: 768px) {
  .work-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
  }
  .work-row-left { min-width: 200px; flex-shrink: 0; }
  .work-row-right { flex: 1; max-width: 400px; }
}

@media (min-width: 1024px) {
  .work-teaser { padding: 100px 0; }
}

/* Handoff CTA */
.handoff {
  padding: 100px 0;
  text-align: center;
  position: relative;
  z-index: 1;
}
.handoff-inner {
  max-width: 560px;
  margin: 0 auto;
}
.handoff q {
  font-family: var(--display-font);
  font-style: italic;
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.5;
  quotes: none;
  display: block;
}
.handoff-sub {
  font-family: var(--body-font);
  font-size: var(--text-base);
  color: var(--ink-secondary);
  margin-top: 20px;
}
.handoff .btn-primary { margin-top: 32px; }

/* ─── PAGE: WORK ──────────────────────────────────────────────────── */

.page-hero {
  padding: 140px 0 80px;
  position: relative;
  z-index: 1;
}
.page-hero-headline {
  font-family: var(--display-font);
  font-size: var(--text-3xl);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.1;
}
.page-hero-sub {
  font-family: var(--body-font);
  font-size: var(--text-lg);
  color: var(--ink-secondary);
  max-width: 500px;
  margin-top: 20px;
  line-height: 1.6;
}

/* Case studies */
.case-studies { position: relative; z-index: 1; }
.case-study {
  border-top: 1px solid var(--rule);
  padding: 56px 0;
}
.case-study:last-of-type { border-bottom: 1px solid var(--rule); }

.cs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.cs-left {}
.cs-name {
  font-family: var(--display-font);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
}
.cs-category {
  font-family: var(--label-font);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-tertiary);
  margin-top: 8px;
}
.cs-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.cs-link {
  font-family: var(--label-font);
  font-size: 13px;
  color: var(--vert);
  border-bottom: 1px solid var(--vert-light);
  padding-bottom: 1px;
  transition: border-bottom-color 200ms ease;
}
.cs-link:hover { border-bottom-color: var(--vert); }
.cs-link-na {
  font-family: var(--label-font);
  font-size: 12px;
  color: var(--ink-tertiary);
}

.cs-visual {
  width: 160px;
  height: 120px;
  background: var(--parchment-dark);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
}
.cs-initial {
  font-family: var(--display-font);
  font-size: 48px;
  font-weight: 400;
  color: var(--rule);
  line-height: 1;
  user-select: none;
}

.cs-right {}
.cs-description {
  font-family: var(--body-font);
  font-size: var(--text-base);
  color: var(--ink);
  line-height: 1.75;
  max-width: 520px;
}
.cs-tech {
  font-family: var(--label-font);
  font-size: 13px;
  color: var(--ink-secondary);
  margin-top: 16px;
  font-style: italic;
}

@media (min-width: 1024px) {
  .cs-grid {
    grid-template-columns: 45fr 55fr;
    gap: 60px;
    align-items: start;
  }
}

/* Work closing CTA */
.work-closing {
  padding: 80px 0;
  border-top: 1px solid var(--rule);
  text-align: center;
  position: relative;
  z-index: 1;
}
.work-closing q {
  font-family: var(--body-font);
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
  quotes: none;
  display: block;
  margin-bottom: 32px;
}

/* ─── PAGE: BUILD ─────────────────────────────────────────────────── */

.build-hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 100px 0 40px;
}
.build-cta-group { margin-top: 40px; }
.build-hero-note {
  font-family: var(--label-font);
  font-size: 12px;
  color: var(--ink-tertiary);
  margin-top: 12px;
}

/* Problem */
.problem {
  background: var(--parchment-dark);
  padding: 80px 0;
  position: relative;
  z-index: 1;
}
.problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
.problem-headline {
  font-family: var(--display-font);
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 28px;
}
.problem-editorial {
  font-family: var(--body-font);
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--ink);
  max-width: 540px;
}
.problem-statement {
  border-left: 2px solid var(--vert);
  padding-left: 28px;
}
.problem-statement q {
  font-family: var(--display-font);
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
  quotes: none;
  display: block;
  line-height: 1.4;
}

@media (min-width: 1024px) {
  .problem-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
  }
  .problem-statement { margin-left: 40px; }
}

/* Services */
.services-section {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}
.services-headline {
  font-family: var(--display-font);
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 48px;
}
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
}
.service-block {
  border-top: 1px solid var(--rule);
  padding: 28px 0;
}
.service-block:last-child { border-bottom: 1px solid var(--rule); }
.service-num {
  font-family: var(--label-font);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  color: var(--ink-tertiary);
}
.service-name {
  font-family: var(--display-font);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 8px;
}
.service-desc {
  font-family: var(--body-font);
  font-size: 15px;
  color: var(--ink-secondary);
  line-height: 1.7;
  margin-top: 10px;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
  }
  .service-block:nth-child(even) { border-top: 1px solid var(--rule); }
}

/* Process */
.process-section {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}
.process-headline {
  font-family: var(--display-font);
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 48px;
}
.process-row {
  border-top: 1px solid var(--rule);
  padding: 36px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.process-row:last-child { border-bottom: 1px solid var(--rule); }
.process-left {}
.process-num {
  font-family: var(--display-font);
  font-size: 52px;
  font-weight: 400;
  color: var(--rule);
  line-height: 1;
}
.process-name {
  font-family: var(--display-font);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 8px;
}
.process-desc {
  font-family: var(--body-font);
  font-size: var(--text-base);
  color: var(--ink-secondary);
  line-height: 1.75;
}

@media (min-width: 768px) {
  .process-row {
    grid-template-columns: 120px 1fr;
    align-items: start;
    gap: 48px;
  }
  .process-num { text-align: right; }
}

/* Why */
.why-section {
  background: var(--parchment-dark);
  padding: 80px 0;
  position: relative;
  z-index: 1;
}
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
.why-editorial {
  font-family: var(--body-font);
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--ink);
  max-width: 520px;
}
.why-trust { display: flex; flex-direction: column; }
.trust-line {
  border-top: 1px solid var(--rule);
  padding: 16px 0;
  font-family: var(--label-font);
  font-size: var(--text-sm);
  color: var(--ink);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.trust-line:last-child { border-bottom: 1px solid var(--rule); }
.trust-marker { color: var(--vert); flex-shrink: 0; }

@media (min-width: 1024px) {
  .why-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 80px;
  }
}

/* Contact section (build.html anchor) */
.contact-section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}
.contact-section-headline {
  font-family: var(--display-font);
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
}
.contact-section-sub {
  font-family: var(--body-font);
  font-size: var(--text-base);
  color: var(--ink-secondary);
  margin-top: 16px;
  margin-bottom: 40px;
}

/* ─── PAGE: CONTACT ───────────────────────────────────────────────── */

.contact-page {
  padding: 160px 0 100px;
  position: relative;
  z-index: 1;
}
.contact-page-inner { max-width: 600px; }
.contact-page-headline {
  font-family: var(--display-font);
  font-size: 42px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.15;
}
.contact-page-sub {
  font-family: var(--body-font);
  font-size: var(--text-base);
  color: var(--ink-secondary);
  margin-top: 16px;
  margin-bottom: 48px;
}
.contact-page-sub a {
  border-bottom: 1px solid var(--rule);
  transition: border-bottom-color 200ms ease;
}
.contact-page-sub a:hover { border-bottom-color: var(--ink); }

/* ─── FORM ────────────────────────────────────────────────────────── */
#contact-form {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#contact-form input,
#contact-form textarea {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 13px 16px;
  font-family: var(--body-font);
  font-size: 16px;
  color: var(--ink);
  width: 100%;
  transition: border-color 200ms ease;
  -webkit-appearance: none;
  appearance: none;
}
#contact-form input:focus,
#contact-form textarea:focus {
  border-color: var(--ink);
  outline: none;
}
#contact-form input::placeholder,
#contact-form textarea::placeholder {
  color: var(--ink-tertiary);
}
#contact-form textarea {
  resize: vertical;
  min-height: 140px;
}
.form-status {
  font-family: var(--body-font);
  font-style: italic;
  font-size: var(--text-sm);
  min-height: 20px;
}
.form-status--success { color: var(--vert); }
.form-status--error { color: #8B3A3A; }
