/* ============================================================
   Querida Parchita Studio — Design System
   Faithful to blankfoundation.org (see DESIGN-blankfoundation.md)
   Warm cream canvas · warm ink · grotesque display · square geometry
   with a single-corner-rounded signature button.
   ============================================================ */

/* Fonts: Space Grotesk = Tomato Grotesk substitute (display)
          Hanken Grotesk = Spezia substitute (headings/body) */

:root {
  /* Ink & text */
  --ink:        #1c0309;   /* warm near-black — primary text */
  --ink-black:  #000000;   /* uppercase card titles */
  --body:       #45372f;   /* warm body text */
  --muted:      #8a7d73;   /* captions, fine print */

  /* Surfaces */
  --cream:      #fff7e6;   /* default canvas */
  --sand:       #fff0d3;   /* alternating band */
  --canvas:     #ffffff;   /* image cards on cream */
  --charcoal:   #252525;   /* primary button */
  --surface-ink:#1c0309;   /* dark bands / footer */

  /* Accents (areas of practice) */
  --red:        #df0008;
  --purple:     #8e51a1;
  --olive:      #718f00;
  --orange:     #ff7800;
  --gold:       #cf9000;
  --link:       #0057ff;

  /* Signature radius: square everything, round one corner */
  --r-signature: 0 26px 0 0;

  --maxw: 1240px;
  --pad: 40px;
  --section: 120px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--body);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Layout helpers ─────────────────────────────── */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: var(--section) 0; }
.section--sand { background: var(--sand); }
.section--dark { background: var(--surface-ink); color: #f3e6d8; }
.section--tight { padding: 72px 0; }

/* ── Typography ─────────────────────────────────── */
.display {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: clamp(46px, 7.5vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.display--dark { color: #fbeede; }
.display em { font-style: normal; color: var(--orange); }

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section--dark .section-title { color: #fbeede; }

.card-title {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--ink-black);
}
.section--dark .card-title { color: #fff; }

.title-sm {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
  color: var(--ink);
}

.eyebrow {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--olive);
  display: inline-block;
  margin-bottom: 20px;
}
.eyebrow--red { color: var(--red); }
.eyebrow--orange { color: var(--orange); }
.eyebrow--purple { color: var(--purple); }
.eyebrow--gold { color: var(--gold); }
.section--dark .eyebrow { color: var(--orange); }

.lead {
  font-size: clamp(19px, 2.1vw, 23px);
  line-height: 1.5;
  color: var(--body);
  max-width: 46ch;
}
.section--dark .lead { color: #e9d9c8; }

p { max-width: 62ch; }
p + p { margin-top: 1em; }

.muted { color: var(--muted); }

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  padding: 15px 30px;
  cursor: pointer;
  border: none;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn-primary {
  background: var(--charcoal);
  color: #fff;
  border-radius: var(--r-signature);   /* signature single corner */
}
.btn-primary:hover { background: var(--ink); transform: translateY(-2px); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--cream); }
.section--dark .btn-secondary { color: #fbeede; border-color: #fbeede; }
.section--dark .btn-secondary:hover { background: #fbeede; color: var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }

.arrow-link {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section--dark .arrow-link { color: #fbeede; }
.arrow-link .a { transition: transform .15s ease; }
.arrow-link:hover .a { transform: translateX(5px); }

/* ── Header / Nav ───────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,247,230,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(28,3,9,.08);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 84px;
}
.brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 20px; letter-spacing: -0.02em;
  color: var(--ink); display: flex; align-items: center; gap: 12px;
}
.brand .mark { width: 34px; height: 34px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 34px; list-style: none; }
.nav-links a {
  font-weight: 600; font-size: 15.5px; color: var(--ink);
  padding-bottom: 3px; border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active { border-color: var(--orange); }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }

/* ── Hero ───────────────────────────────────────── */
.hero { padding: clamp(60px, 9vw, 110px) 0 clamp(60px, 8vw, 96px); }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
}
.hero-copy .display { margin-bottom: 26px; }
.hero-media { position: relative; }
.hero-photo {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  background: var(--sand);
}
/* Graceful fallback motif (shows if photo missing) */
.hero-fallback {
  width: 100%; aspect-ratio: 1/1; background: var(--sand);
  display: flex; align-items: center; justify-content: center;
}
.hero-badge {
  position: absolute; left: -14px; bottom: 26px;
  background: var(--charcoal); color: #fff;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: 14px; padding: 12px 20px; border-radius: var(--r-signature);
}

/* ── Stat / proof row ───────────────────────────── */
.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px;
  border-top: 1px solid rgba(28,3,9,.14);
  border-bottom: 1px solid rgba(28,3,9,.14);
  padding: 40px 0;
}
.section--dark .stat-row { border-color: rgba(255,255,255,.15); }
.stat .n {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: clamp(34px, 4.5vw, 52px); line-height: 1; color: var(--ink);
  letter-spacing: -0.03em;
}
.section--dark .stat .n { color: #fbeede; }
.stat .l { font-size: 15px; color: var(--body); margin-top: 10px; }
.section--dark .stat .l { color: #d9c7b6; }

/* ── Generic grid ───────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head .lead { margin-top: 16px; }

/* ── Cards ──────────────────────────────────────── */
.card { background: var(--canvas); border: 1px solid rgba(28,3,9,.1); }
.card-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--sand); display: block; }
.card-body { padding: 26px; }
.card-body .card-title { margin-bottom: 12px; }
.card-tag {
  font-family: 'Hanken Grotesk', sans-serif; font-weight: 700; font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 12px; display: inline-block;
}

/* Work / portfolio entry (no image dependency — color-block header) */
.work {
  background: var(--canvas); border: 1px solid rgba(28,3,9,.12);
  display: flex; flex-direction: column; height: 100%;
}
.work-top {
  padding: 30px; color: #fff; min-height: 150px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.work-top .role { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.work-top .name { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 28px; letter-spacing: -0.02em; line-height: 1.05; margin-top: auto; }
.work-photo { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.work.has-photo .work-top { min-height: auto; padding: 22px 30px; }
.work-body { padding: 26px 30px 30px; }
.work-body p { font-size: 16px; }
.work-meta { font-size: 13px; color: var(--muted); margin-top: 16px; letter-spacing: .04em; text-transform: uppercase; }
.bg-red    { background: var(--red); }
.bg-purple { background: var(--purple); }
.bg-olive  { background: var(--olive); }
.bg-orange { background: var(--orange); }
.bg-gold   { background: var(--gold); }
.bg-ink    { background: var(--ink); }

/* ── Service block ──────────────────────────────── */
.service { border-top: 1.5px solid var(--ink); padding: 34px 0; }
.service-grid { display: grid; grid-template-columns: 0.5fr 1.5fr; gap: 40px; }
.service h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 28px; letter-spacing: -0.02em; color: var(--ink); }
.service .num { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 20px; color: var(--orange); }
.service ul { list-style: none; margin-top: 18px; display: grid; gap: 10px; }
.service ul li { padding-left: 22px; position: relative; font-size: 16px; }
.service ul li::before { content: "→"; position: absolute; left: 0; color: var(--olive); font-weight: 700; }

/* ── Values / how we work ───────────────────────── */
.value { padding: 30px; background: var(--canvas); border: 1px solid rgba(28,3,9,.1); border-top: 4px solid var(--orange); }
.value:nth-child(2) { border-top-color: var(--red); }
.value:nth-child(3) { border-top-color: var(--purple); }
.value:nth-child(4) { border-top-color: var(--olive); }
.value h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 24px; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 12px; }
.value p { font-size: 15.5px; }

/* ── Quote band ─────────────────────────────────── */
.quote {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: clamp(26px, 3.6vw, 44px); line-height: 1.18; letter-spacing: -0.02em;
  color: var(--ink); max-width: 20ch;
}
.quote-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.quote-photo { width: 100%; aspect-ratio: 3/4; object-fit: cover; background: var(--canvas); }
.quote-attr { margin-top: 26px; font-size: 16px; }
.quote-attr strong { color: var(--ink); }

/* ── CTA band ───────────────────────────────────── */
.cta-band { text-align: center; }
.cta-band .display { margin: 0 auto 12px; }
.cta-band .lead { margin: 0 auto; text-align: center; }
.cta-band .btn-row { justify-content: center; }

/* ── Contact ────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; padding: 14px 16px; font-family: inherit; font-size: 16px;
  background: var(--canvas); border: 1.5px solid var(--ink); color: var(--ink);
}
.field textarea { min-height: 130px; resize: vertical; }
.channel { border-top: 1px solid rgba(28,3,9,.14); padding: 22px 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.channel:last-child { border-bottom: 1px solid rgba(28,3,9,.14); }

/* ── Footer ─────────────────────────────────────── */
.site-footer { background: var(--surface-ink); color: #e9d9c8; padding: 80px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.site-footer .brand { color: #fff; margin-bottom: 18px; }
.site-footer h4 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); margin-bottom: 18px; }
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer a { font-size: 15px; color: #d9c7b6; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 14px; color: #b7a695;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 960px) {
  :root { --section: 84px; --pad: 26px; }
  .hero-grid, .quote-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-media { order: -1; max-width: 460px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: 1fr; gap: 14px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 24px 30px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; position: absolute; top: 84px; left: 0; right: 0;
    flex-direction: column; background: var(--cream); padding: 24px var(--pad);
    gap: 20px; border-bottom: 1px solid rgba(28,3,9,.1);
  }
  .nav-toggle { display: block; }
  .nav-cta .btn { display: none; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .channel { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   MOTION LAYER — added on top of the static design system.
   Inspired by blankfoundation.org (logo draw-in) and
   contralabs.com (display-type reveal, marquee, pill buttons).
   Everything below is disabled under prefers-reduced-motion.
   ============================================================ */

/* ── 1. Logo draw-in on load ────────────────────── */
/* Each stroke path is normalised with pathLength="1" in the markup,
   then "drawn" by animating the dash offset from 1 → 0. */
.brand .mark path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: mark-draw 1.1s ease forwards;
}
.brand .mark path:nth-child(1) { animation-delay: .05s; }
.brand .mark path:nth-child(2) { animation-delay: .45s; }
.brand .mark path:nth-child(3) { animation-delay: .70s; }
.brand .mark path:nth-child(4) { animation-delay: .90s; }
@keyframes mark-draw { to { stroke-dashoffset: 0; } }

/* ── 2. Display-type + block reveals ────────────── */
/* Headlines rise out of a clipping mask; other blocks fade-rise.
   JS adds .is-in when the element scrolls into view. Hero copy is
   flagged .reveal-now so it plays immediately on load. */
.reveal-mask { overflow: hidden; padding-bottom: .12em; }
.reveal-mask > * {
  transform: translateY(110%);
  transition: transform .9s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal-mask.is-in > * { transform: translateY(0); }

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }

/* Stagger helper for grids of cards */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.22,1,.36,1);
}
.reveal-stagger.is-in > * { opacity: 1; transform: none; }
.reveal-stagger.is-in > *:nth-child(1) { transition-delay: .00s; }
.reveal-stagger.is-in > *:nth-child(2) { transition-delay: .10s; }
.reveal-stagger.is-in > *:nth-child(3) { transition-delay: .20s; }
.reveal-stagger.is-in > *:nth-child(4) { transition-delay: .30s; }

/* ── 3. Auto-scrolling marquee row ──────────────── */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 22px;
  width: max-content;
  animation: marquee-scroll 42s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }   /* track holds two copies */
}
.marquee-card {
  flex: 0 0 auto;
  width: 300px;
  background: var(--canvas);
  border: 1px solid rgba(28,3,9,.12);
  border-top: 4px solid var(--orange);
  padding: 26px 28px;
  border-radius: var(--r-signature);
}
.marquee-card:nth-child(3n+2) { border-top-color: var(--red); }
.marquee-card:nth-child(3n+3) { border-top-color: var(--purple); }
.marquee-card .role {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: 21px; letter-spacing: -0.02em; color: var(--ink);
  margin-bottom: 8px;
}
.marquee-card .desc { font-size: 14.5px; color: var(--body); }

/* Testimonial cards for the scrolling row */
.marquee-quote {
  flex: 0 0 auto;
  width: 384px;
  background: var(--canvas);
  border: 1px solid rgba(28,3,9,.12);
  padding: 30px 32px;
  border-radius: var(--r-signature);
  display: flex;
  flex-direction: column;
}
.marquee-quote .q {
  font-size: 16px; line-height: 1.55; font-style: italic;
  color: var(--body); margin: 0 0 22px; max-width: none;
}
.marquee-quote .who { margin-top: auto; }
.marquee-quote .nm { display: block; font-weight: 700; font-size: 15px; color: var(--ink); }
.marquee-quote .rl { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }

/* ── Ethos principle blocks (dark band) ─────────── */
.principle .principle-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.02em;
  line-height: 1.04; color: #fbeede;
}
.principle .principle-sub {
  font-family: 'Hanken Grotesk', sans-serif; font-weight: 800;
  font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--orange); margin: 8px 0 16px;
}
.principle p { color: #e9d9c8; font-size: 16.5px; max-width: 44ch; }

/* Keyword-bearing support line inside the hero H1 (SEO) */
.h1-kw {
  display: block;
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(15px, 1.6vw, 19px);
  letter-spacing: 0;
  line-height: 1.35;
  color: var(--body);
  margin-top: 18px;
  max-width: 34ch;
}

/* ── 4. Pill CTA button with nudging arrow ──────── */
.btn-pill {
  background: var(--charcoal);
  color: #fff;
  border-radius: 999px;
  padding: 15px 16px 15px 28px;
}
.btn-pill:hover { background: var(--ink); transform: translateY(-2px); }
.btn-pill .pill-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 999px;
  background: rgba(255,255,255,.16);
  transition: transform .2s ease, background .2s ease;
}
.btn-pill:hover .pill-arrow { transform: translateX(4px); background: var(--orange); }
.section--dark .btn-pill { background: var(--orange); color: var(--ink); }
.section--dark .btn-pill:hover { background: #fff; }

/* ── Respect reduced-motion: show everything, move nothing ── */
@media (prefers-reduced-motion: reduce) {
  .brand .mark path { stroke-dashoffset: 0; animation: none; }
  .reveal-mask > *, .reveal, .reveal-stagger > * {
    transform: none !important; opacity: 1 !important; transition: none !important;
  }
  .marquee-track { animation: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; overflow-x: auto; }
}
