/* =========================================================
   STUDIO NOVO — shared styles
   Loaded on every page, BEFORE the page-specific stylesheet.
   Contains: design tokens, reset, buttons, header, footer,
   scroll-reveal helper. Edit here once, it updates everywhere.
   ========================================================= */
:root{
  --cream:      #F6F3EA;
  --cream-2:    #EFEBDE;
  --paper:      #FFFFFF;
  --ink:        #1B1B16;
  --ink-soft:   #55534A;
  --ink-faint:  #8B8878;
  --green:      #1E3B2C;
  --green-dark: #14281D;
  --green-mist: #C9D3C4;
  --line:       #E1DCCB;
  --black:      #17160F;

  --serif: "DM Serif Display", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", sans-serif;

  --container: 1200px;
  --radius: 4px;
  --radius-lg: 10px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* =========================================================
   Reset
   ========================================================= */
*,*::before,*::after{ box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4{ font-family: var(--serif); font-weight: 500; margin:0; color: var(--ink); letter-spacing: -.01em; }
p{ margin:0; }
button{ font-family: var(--sans); cursor:pointer; background:none; border:none; }
table{ border-collapse: collapse; width:100%; }

/* Remove the default tap/click highlight (shows up as a blue flash or
   outline on mobile Safari/Chrome — and sometimes desktop Chrome — whenever
   a link, button, card or tab is pressed). */
a, button, .card, .tab{ -webkit-tap-highlight-color: transparent; }
a:focus, button:focus{ outline: none; }
/* Links: no focus ring at all — some mobile browsers (notably iOS Safari)
   trigger :focus-visible on a plain tap, which was showing up as an
   unwanted green border around every link/button-link on click. */
a:focus-visible{ outline: none; }
/* Real <button> elements (tabs, FAQ accordion, menu toggle, etc.): no
   focus ring either — it was left in for keyboard users, but it was
   showing up as a lingering box after an ordinary click/tap too, so it's
   off everywhere now, same as links above. */
button:focus-visible{ outline: none; }

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 500;
  transition: transform .35s var(--ease), background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
  white-space: nowrap;
}
.btn .arrow{ transition: transform .3s var(--ease); display:inline-block; }
.btn:hover .arrow{ transform: translateX(4px); }
.btn--primary{ background: var(--green); color: var(--cream); }
.btn--primary:hover{ background: var(--green-dark); box-shadow: 0 6px 20px rgba(20,40,29,.25); }
.btn--outline{ background: var(--paper); color: var(--ink); border:1px solid var(--line); }
.btn--outline:hover{ background: var(--cream-2); }
.btn--light{ background: var(--cream); color: var(--green-dark); }
.btn--light:hover{ background: var(--paper); }
.btn--sm{ padding: 9px 18px; font-size: .82rem; }
.btn--dark{ background: var(--green); color: var(--cream); }
.btn--dark:hover{ background:#000; box-shadow: 0 10px 24px rgba(0,0,0,.28); }
.btn--block{ width:100%; padding: 16px 26px; font-size:1rem; }

/* =========================================================
   Tabs (shared — home page + templates page category filters)
   ========================================================= */
.tabs{
  display:flex; justify-content:center; gap: 10px; flex-wrap:wrap;
}
.tab{
  padding: 9px 20px; border-radius: 999px; font-size:.88rem; color: var(--ink-soft);
  border: 1px solid transparent; transition: all .25s var(--ease);
}
.tab:hover{ color: var(--ink); }
.tab.is-active{ background: var(--paper); border-color: var(--line); color: var(--ink); font-weight:500; }

/* =========================================================
   Pill (shared — small category badge on template cards)
   ========================================================= */
.pill{ font-size:.72rem; padding:4px 12px; border-radius:999px; border:1px solid var(--line); color: var(--ink-soft); }

/* =========================================================
   FAQ accordion — shared open/close mechanics (price page +
   template detail page). Sizing (padding, font-size, icon
   dimensions) stays in each page's own stylesheet since it's
   slightly different per page.
   ========================================================= */
.faq__item{ border:1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow:hidden; }
.faq__icon::before,
.faq__icon::after{
  content:""; position:absolute; background: var(--ink-soft); border-radius:2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.faq__icon::before{ left:0; top:50%; width:100%; height:1.5px; transform: translateY(-50%); }
.faq__icon::after{ top:0; left:50%; width:1.5px; height:100%; transform: translateX(-50%); }
.faq__item.is-open .faq__icon::after{ opacity:0; transform: translateX(-50%) rotate(90deg); }
/* Animate open/close without a hardcoded max-height cap (the old
   max-height:220px silently clipped any answer longer than that, with
   no way to scroll to the rest — a real problem on mobile where line
   wrapping makes answers taller). Animating grid-template-rows between
   0fr and 1fr lets the row grow to fit whatever content is inside,
   however long, while still transitioning smoothly.
   The grid item that overflow:hidden is applied to must carry no
   padding of its own (padding still counts toward a track's minimum
   size even with overflow:hidden) — that's why the padding lives on
   the nested <p> (via .faq__a p in each page's stylesheet) while
   .faq__a-inner, the actual grid item, stays padding-free so the row
   can collapse all the way to 0 when closed. */
.faq__a{
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s var(--ease);
}
.faq__item.is-open .faq__a{ grid-template-rows: 1fr; }
.faq__a-inner{ overflow:hidden; min-height: 0; }

/* =========================================================
   Header
   ========================================================= */
.header{
  position: sticky; top:0; z-index: 100;
  background: rgba(246,243,234,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.header.is-scrolled{ box-shadow: 0 2px 16px rgba(0,0,0,.04); }
.header__inner{
  position: relative;
  display:flex; align-items:center; justify-content:space-between;
  height: 78px;
}
.logo{ font-family: var(--serif); font-weight:600; font-size:1.05rem; letter-spacing:.06em; }
.nav{
  display:flex; gap:36px;
  position: absolute; left:50%; top:50%; transform: translate(-50%,-50%);
}
.nav a{ font-size:.92rem; color: var(--ink-soft); transition: color .2s; position:relative; }
.nav a:hover{ color: var(--ink); }
.nav a::after{
  content:""; position:absolute; left:0; bottom:-5px; width:0; height:1px; background: var(--green);
  transition: width .25s var(--ease);
}
.nav a:hover::after{ width:100%; }
/* Current page — same underline as hover, but permanent. The
   .is-active class is added in common.js (initActiveNav) by matching
   each nav link's href against the current page, so no page's own HTML
   needs to know which nav item is "on". */
.nav a.is-active{ color: var(--ink); }
.nav a.is-active::after{ width:100%; }

/* Get Started link duplicated inside the nav list — hidden on desktop
   (the real button lives in .header__right), shown only inside the
   mobile dropdown menu (see the max-width:680px block below) so it
   isn't lost when .header__right .btn--sm is hidden on small screens. */
.nav__cta{ display:none; }

.header__right{ display:flex; align-items:center; gap:22px; }
.lang{ font-size:.82rem; color: var(--ink-soft); letter-spacing:.03em; }
.lang span{ opacity:.5; margin:0 2px;}

.menu-toggle{ display:none; flex-direction:column; gap:5px; width:26px; padding:4px; }
.menu-toggle span{ display:block; height:1.5px; background: var(--ink); border-radius:2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.menu-toggle.is-open span:nth-child(1){ transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2){ opacity:0; }
.menu-toggle.is-open span:nth-child(3){ transform: translateY(-6.5px) rotate(-45deg); }

/* =========================================================
   Reveal on scroll
   ========================================================= */
/* Fade + rise + a touch of scale (rather than just a straight slide) is
   what gives this a softer "poof" feel on scroll-in instead of a flat
   mechanical slide. Every section's content already carries data-reveal
   (section-head, grid/cards/plans/quotes, etc. — see each page's HTML),
   so this one rule covers all of them. */
[data-reveal]{
  opacity:0;
  transform: translateY(28px) scale(.97);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
[data-reveal].is-visible{ opacity:1; transform: translateY(0) scale(1); }

.eyebrow{
  font-size:.76rem; letter-spacing:.18em; text-transform:uppercase;
  color: var(--green); font-weight:600; margin-bottom:14px;
}
.section-head{ text-align:center; max-width: 620px; margin: 0 auto 56px; }
.section-head h2{ font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
.center-cta{ text-align:center; margin-top: 56px; }

/* =========================================================
   CTA / Footer
   ========================================================= */
.cta-footer{
  background: var(--green);
  color: var(--cream);
  padding: 90px 0 34px;
}
.cta-footer__inner{ display: block; }
.cta-footer__text{ text-align: center; }
.cta-footer__text h2{
  color: var(--cream);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 28px;
}
.footer__meta{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 80px;
  margin-top: 80px;
  padding-top: 44px;
  border-top: 1px solid rgba(246,243,234,.15);
}
.footer__col{ display: flex; align-items: center; gap: 28px; }
.footer__col:nth-child(2){ justify-content: center; }
.footer__col:nth-child(3){ justify-content: flex-end; }
.footer__col a{ white-space: nowrap; }
.footer__col .logo img{ height: 30px; width: auto; margin: 0; }
.footer__bottom{
  text-align: center;
  font-size: .8rem;
  color: rgba(246,243,234,.5);
  padding-top: 34px;
}
.footer__legal-link{
  color: rgba(246,243,234,.7);
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 6px;
  transition: color .2s var(--ease);
}
.footer__legal-link:hover{ color: var(--cream); }

/* =========================================================
   Responsive — Large screens
   1200px read as a hard cap on big/ultra-wide monitors — the whole
   site sitting in a fixed-width column with large empty margins on
   either side, looking like the layout was "stuck" rather than
   responsive. Widen the container only above 1600px (normal desktop
   sizes, ~1024–1599px, are untouched) so it keeps growing a bit
   further on genuinely large screens instead of stopping at 1200px.
   ========================================================= */
@media (min-width: 1600px){
  :root{ --container: 1440px; }
}

/* =========================================================
   Responsive — Tablet (shared header/footer rules)
   ========================================================= */
@media (max-width: 1024px){
  .container{ padding: 0 26px; }
  .cta-footer__inner{ grid-template-columns: 1fr; }
  .cta-footer__visual{ order:-1; }
  .footer__meta{ margin-top: 60px; }
}

@media (max-width: 768px){
  .cta-footer{ padding: 70px 0 30px; }
  .cta-footer__text h2{ font-size: 2rem; line-height: 1.2; }
  .footer__meta{
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
    margin-top: 60px;
    padding-top: 36px;
  }
  .footer__col{ justify-content: center; flex-wrap: wrap; gap: 18px; }
  .footer__col:nth-child(2),
  .footer__col:nth-child(3){ justify-content: center; }
  .footer__col .logo img{ height: 36px; }
  .footer__bottom{ padding-top: 30px; font-size: 0.75rem; }
}

/* =========================================================
   Responsive — Mobile (shared header/footer rules)
   ========================================================= */
@media (max-width: 680px){
  .container{ padding: 0 20px; }

  /* Scroll-reveal — mobile only. Same fade + rise used everywhere
     ([data-reveal] above), just with a longer travel distance and a
     touch faster timing so the "slide in as you scroll" motion actually
     reads on a small screen, where the base 28px rise is easy to miss.
     Desktop/tablet keep the original values untouched. */
  [data-reveal]{
    transform: translateY(42px) scale(.97);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
  }

  .nav{
    position:fixed; inset: 78px 0 auto 0; background: var(--cream);
    flex-direction:column; padding: 24px 20px; gap:4px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity:0; pointer-events:none;
    transition: transform .3s var(--ease), opacity .3s var(--ease);
  }
  .nav.is-open{ transform: translateY(0); opacity:1; pointer-events:auto; }
  .nav a{ padding: 12px 4px; border-bottom:1px solid var(--line); }
  /* Kill the desktop hover underline (.nav a::after) inside the mobile
     dropdown menu only — this media query is scoped to the hamburger
     breakpoint, so desktop hover underlines are untouched. */
  .nav a::after{ display:none; }

  /* Get Started — shown only here, inside the open mobile menu.
     Needs an explicit color: .nav a's own color:var(--ink-soft) rule
     is more specific than .btn--primary's color:var(--cream), so
     without this override the button text renders dark and unreadable
     against its dark green background. */
  .nav a.nav__cta{
    display:flex; width:100%; justify-content:center;
    margin-top: 10px; border-bottom:none; padding: 14px 26px;
    color: var(--cream);
  }
  .nav a.nav__cta:hover{ color: var(--cream); }
  .nav a.nav__cta::after{ display:none; }

  .menu-toggle{ display: flex; }
  .header__right .btn--sm{ display:none; }
  .header__right{ margin-left: auto; }
  .header__inner{ position: relative; justify-content: center; }
  .header__inner > .logo{ position: absolute; left: 50%; transform: translateX(-50%); }
  .lang{ display:none; }

  .footer__meta{ flex-direction:column; gap: 28px; }
  .cta-footer{ padding: 72px 0 26px; }
  .footer__col{ align-items: center; }
  .footer__col p{ max-width: 260px; }
}
