/* ============================================================
   Husky Notes — marketing site
   Blue Husky palette · dark + light (Husky Day) themes
   ============================================================ */

:root {
  /* Blue Husky (dark) — default */
  --bg:         #0B1622;
  --bg-2:       #0E1B27;
  --surface:    #13202E;
  --surface-2:  #182B3C;
  --border:     #21384C;
  --text:       #E6EEF5;
  --text-2:     #8FA6B8;
  --accent:     #3DA9FC;
  --accent-2:   #7FD0FF;
  --accent-ink: #04243b;
  --quote:      #2C6E9B;
  --code-bg:    #0E1B27;
  --shadow:     0 24px 60px -20px rgba(0,0,0,.65);
  --shadow-sm:  0 8px 24px -10px rgba(0,0,0,.5);
  --radius:     18px;
  --radius-sm:  12px;
  --maxw:       1140px;
  --font:       'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono:       'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

html[data-theme="light"] {
  /* Husky Day (light) */
  --bg:         #F4F8FB;
  --bg-2:       #FFFFFF;
  --surface:    #FFFFFF;
  --surface-2:  #EEF4F9;
  --border:     #DCE7F0;
  --text:       #0B1622;
  --text-2:     #5A7184;
  --accent:     #2C82C9;
  --accent-2:   #1F6BAA;
  --accent-ink: #FFFFFF;
  --quote:      #9CC3DE;
  --code-bg:    #EEF4F9;
  --shadow:     0 24px 60px -24px rgba(20,50,80,.28);
  --shadow-sm:  0 8px 24px -12px rgba(20,50,80,.22);
}

/* ---------- base ---------- */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .35s ease, color .35s ease;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1,h2,h3,h4 { line-height: 1.12; letter-spacing: -.02em; font-weight: 800; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: var(--accent-ink);
  box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--accent) 75%, transparent); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-2); }
.btn--light { background: var(--text); color: var(--bg); }
.btn--light:hover { transform: translateY(-2px); }
.btn--lg { padding: 14px 26px; font-size: 16px; }
.btn--block { display: flex; justify-content: center; width: 100%; }

.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
.grad {
  background: linear-gradient(120deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.brand__name { font-size: 18px; }
.brand__mark { display: inline-grid; place-items: center; }
.nav__links { display: flex; gap: 26px; margin-left: 12px; margin-right: auto; }
.nav__links a { color: var(--text-2); font-weight: 500; font-size: 15px; transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  cursor: pointer; transition: border-color .2s, transform .15s;
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle .icon { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--sun { display: none; }
html[data-theme="light"] .icon--moon { display: none; }
html[data-theme="light"] .icon--sun  { display: block; }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 70px 0 90px; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero__title { font-size: clamp(34px, 5vw, 58px); margin-bottom: 20px; }
.hero__sub { color: var(--text-2); font-size: clamp(16px, 1.4vw, 19px); max-width: 30em; margin-bottom: 28px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.hero__note { color: var(--text-2); font-size: 14px; }
.hero__note a { color: var(--accent); font-weight: 600; }

.hero__art { position: relative; min-height: 440px; }
.glow {
  position: absolute; inset: -10% -20% auto auto; width: 520px; height: 520px;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 62%);
  filter: blur(20px); z-index: -1; pointer-events: none;
}

/* ---------- device mockups ---------- */
.device {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
}
.device--mac { width: 100%; max-width: 560px; }
.device__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot--r { background: #ff5f57; } .dot--y { background: #febc2e; } .dot--g { background: #28c840; }
.device__title { margin-left: 10px; font-size: 12.5px; color: var(--text-2); font-family: var(--mono); }
.device__body { display: grid; grid-template-columns: 150px 1fr; min-height: 300px; }
.device__body--full { grid-template-columns: 1fr; }

.app-sidebar { background: var(--bg-2); border-right: 1px solid var(--border); padding: 12px 8px; font-size: 13px; }
.app-sidebar__item { padding: 7px 10px; border-radius: 8px; color: var(--text-2); }
.app-sidebar__item--active { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-2); font-weight: 600; }
.app-sidebar__sep { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-2); padding: 14px 10px 6px; opacity: .7; }

.app-editor { padding: 22px 24px; position: relative; }
.app-editor--wide { padding: 26px 30px; }
.md-h1 { font-size: 21px; margin-bottom: 12px; color: var(--accent-2); }
.md-h2 { color: var(--accent-2); font-weight: 700; }
.md-p { color: var(--text); margin-bottom: 11px; font-size: 14.5px; }
.md-bold { font-weight: 700; }
.md-syntax { color: var(--text-2); opacity: .6; font-family: var(--mono); font-size: 13px; }
.md-quote { border-left: 3px solid var(--quote); padding-left: 12px; color: var(--text-2); font-style: italic; }
.md-list { list-style: none; padding: 0; margin: 0 0 11px; }
.md-list li { font-size: 14.5px; padding: 3px 0; color: var(--text); }
.md-check { color: var(--accent); font-weight: 800; margin-right: 8px; }
.md-code { font-family: var(--mono); font-size: .88em; background: var(--code-bg); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; color: var(--accent-2); }
.md-pre { font-family: var(--mono); font-size: 12.5px; background: var(--code-bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; color: var(--text); white-space: pre-wrap; line-height: 1.5; }
.md-tag { display: inline-block; font-family: var(--mono); font-size: 12.5px; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); padding: 2px 8px; border-radius: 999px; margin-right: 6px; }
.caret { display: inline-block; width: 2px; height: 18px; background: var(--accent); vertical-align: middle; animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.device--phone {
  position: absolute; right: -6px; bottom: -34px; width: 188px;
  border-radius: 30px; padding: 8px; background: var(--surface-2);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.device__notch { width: 64px; height: 16px; background: var(--bg); border-radius: 0 0 12px 12px; margin: 0 auto 8px; }
.phone-body { background: var(--bg-2); border-radius: 22px; padding: 14px 12px; }
.phone-h { font-weight: 800; font-size: 17px; margin-bottom: 12px; }
.phone-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 9px; }
.phone-card strong { display: block; font-size: 13px; }
.phone-card span { display: block; font-size: 11.5px; color: var(--text-2); margin-top: 2px; }
.phone-card--accent { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.float { animation: float 6s ease-in-out infinite; }
.float-slow { animation: float 8s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- trust strip ---------- */
.strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-2); }
.strip__inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; padding: 18px 24px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.dot-sep { opacity: .4; }

/* ---------- generic section ---------- */
.section { padding: 92px 0; }
.section--alt { background: var(--bg-2); }
.section__head { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.section__head h2 { font-size: clamp(26px, 3.4vw, 40px); margin-bottom: 14px; }
.section__head p { color: var(--text-2); font-size: 17px; }

/* ---------- feature cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); box-shadow: var(--shadow-sm); }
.card__icon {
  width: 50px; height: 50px; display: grid; place-items: center; font-size: 24px;
  border-radius: 14px; background: color-mix(in srgb, var(--accent) 14%, transparent); margin-bottom: 16px;
}
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 15px; }

/* ---------- split sections ---------- */
.split { padding: 92px 0; }
.split--reverse { background: var(--bg-2); }
.split__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split--reverse .split__art { order: -1; }
.split__copy h2 { font-size: clamp(26px, 3.2vw, 38px); margin-bottom: 16px; }
.split__copy > p { color: var(--text-2); font-size: 17px; margin-bottom: 22px; }
.ticks { list-style: none; padding: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; color: var(--text); }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: var(--accent-ink); background: var(--accent);
}

/* ---------- themes gallery ---------- */
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.theme-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface); transition: transform .2s, box-shadow .2s; }
.theme-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.theme-card__preview { padding: 22px 18px 26px; display: flex; flex-direction: column; gap: 9px; min-height: 150px; }
.theme-card__preview b { font-size: 14px; }
.tp-line { height: 8px; border-radius: 4px; background: rgba(255,255,255,.16); width: 100%; }
.tp-line--short { width: 55%; }
.tp-line--accent { width: 72%; }

.theme-card--husky  .theme-card__preview { background: #0B1622; color: #E6EEF5; }
.theme-card--husky  .tp-line--accent { background: #3DA9FC; }
.theme-card--day    .theme-card__preview { background: #F7FAFC; color: #0B1622; }
.theme-card--day    .tp-line { background: rgba(11,22,34,.12); }
.theme-card--day    .tp-line--accent { background: #2C82C9; }
.theme-card--forest .theme-card__preview { background: #0F1B17; color: #A7F3D0; }
.theme-card--forest .tp-line--accent { background: #5BD6A0; }
.theme-card--ember  .theme-card__preview { background: #1A1212; color: #FBC9A0; }
.theme-card--ember  .tp-line--accent { background: #F0883E; }

.theme-card__meta { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-top: 1px solid var(--border); }
.theme-card__name { font-weight: 600; font-size: 14px; }
.swatches { display: flex; gap: 5px; }
.swatches i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15); }

/* ---------- sync graphic ---------- */
.sync-graphic { position: relative; height: 280px; max-width: 360px; margin: 0 auto; }
.sync-node, .sync-cloud {
  position: absolute; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-sm); font-size: 28px;
}
.sync-node { width: 64px; height: 64px; }
.sync-node--phone { left: 28px; top: 50px; }
.sync-node--mac { right: 28px; top: 50px; }
.sync-node--pad { left: 50%; transform: translateX(-50%); bottom: 14px; }
.sync-cloud { left: 50%; transform: translateX(-50%); top: 96px; width: auto; height: auto; padding: 12px 18px; font-size: 15px; font-weight: 700; border-color: var(--accent); color: var(--accent-2); }
.sync-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.sync-lines path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 6; opacity: .55; animation: dash 1.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -22; } }

/* ---------- open source ---------- */
.open { padding: 92px 0; }
.open__inner {
  display: grid; grid-template-columns: 1.2fr .9fr; gap: 48px; align-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface));
  border: 1px solid var(--border); border-radius: 28px; padding: 48px;
}
.open__copy h2 { font-size: clamp(26px, 3.2vw, 38px); margin-bottom: 14px; }
.open__copy p { color: var(--text-2); font-size: 17px; margin-bottom: 24px; }
.open__copy strong { color: var(--text); }
.open__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.open__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; text-align: center; }
.stat b { display: block; font-size: 26px; color: var(--accent-2); font-family: var(--mono); }
.stat span { font-size: 13px; color: var(--text-2); }

/* ---------- pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 24px; justify-content: center; }
.pricing--single { grid-template-columns: minmax(0, 440px); }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; position: relative; }
.plan--featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-sm); }
.plan__badge { position: absolute; top: -13px; left: 32px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.plan__name { font-size: 20px; margin-bottom: 8px; }
.plan__price { font-size: 40px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 4px; display: flex; align-items: baseline; gap: 8px; }
.plan__price small { font-size: 14px; font-weight: 500; color: var(--text-2); }
.plan__tag { color: var(--text-2); margin-bottom: 22px; }
.plan__list { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 11px; }
.plan__list li { position: relative; padding-left: 26px; font-size: 15px; }
.plan__list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq__item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 4px 20px; transition: border-color .2s ease;
}
.faq__item[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.faq__item summary {
  list-style: none; cursor: pointer; font-weight: 600; font-size: 16.5px;
  padding: 16px 32px 16px 0; position: relative; color: var(--text);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 400; color: var(--accent); line-height: 1; transition: transform .2s ease;
}
.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.faq__item p { color: var(--text-2); font-size: 15.5px; padding: 0 0 18px; max-width: 64ch; }
.faq__item p a { color: var(--accent); font-weight: 600; }

/* ---------- final CTA ---------- */
.cta { padding: 100px 0; text-align: center; background: var(--bg-2); }
.cta__inner { display: flex; flex-direction: column; align-items: center; }
.brand__mark--lg { margin-bottom: 20px; }
.cta h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 14px; }
.cta p { color: var(--text-2); font-size: 18px; max-width: 32em; margin-bottom: 28px; }
.cta__buttons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.cta__note { font-size: 13px; color: var(--text-2); margin-top: 18px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 56px 0 28px; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer__brand p { color: var(--text-2); font-size: 14px; margin-top: 12px; max-width: 26em; }
.footer__col h4 { font-size: 14px; margin-bottom: 14px; }
.footer__col a { display: block; color: var(--text-2); font-size: 14px; padding: 5px 0; transition: color .2s; }
.footer__col a:hover { color: var(--accent); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--text-2); font-size: 13px; }
.footer__legal a:hover { color: var(--accent); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { min-height: 360px; margin-top: 10px; }
  .split__inner, .open__inner { grid-template-columns: 1fr; }
  .split--reverse .split__art { order: 0; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .themes { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .open__inner { padding: 36px 28px; }
}
@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__links.is-open {
    display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 16px 24px; gap: 6px;
  }
  .nav__links.is-open a { padding: 10px 0; }
  .nav__burger { display: flex; }
  .nav__cta { display: none; }
  .pricing { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .device--phone { display: none; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .section, .split, .open { padding: 64px 0; }
}
@media (max-width: 460px) {
  .themes { grid-template-columns: 1fr; }
  .open__stats { grid-template-columns: 1fr 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
