/* ==========================================================================
   Claude Usage Tray — landing page
   Own visual identity: warm cream / brown / orange. No Anthropic assets.
   ========================================================================== */

:root {
  --cream:      #faf6ee;
  --cream-2:    #f3ecdd;
  --surface:    #ffffff;
  --surface-2:  #f6efe2;
  --ink:        #2a2622;
  --ink-soft:   #4a443c;
  --muted:      #7c7364;
  --line:       #e8ddca;
  --line-soft:  #efe6d6;

  --orange:     #df6e3c;
  --orange-ink: #b8552a;
  --orange-2:   #e88a52;
  --green:      #6f9b6b;
  --amber:      #e0a44e;

  --shadow-sm:  0 1px 2px rgba(58, 42, 24, .06), 0 2px 6px rgba(58, 42, 24, .05);
  --shadow-md:  0 8px 24px rgba(58, 42, 24, .09), 0 2px 8px rgba(58, 42, 24, .05);
  --shadow-lg:  0 24px 60px rgba(58, 42, 24, .16), 0 6px 18px rgba(58, 42, 24, .08);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --maxw: 1160px;

  --sans: "Segoe UI", ui-sans-serif, system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", ui-serif, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --cream:      #201d19;
    --cream-2:    #262219;
    --surface:    #2a2721;
    --surface-2:  #322e26;
    --ink:        #f3ede2;
    --ink-soft:   #d8cfc0;
    --muted:      #a89e8d;
    --line:       #3b362d;
    --line-soft:  #33302a;

    --orange:     #e5814f;
    --orange-ink: #eea079;
    --orange-2:   #ed9663;
    --green:      #8bbf85;
    --amber:      #e6b76c;

    --shadow-sm:  0 1px 2px rgba(0,0,0,.3);
    --shadow-md:  0 10px 28px rgba(0,0,0,.4);
    --shadow-lg:  0 26px 64px rgba(0,0,0,.55);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 82% -8%, rgba(223,110,60,.10), transparent 60%),
    radial-gradient(760px 460px at 6% 4%, rgba(111,155,107,.09), transparent 55%),
    var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

a { color: var(--orange-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 10px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

/* ===== Navigation ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  background: color-mix(in srgb, var(--cream) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.nav.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; filter: drop-shadow(0 2px 4px rgba(58,42,24,.14)); }
.brand-text { display: flex; align-items: center; gap: 9px; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--orange-ink); background: color-mix(in srgb, var(--orange) 15%, transparent);
  padding: 3px 7px; border-radius: 999px;
}

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links > a {
  color: var(--ink-soft); font-weight: 550; font-size: 14.5px;
  padding: 8px 12px; border-radius: 9px; transition: background .15s, color .15s;
}
.nav-links > a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav-github {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--ink); color: var(--cream) !important; font-weight: 600;
  margin-left: 4px;
}
.nav-github:hover { background: var(--ink-soft); filter: brightness(1.05); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: inherit; font-size: 15px; font-weight: 650; line-height: 1.15;
  padding: 13px 20px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s, filter .15s, background .15s, border-color .15s;
  text-align: center; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { filter: brightness(1.04); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); filter: brightness(.97); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--orange); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn-sub { display: block; font-size: 11.5px; font-weight: 500; opacity: .82; margin-top: 2px; }
.btn.is-recommended { box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 34%, transparent), var(--shadow-md); }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; filter: grayscale(.2); }

/* ===== Shared section bits ===== */
.section { padding: 92px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--orange-ink);
  background: color-mix(in srgb, var(--orange) 12%, transparent);
  padding: 7px 14px; border-radius: 999px; margin: 0 0 22px;
  border: 1px solid color-mix(in srgb, var(--orange) 22%, transparent);
}
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 26%, transparent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.kicker { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--orange-ink); margin: 0 0 14px; }
.section-head { max-width: 640px; margin: 0 auto 54px; text-align: center; }
.section-head h2, .privacy-inner h2, .calc-copy h2 { font-size: clamp(28px, 4.2vw, 42px); }
.section-lede { color: var(--muted); font-size: 17px; margin: 16px 0 0; }

/* ===== Hero ===== */
.hero { padding: 60px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-copy h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(38px, 6vw, 66px); letter-spacing: -.025em; }
.lede { color: var(--ink-soft); font-size: clamp(17px, 2vw, 20px); max-width: 34ch; margin: 22px 0 30px; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-hint {
  margin: 18px 0 0; font-size: 14px; color: var(--orange-ink); font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
}
.hero-hint::before { content: "◆"; font-size: 9px; }
.hero-sub { margin: 14px 0 0; font-size: 13.5px; color: var(--muted); }

/* Hero mockup */
.hero-visual { position: relative; display: grid; place-items: center; }
.tray-arrow {
  position: absolute; top: -14px; right: 64px; width: 26px; height: 26px;
  background: var(--surface); border: 1px solid var(--line); border-right: 0; border-bottom: 0;
  transform: rotate(45deg); border-radius: 5px 0 0 0; z-index: 2;
}
@media (prefers-color-scheme: dark) { .tray-arrow { background: var(--surface); } }
.mock {
  position: relative; z-index: 1; margin: 0; width: min(340px, 100%);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 6px; overflow: hidden;
  animation: floaty 7s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.mock-titlebar { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 8px 14px; }
.mock-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: 13.5px; }
.mock-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); }
.mock-actions { display: flex; gap: 5px; }
.mock-actions span { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.mock-seg { display: flex; gap: 3px; margin: 0 12px 10px; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.mock-seg-btn { flex: 1; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px; border-radius: 8px; cursor: default; }
.mock-seg-btn.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.mock-body { padding: 2px 16px 16px; }
.mock-eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 8px; }
.mock-headline { display: flex; align-items: baseline; gap: 5px; }
.mock-big { font-size: 46px; font-weight: 700; letter-spacing: -.03em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.mock-unit { font-size: 15px; font-weight: 600; color: var(--muted); }
.mock-meter { height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; margin: 14px 0 8px; }
.mock-meter-sm { height: 7px; margin: 8px 0 4px; }
.mock-meter-fill { height: 100%; width: 0; border-radius: 6px; background: var(--green); transition: width 1.1s cubic-bezier(.2,.7,.2,1); }
.mock-meter-fill.amber { background: var(--amber); }
.is-visible .mock-meter-fill { width: var(--w); }
.mock-meta { font-size: 12px; color: var(--muted); margin: 4px 0; }
.mock-divider { height: 1px; background: var(--line); margin: 15px 0; }
.mock-row-head { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; }
.mock-row-val { font-weight: 700; }
.mock-btn-row { display: flex; gap: 8px; margin-top: 16px; }
.mock-btn { flex: 1; text-align: center; font-size: 13px; font-weight: 650; padding: 9px; border-radius: 10px; background: var(--orange); color: #fff; }
.mock-btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

/* ===== Trust strip ===== */
.strip { padding: 8px 0 12px; }
.strip-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 22px 18px; box-shadow: var(--shadow-sm);
}
.strip-item { text-align: center; display: flex; flex-direction: column; gap: 2px; position: relative; }
.strip-item + .strip-item::before { content: ""; position: absolute; left: -7px; top: 50%; transform: translateY(-50%); height: 34px; width: 1px; background: var(--line); }
.strip-item strong { font-size: 18px; color: var(--ink); }
.strip-item span { font-size: 13px; color: var(--muted); }

/* ===== Feature cards ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 26px 24px; box-shadow: var(--shadow-sm);
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--orange) 40%, var(--line)); }
.card-ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  color: var(--orange-ink); background: color-mix(in srgb, var(--orange) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--orange) 20%, transparent);
}
.card-ico svg { width: 24px; height: 24px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ===== Calculator ===== */
.section-calc {
  background:
    linear-gradient(180deg, transparent, color-mix(in srgb, var(--orange) 5%, transparent) 50%, transparent),
    var(--cream-2);
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
}
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.flow { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.flow-step {
  display: flex; align-items: center; gap: 14px; position: relative;
  padding: 11px 0;
}
.flow-step:not(:last-child)::after {
  content: ""; position: absolute; left: 16px; top: 44px; bottom: -4px; width: 2px;
  background: linear-gradient(var(--orange), color-mix(in srgb, var(--orange) 25%, transparent));
  border-radius: 2px;
}
.flow-num {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 15px; color: #fff; background: var(--orange);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 16%, transparent); position: relative; z-index: 1;
}
.flow-label { font-weight: 600; font-size: 16px; }
.calc-disclaimer { margin: 28px 0 0; font-size: 13px; color: var(--muted); font-style: italic; max-width: 46ch; }

.result-card {
  margin: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow-lg);
}
.result-verdict { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; }
.verdict-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 20%, transparent); }
.result-prob { height: 14px; background: var(--surface-2); border-radius: 8px; overflow: hidden; margin: 18px 0 8px; }
.result-prob-fill { height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, var(--green), var(--amber)); transition: width 1.2s cubic-bezier(.2,.7,.2,1); }
.is-visible .result-prob-fill { width: var(--w); }
.result-prob-label { font-size: 13px; color: var(--muted); margin: 0 0 20px; font-variant-numeric: tabular-nums; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.result-grid .k { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.result-grid .v { display: block; font-size: 18px; font-weight: 700; }
.pill-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.result-note { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); font-style: italic; }

/* ===== Download ===== */
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 900px; margin-inline: auto; }
.dl-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, border-color .25s, transform .25s;
  display: flex; flex-direction: column;
}
.dl-card:hover { box-shadow: var(--shadow-md); }
.dl-card.is-recommended { border-color: color-mix(in srgb, var(--orange) 55%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 16%, transparent), var(--shadow-md); }
.dl-badge {
  position: absolute; top: -12px; left: 28px;
  background: var(--orange); color: #fff; font-size: 12px; font-weight: 650;
  padding: 5px 12px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.dl-top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.dl-ico { flex: none; width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); }
.dl-top h3 { font-size: 22px; }
.dl-meta { color: var(--muted); font-size: 13.5px; margin: 3px 0 0; }
.dl-list { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.dl-list li { position: relative; padding-left: 24px; font-size: 14.5px; color: var(--ink-soft); }
.dl-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.dl-card .btn-block { margin-top: auto; }
.dl-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
.dl-split .btn { flex-direction: column; padding: 12px; }
.dl-file { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.dl-file code { background: var(--surface-2); padding: 2px 7px; border-radius: 6px; font-size: 12px; border: 1px solid var(--line-soft); }

.dl-foot { max-width: 760px; margin: 40px auto 0; text-align: center; color: var(--ink-soft); font-size: 14.5px; }
.dl-foot .dl-note { color: var(--muted); font-size: 13px; margin-top: 10px; }
.tag-soft {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--orange-ink);
  background: color-mix(in srgb, var(--orange) 12%, transparent); padding: 3px 10px; border-radius: 999px; margin-right: 6px;
}

/* ===== Privacy ===== */
.section-privacy { padding-bottom: 100px; }
.privacy-inner { max-width: 720px; margin-inline: auto; text-align: center; }
.privacy-points { display: grid; gap: 12px; margin-top: 34px; text-align: left; }
.pp {
  display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.pp-check { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--green); background: color-mix(in srgb, var(--green) 16%, transparent); }

/* ===== Footer ===== */
.footer { background: var(--cream-2); border-top: 1px solid var(--line); padding: 54px 0 40px; }
.footer-grid { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-brand .brand-name { font-size: 17px; }
.footer-brand p { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-soft); font-weight: 550; font-size: 14.5px; }
.footer-legal { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.footer-legal p { color: var(--muted); font-size: 12.5px; margin: 4px 0; max-width: 74ch; }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .06s; }
.reveal:nth-child(3) { transition-delay: .12s; }
.reveal:nth-child(4) { transition-delay: .18s; }
.reveal:nth-child(5) { transition-delay: .24s; }
.reveal:nth-child(6) { transition-delay: .30s; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-grid, .calc-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding-top: 34px; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .lede { max-width: 46ch; }
  .hero-cta { justify-content: center; }
  .hero-visual { order: -1; }
  .calc-copy { text-align: center; }
  .flow { align-items: center; }
  .flow-step { justify-content: flex-start; width: max-content; margin-inline: auto; min-width: 220px; }
  .calc-disclaimer { margin-inline: auto; text-align: center; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .wrap { padding-inline: 18px; }
  .section { padding: 64px 0; }
  .nav-links > a:not(.nav-github) { display: none; }
  .cards { grid-template-columns: 1fr; }
  .strip-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
  .strip-item:nth-child(2)::before, .strip-item:nth-child(4)::before { display: none; }
  .dl-grid { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; gap: 22px; }
}

@media (max-width: 380px) {
  .dl-split { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .mock { animation: none; }
  .mock-meter-fill, .result-prob-fill { transition: none; }
}
