/* ============================================================
   Petnest AI — shared design system (refreshed)
   Sage brand · warm cream canvas · pastel rail accents
   ============================================================ */

:root {
  /* canvas + ink */
  --bg: #f7f5ee;
  --bg-2: #efe9dc;
  --bg-3: #e9e2d2;
  --panel: #ffffff;
  --ink: #1b1a16;
  --ink-2: #54524a;
  --mute: #908d82;
  --line: #e6e1d4;
  --line-2: #f0ebdf;

  /* brand — sage (matches the logo) */
  --brand: #8d9778;          /* logo sage — fills, marks */
  --brand-deep: #5e6845;     /* AA-safe sage for text / buttons */
  --brand-ink: #4c5639;
  --brand-soft: #e7ebde;
  --brand-soft-2: #f0f2e8;

  /* dark surfaces */
  --dark: #181711;
  --dark-2: #211f17;
  --dark-line: #322f24;
  --on-dark: #f7f5ee;
  --on-dark-2: #b9b5a8;

  /* pastel accents — the five rails + library tags */
  --mint: #dfe8cf;      --mint-ink: #46532c;
  --peach: #fbe2c6;     --peach-ink: #8a5320;
  --sky: #d8e6ef;       --sky-ink: #305a73;
  --lav: #e6ddef;       --lav-ink: #574174;
  --blush: #f7dcd6;     --blush-ink: #9a463f;
  --butter: #f4e6a8;    --butter-ink: #7a6212;
  --clay: #efd9c9;      --clay-ink: #8a5331;
  --teal: #cfe4dd;      --teal-ink: #2f6056;

  --ok: #5e7a52;
  --warn: #b07a2e;
  --danger: #b15b52;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --shadow-sm: 0 1px 0 rgba(27,26,22,.04), 0 4px 14px -8px rgba(27,26,22,.14);
  --shadow: 0 2px 4px rgba(27,26,22,.04), 0 18px 40px -22px rgba(27,26,22,.22);
  --shadow-lg: 0 30px 80px -34px rgba(27,26,22,.34);
  --maxw: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Inter Tight', system-ui, -apple-system, sans-serif;
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01","cv11"; overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img, svg, canvas { display: block; max-width: 100%; }
::selection { background: var(--brand-deep); color: #fff; }

.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.serif { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; line-height: 1.04; letter-spacing: -0.015em; }
.italic { font-style: italic; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.container-wide { max-width: 1340px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 700px){ .container, .container-wide { padding: 0 20px; } }

/* CJK font tuning when 中文 active */
html[lang^='zh'] body { font-family: 'Inter Tight','PingFang SC','Hiragino Sans GB','Microsoft YaHei',system-ui,sans-serif; }
html[lang^='zh'] .serif,
html[lang^='zh'] .display,
html[lang^='zh'] .h-sec,
html[lang^='zh'] .stat-n { font-family: 'Inter Tight','PingFang SC','Microsoft YaHei',sans-serif; letter-spacing: -0.01em; font-weight: 600; line-height: 1.12; }

/* ----------------------------------------------------------------
   NAV + MEGA MENU
   ---------------------------------------------------------------- */
.nav { position: sticky; top: 0; z-index: 200; }
.nav-bar {
  background: rgba(247,245,238,.82); backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .2s, background .2s;
}
.nav.scrolled .nav-bar { border-bottom-color: var(--line); }
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 22px; }
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand img { height: 30px; width: auto; }

.nav-links { display: flex; align-items: stretch; gap: 4px; height: 100%; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-trigger {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: var(--radius-pill, 999px);
  border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); transition: background .15s, color .15s; white-space: nowrap;
}
.nav-trigger .caret { width: 11px; height: 11px; transition: transform .2s; opacity: .6; }
.nav-item:hover .nav-trigger,
.nav-trigger.active { color: var(--ink); background: var(--panel); }
.nav-item:hover .nav-trigger .caret { transform: rotate(180deg); }

.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* mega panel */
.mega {
  position: absolute; top: calc(100% + 10px); left: 0; transform: translateY(8px);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 22px; z-index: 210;
}
.mega--right { left: auto; right: 0; }
.nav-item:hover .mega { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.mega::before { content:''; position: absolute; top: -12px; left: 0; right: 0; height: 14px; }
.mega-grid { display: grid; gap: 22px; }
.mega-col-title { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); font-weight: 600; margin: 2px 0 12px; }
.mega-link { display: flex; gap: 13px; align-items: flex-start; padding: 9px 11px; border-radius: 12px; transition: background .14s; }
.mega-link:hover { background: var(--bg); }
.mega-link .mi {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-deep);
}
.mega-link b { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.mega-link small { display: block; font-size: 12.5px; color: var(--mute); margin-top: 1px; line-height: 1.4; }
.mega-promo {
  border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; justify-content: space-between;
  gap: 16px; color: var(--ink);
}
.mega-promo h4 { font-size: 18px; margin: 0 0 6px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.mega-promo p { font-size: 13px; margin: 0; color: var(--ink-2); }

/* mobile nav */
.nav-burger { display: none; width: 42px; height: 42px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); place-items: center; }
.mobile-nav { display: none; }
@media (max-width: 1000px){
  .nav-links, .nav-actions .desktop-only { display: none; }
  .nav-burger { display: grid; }
  .mobile-nav.open { display: block; }
  .mobile-nav { position: fixed; inset: 70px 0 0; background: var(--bg); z-index: 190; overflow-y: auto; padding: 18px 20px 60px; }
  .mobile-nav a { display: block; padding: 13px 4px; font-size: 17px; border-bottom: 1px solid var(--line); }
  .mobile-nav .mgrp { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); margin: 22px 0 4px; }
}

/* ----------------------------------------------------------------
   BUTTONS
   ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 19px; border-radius: 999px; font-size: 14.5px; font-weight: 500;
  border: 1px solid transparent; transition: transform .15s, background .15s, border-color .15s, color .15s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: 14px 26px; font-size: 15.5px; }
.btn-sm { padding: 8px 15px; font-size: 13.5px; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: #322f26; }
.btn-brand { background: var(--brand-deep); color: #fff; }
.btn-brand:hover { background: var(--brand-ink); }
.btn-outline { border-color: var(--line); background: var(--panel); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); background: var(--panel); }
.btn-light { background: var(--bg); color: var(--ink); }
.btn-light:hover { background: var(--peach); }
.arrowlink { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--brand-ink); font-size: 15px; }
.arrowlink svg { transition: transform .18s; }
.arrowlink:hover svg { transform: translateX(4px); }

/* language toggle */
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--panel); }
.lang button { padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--mute); line-height: 1; }
.lang button.on { background: var(--ink); color: var(--bg); }

/* ----------------------------------------------------------------
   TYPE + SECTION SCAFFOLDING
   ---------------------------------------------------------------- */
.display { font-family: 'Instrument Serif', serif; font-weight: 400; letter-spacing: -0.02em; line-height: 0.98;
  font-size: clamp(44px, 6.2vw, 84px); margin: 0; }
.display em, .h-sec em { font-style: italic; color: var(--brand-deep); }
section { padding: 104px 0; }
@media (max-width: 700px){ section { padding: 72px 0; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; font-size: 12px; padding: 6px 13px 6px 11px;
  border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-2);
  font-weight: 500; margin-bottom: 24px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-deep); font-weight: 600;
  margin-bottom: 18px; display: flex; align-items: center; gap: 9px; }
.kicker::before { content:''; width: 22px; height: 1px; background: var(--brand); }
.h-sec { font-family: 'Instrument Serif', serif; font-weight: 400; letter-spacing: -0.02em; line-height: 1.02;
  font-size: clamp(34px, 4.8vw, 60px); margin: 0 0 18px; }
.shead { max-width: 720px; margin-bottom: 56px; }
.shead p { font-size: 18px; color: var(--ink-2); margin: 0; }
.lede { font-size: 19px; color: var(--ink-2); }

/* ----------------------------------------------------------------
   CARDS + GRID HELPERS
   ---------------------------------------------------------------- */
.grid2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
@media (max-width: 940px){ .grid3, .grid4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px){ .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; transition: transform .16s, border-color .16s, box-shadow .16s; }
.card.hover:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: var(--shadow); }
.card .ci { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 18px; background: var(--brand-soft); color: var(--brand-deep); }
.card h3 { font-size: 19px; margin: 0 0 8px; font-weight: 600; letter-spacing: -.01em; }
.card p { font-size: 14.5px; color: var(--ink-2); margin: 0; }

/* tinted panels */
.tint { border-radius: var(--radius-xl); padding: 40px; }
.tint-mint { background: var(--mint); } .tint-peach { background: var(--peach); }
.tint-sky { background: var(--sky); } .tint-lav { background: var(--lav); }
.tint-blush { background: var(--blush); } .tint-brand { background: var(--brand-soft); }

/* pills / tags */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  padding: 4px 10px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.tag.s { font-size: 10.5px; padding: 3px 8px; }

/* stat */
.stat-n { font-family: 'Instrument Serif', serif; font-size: 56px; line-height: 1; letter-spacing: -.02em; }
.stat-n em { font-style: normal; color: var(--brand-deep); }
.stat-l { font-size: 13.5px; color: var(--ink-2); margin-top: 10px; }

/* ----------------------------------------------------------------
   DARK BAND
   ---------------------------------------------------------------- */
.band-dark { background: var(--dark); color: var(--on-dark); }
.band-dark .kicker { color: #c9d3ad; } .band-dark .kicker::before { background: #c9d3ad; }
.band-dark .h-sec em, .band-dark .display em { color: var(--butter); }
.band-dark .shead p, .band-dark .lede { color: var(--on-dark-2); }

/* ----------------------------------------------------------------
   FOOTER
   ---------------------------------------------------------------- */
.site-footer { padding: 72px 0 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 52px; }
@media (max-width: 860px){ .foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
.site-footer h5 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; }
.site-footer ul a:hover { color: var(--ink); }
.foot-bottom { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 26px; border-top: 1px solid var(--line); color: var(--mute); font-size: 13.5px; }

/* ----------------------------------------------------------------
   REVEAL
   ---------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"]{ transition-delay: .06s; } .reveal[data-d="2"]{ transition-delay: .12s; }
.reveal[data-d="3"]{ transition-delay: .18s; } .reveal[data-d="4"]{ transition-delay: .24s; }
@media (prefers-reduced-motion: reduce){ .reveal { opacity: 1; transform: none; transition: none; } }
