/* Nuvela Creative Co. Shared tokens also live in app/globals.css (questionnaire) and public/card.html. */
:root {
  --paper: #FBF7F1;
  --white: #FFFFFF;
  --tint: #F4ECE1;
  --ink: #1F2133;
  --ink-soft: #565A6E;
  --line: #E4DACB;
  --accent: #E0553A;
  --accent-dark: #B83D25;
  --accent-soft: #FBE3D9;
  --gold: #E9B44C;

  --radius: 18px;
  --shadow: 0 1px 2px rgba(31,33,51,.06), 0 12px 32px rgba(31,33,51,.08);
  --shadow-lg: 0 2px 4px rgba(31,33,51,.06), 0 24px 56px rgba(31,33,51,.12);
  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 .5em; font-variation-settings: "SOFT" 50; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
p { margin: 0 0 1em; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip:focus { position: fixed; top: 10px; left: 10px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  background: var(--ink); color: var(--paper); text-decoration: none;
  font: 600 1rem/1 var(--sans); padding: 16px 28px; border: 0; border-radius: 999px; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(31,33,51,.18); background: #2B2E45; }
.btn:active { transform: translateY(0); }
.btn--small { padding: 11px 20px; font-size: .95rem; }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--white); }

.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; text-decoration: none; color: var(--ink); border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.link-arrow span { transition: transform .2s; }
.link-arrow:hover span { transform: translateX(4px); }

.eyebrow { font-weight: 600; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: 1rem; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo__mark {
  /* The bookmark: Nuvela's signature shape */
  display: grid; place-items: start center; width: 34px; height: 44px; padding-top: 5px;
  background: var(--accent); color: var(--white);
  font: italic 600 1.35rem/1 var(--serif);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
  border-radius: 4px 4px 0 0; transition: transform .3s ease;
}
.logo:hover .logo__mark { transform: translateY(-3px); }
.logo__text { font: 500 1.5rem/1 var(--serif); letter-spacing: -0.01em; display: flex; flex-direction: column; }
.logo__text small { font: 600 .62rem/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--ink-soft); margin-top: 5px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(251,247,241,.88); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.is-scrolled { border-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a:not(.btn) { text-decoration: none; font-weight: 500; color: var(--ink-soft); transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--ink); }
.nav__toggle { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 88px; }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 5.2vw, 4.4rem); font-weight: 450; }
.hero h1 em { display: block; }
.underline { position: relative; white-space: nowrap; }
.underline::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: -.1em; height: .22em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 16' preserveAspectRatio='none'%3E%3Cpath d='M3 11 C 50 3, 120 3, 197 9' fill='none' stroke='%23E9B44C' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 34em; }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 32px; }

.hero__art { position: relative; aspect-ratio: 1 / .86; }
.frame { background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.frame__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #FDFBF8; }
.frame__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.frame__bar span { margin-left: 10px; flex: 1; font-size: .75rem; color: var(--ink-soft); background: var(--paper); border-radius: 999px; padding: 3px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.hero__frame { position: absolute; top: 0; left: 0; width: 88%; box-shadow: var(--shadow-lg); transform: rotate(-1.5deg); }
.hero__frame img { aspect-ratio: 16 / 10; height: auto; }
.phone { border: 6px solid var(--ink); border-radius: 28px; overflow: hidden; background: var(--white); box-shadow: var(--shadow-lg); }
.phone img { width: 100%; }
.hero__phone { position: absolute; right: 0; bottom: 0; width: 30%; }
.bookmark-tag {
  position: absolute; left: 8%; bottom: 4%; background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 12px 18px 12px 46px; font: italic 500 1.15rem var(--serif); line-height: 1.2;
}
.bookmark-tag::before {
  content: ""; position: absolute; left: 16px; top: -6px; width: 18px; height: 34px; background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
}
.bookmark-tag span { display: block; font: 600 .66rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); font-style: normal; }

/* ---------- Clients ---------- */
.clients { border-block: 1px solid var(--line); background: var(--white); }
.clients__inner { display: flex; align-items: center; gap: 40px; padding: 26px 0; }
.clients p { margin: 0; flex: none; font-weight: 600; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.clients ul { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.clients img { height: 52px; width: auto; filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s; }
.clients li:hover img { filter: none; opacity: 1; }
.clients__word { font: 500 1.35rem var(--serif); color: var(--ink-soft); }
.clients__word em { font-style: italic; }

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.section--tint { background: var(--tint); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink .eyebrow { color: var(--gold); }
.section--ink h2 em { color: var(--gold); }
.section__head { max-width: 700px; margin-bottom: 56px; }
.section__head h2, .about h2, .contact h2 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.section__head > p:last-child { color: var(--ink-soft); font-size: 1.15rem; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 30px;
  position: relative; transition: transform .25s, box-shadow .25s;
}
.service::before {
  content: ""; position: absolute; top: -1px; right: 28px; width: 22px; height: 40px; background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%); transform: scaleY(0); transform-origin: top; transition: transform .3s ease;
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service:hover::before { transform: scaleY(1); }
.service__num { font: italic 500 1rem var(--serif); color: var(--accent-dark); margin-bottom: 18px; }
.service__icon { width: 44px; height: 44px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.service h3 { font-size: 1.65rem; }
.service > p:not(.service__num) { color: var(--ink-soft); font-size: 1rem; }
.service ul { list-style: none; padding: 18px 0 0; margin: 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.service li { position: relative; padding-left: 20px; font-size: .95rem; }
.service li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -20px 0 56px; }
.chip {
  font: 600 .92rem var(--sans); color: var(--ink-soft); cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; transition: all .2s;
}
.chip:hover { color: var(--ink); border-color: var(--ink-soft); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.is-hidden { display: none !important; }

/* ---------- Case studies ---------- */
.case { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; margin-bottom: 104px; }
.case--flip .case__media { order: 2; }
.case__media { position: relative; }
.case__media > .frame:first-child img { aspect-ratio: 16 / 10; height: auto; }
.case__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.case__thumbs img { aspect-ratio: 1; object-fit: cover; border-radius: 12px; transition: transform .25s; }
.case__thumbs img:hover { transform: scale(1.04); }
.frame--inset { position: absolute; width: 50%; right: -5%; bottom: -12%; box-shadow: var(--shadow-lg); }
.frame--inset img { aspect-ratio: 16 / 10; height: auto; }
.case--flip .frame--inset { right: auto; left: -5%; }
.case:has(.frame--inset) .case__media { margin-bottom: 9%; }
.case__media--phone { margin-bottom: 10%; }
.case__media--phone .phone { position: absolute; width: 28%; right: -3%; bottom: -14%; }
.case--flip .case__media--phone .phone { right: auto; left: -3%; }
.case__kicker { font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent-dark); margin-bottom: .6em; }
.case h3 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); }
.case__body > p { color: var(--ink-soft); }
.checks { list-style: none; padding: 0; margin: 0 0 26px; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23B83D25' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.case__links { display: flex; flex-wrap: wrap; gap: 28px; }

/* ---------- Tools ---------- */
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.tool { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: transform .25s, box-shadow .25s; }
.tool:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tool .frame { box-shadow: none; margin-bottom: 20px; }
.tool .frame img { aspect-ratio: 16 / 10; height: auto; }
.tool h3 { font-size: 1.5rem; }
.tool > p:not(.case__kicker) { color: var(--ink-soft); font-size: 1rem; margin: 0; }

/* ---------- Testimonials (hidden until real quotes are added) ---------- */
.quotes__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.quote { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.quote blockquote { margin: 0 0 20px; font: italic 400 1.35rem/1.45 var(--serif); }
.quote figcaption strong { display: block; }
.quote figcaption { color: var(--ink-soft); font-size: .95rem; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; align-items: center; }
.about__photo { position: relative; margin: 0; }
.about__photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; border-radius: 200px 200px var(--radius) var(--radius); box-shadow: var(--shadow-lg); }
.about__photo figcaption {
  position: absolute; left: 24px; right: 24px; bottom: 24px; background: rgba(255,255,255,.95); border-radius: 14px;
  padding: 14px 18px; font-size: .9rem; color: var(--ink-soft); box-shadow: var(--shadow); backdrop-filter: blur(8px);
}
.about__photo figcaption strong { display: block; font: 500 1.25rem var(--serif); color: var(--ink); }
.about__copy > p { color: var(--ink-soft); }
.about__list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.about__list li { position: relative; padding-left: 30px; font-weight: 600; font-size: .98rem; }
.about__list li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23B83D25' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- Process ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid rgba(251,247,241,.18); }
.steps li { padding: 34px 28px 10px 0; border-right: 1px solid rgba(251,247,241,.12); padding-left: 28px; }
.steps li:first-child { padding-left: 0; }
.steps li:last-child { border-right: 0; }
.steps span { font: italic 400 2.6rem/1 var(--serif); color: var(--gold); display: block; margin-bottom: 20px; }
.steps h3 { font-size: 1.5rem; }
.steps p { margin: 0; opacity: .78; font-size: 1rem; }

/* ---------- Contact ---------- */
.contact {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start;
  background: var(--ink); color: var(--paper); border-radius: 28px; padding: clamp(28px, 5vw, 64px);
  position: relative; overflow: hidden;
}
.contact::before {
  content: ""; position: absolute; right: 52%; top: -1px; width: 34px; height: 70px; background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}
.contact .eyebrow { color: var(--gold); }
.contact h2 em { color: var(--gold); }
.contact__copy p { font-size: 1.1rem; opacity: .85; }
.contact__start { margin-top: 32px; padding-top: 28px; border-top: 1px solid rgba(251,247,241,.18); }
.contact__start p { font-size: 1rem !important; }
.contact__start strong { color: var(--paper); }
.form { background: var(--white); color: var(--ink); border-radius: var(--radius); padding: 30px; display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.form input, .form select, .form textarea {
  font: 400 1rem var(--sans); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; width: 100%; transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form textarea { resize: vertical; }
.form .btn { justify-self: start; }
.form .btn:disabled { opacity: .6; cursor: wait; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { margin: 0; font-weight: 600; font-size: .95rem; min-height: 1.4em; }
.form__status.is-ok { color: #1F7A4D; }
.form__status.is-error { color: var(--accent-dark); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 0 40px; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px 40px; align-items: start; }
.footer__tag { margin: 14px 0 0; color: var(--ink-soft); font-size: .95rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: flex-end; }
.footer__links a { text-decoration: none; font-weight: 500; color: var(--ink-soft); }
.footer__links a:hover { color: var(--ink); }
.footer__copy { grid-column: 1 / -1; margin: 12px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .88rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.services .reveal:nth-child(2), .steps .reveal:nth-child(2) { transition-delay: .1s; }
.services .reveal:nth-child(3), .steps .reveal:nth-child(3) { transition-delay: .2s; }
.steps .reveal:nth-child(4) { transition-delay: .3s; }
.service.reveal.is-in:hover, .tool.reveal.is-in:hover { transform: translateY(-4px); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .services { grid-template-columns: 1fr; max-width: 640px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { padding-left: 0; }
  .steps li:nth-child(2) { border-right: 0; }
  .clients__inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .clients ul { justify-content: flex-start; }
}
@media (max-width: 860px) {
  .nav__toggle {
    display: grid; gap: 6px; width: 46px; height: 46px; place-content: center;
    background: var(--white); border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  }
  .nav__toggle span:not(.sr) { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
  .nav__links {
    position: absolute; top: 80px; left: 16px; right: 16px; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-lg);
    opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity .2s, transform .2s;
  }
  .nav__links.is-open { opacity: 1; pointer-events: auto; transform: none; }
  .nav__links a:not(.btn) { padding: 10px 8px; font-size: 1.05rem; color: var(--ink); }
  .nav__links .btn { margin-top: 8px; }

  .hero { padding: 36px 0 72px; }
  .hero__grid, .case, .about, .contact, .tools { grid-template-columns: 1fr; gap: 44px; }
  .hero__art { max-width: 560px; width: 100%; }
  .case--flip .case__media { order: 0; }
  .case { margin-bottom: 84px; }
  .section { padding: 84px 0; }
  .about__photo { max-width: 380px; }
  .contact::before { right: 32px; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__links { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .steps li { padding: 28px 0 20px !important; border-right: 0; border-bottom: 1px solid rgba(251,247,241,.12); }
  .about__list { grid-template-columns: 1fr; }
  .bookmark-tag { font-size: 1rem; padding: 10px 14px 10px 40px; }
  .hero__ctas .btn { flex: 1; }
  .clients img { height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
