/*
  Greezmate web user guide.

  Tokens come from the brand guide (.claude/brand/BRAND_STYLE_GUIDE.md, v1.01).
  Contrast note: flat brand orange #FF7300 is only 2.9:1 on white. It is used for rules,
  fills and text on black. Large headings on white use --orange-strong (3.6:1, passes AA
  for large text); small orange text uses --orange-ink (5.6:1, passes AA).
*/

@font-face { font-family: "Geologica"; font-weight: 400; font-display: swap; src: url("fonts/Geologica-Regular.ttf") format("truetype"); }
@font-face { font-family: "Geologica"; font-weight: 600; font-display: swap; src: url("fonts/Geologica-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Geologica"; font-weight: 700; font-display: swap; src: url("fonts/Geologica-Bold.ttf") format("truetype"); }
@font-face { font-family: "Geologica"; font-weight: 900; font-display: swap; src: url("fonts/Geologica-Black.ttf") format("truetype"); }

:root {
  --orange: #FF7300;
  --orange-top: #FF4427;
  --orange-strong: #E65C00;
  --orange-ink: #B83F00;
  --black: #000000;
  --white: #FFFFFF;
  --peach: #FFB37B;
  --friendly: #FFE2C9;
  --ink: #1F1F1F;
  --muted: #6B6B6B;
  --rule: #E3E3E3;
  --row-tint: #FFF7F0;
  --warn-tint: #FFF6E4;
  --warning: #FFBB47;
  --success: #3BBE6B;

  --topbar-h: 64px;
  --sidebar-w: 288px;
  --measure: 760px;
  --gutter: 48px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Geologica", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 12px; top: -48px; z-index: 50; background: var(--orange); color: var(--black); font-weight: 600; padding: 10px 16px; text-decoration: none; }
.skip:focus { top: 12px; }

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

/* ---- top bar ---- */

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  background: var(--black);
  border-bottom: 3px solid var(--orange);
}
.brand { display: flex; align-items: center; }
.brand img { display: block; height: 32px; width: auto; }
.topbar-label {
  margin-left: 4px; padding-left: 16px; border-left: 1px solid #3a3a3a;
  color: var(--peach); font-weight: 600; font-size: 14px; letter-spacing: .04em;
}
.menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border: 0; background: transparent; color: var(--white); cursor: pointer;
}
.menu-btn:focus-visible { outline-color: var(--peach); }

/* ---- layout ---- */

.layout { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.content { min-width: 0; }
.wrap { max-width: calc(var(--measure) + 2 * var(--gutter)); padding-inline: var(--gutter); }

/* ---- sidebar ---- */

.sidebar {
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h)); overflow-y: auto;
  padding: 28px 0 40px;
  border-right: 1px solid var(--rule);
  background: var(--white);
}
.sidebar-title { margin: 0 24px 12px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sidebar ol { list-style: none; margin: 0; padding: 0; }
.sidebar a {
  display: flex; gap: 12px; align-items: baseline;
  padding: 8px 24px; border-left: 3px solid transparent;
  color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.4;
}
.sidebar a:hover { background: var(--row-tint); }
.sidebar a[aria-current="true"] { border-left-color: var(--orange); background: var(--row-tint); font-weight: 600; }
.nav-num { flex: none; width: 1.7em; font-weight: 700; color: var(--orange-ink); font-variant-numeric: tabular-nums; }

.scrim { position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 25; background: rgba(0, 0, 0, .55); }

/* ---- hero ---- */

.hero { background: var(--black); padding: 88px 0 80px; }
.hero-title {
  margin: 0; font-weight: 900; font-size: clamp(44px, 8vw, 76px); line-height: 1.02; letter-spacing: -.01em; color: var(--white);
}
.hero-title span { color: var(--orange); }
.hero-sub { margin: 28px 0 0; max-width: 32em; font-size: clamp(17px, 2.2vw, 20px); line-height: 1.55; color: var(--peach); }
.hero-meta { margin: 48px 0 0; font-size: 13px; color: #9a9a9a; }

/* ---- contents cards ---- */

.toc { padding: 56px 0 24px; }
.toc-title { margin: 0 0 24px; font-weight: 900; font-size: 28px; line-height: 1.2; }
.toc-title::after { content: ""; display: block; width: 42px; height: 3px; margin-top: 12px; background: var(--orange); }
.toc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.toc-card {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  padding: 16px 18px; border: 1px solid var(--rule); border-top: 3px solid var(--black);
  color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.35;
  transition: border-color .15s, background-color .15s;
}
.toc-card:hover { border-top-color: var(--orange); background: var(--row-tint); }
.toc-num { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--orange-ink); }

/* ---- section band ---- */

.guide-section { margin-top: 56px; }
.band { background: var(--black); padding: 56px 0 52px; }
.band-num { margin: 0 0 8px; font-weight: 700; font-size: 15px; letter-spacing: .14em; color: var(--orange); }
.band-title { margin: 0; font-weight: 900; font-size: clamp(32px, 5vw, 48px); line-height: 1.1; color: var(--white); }
.band-blurb { margin: 16px 0 0; max-width: 34em; font-size: 18px; line-height: 1.55; color: var(--peach); }
.section-body { padding-top: 40px; padding-bottom: 24px; }

/* ---- headings ---- */

h3.major { margin: 48px 0 20px; font-weight: 900; font-size: 28px; line-height: 1.2; color: var(--black); }
h3.major::after { content: ""; display: block; width: 42px; height: 3px; margin-top: 12px; background: var(--orange); }
h3.major:first-child { margin-top: 0; }
h3.sub { margin: 44px 0 12px; font-weight: 700; font-size: 22px; line-height: 1.3; color: var(--orange-strong); }
h4.minor { margin: 28px 0 8px; font-weight: 600; font-size: 17px; line-height: 1.4; color: var(--black); }

.anchor {
  display: inline-flex; vertical-align: middle; margin-left: 8px; padding: 4px;
  color: var(--muted); opacity: 0; transition: opacity .15s;
}
h3:hover .anchor, .anchor:focus-visible { opacity: 1; }
.anchor:hover { color: var(--orange-ink); }
@media (hover: none) { .anchor { opacity: .5; } }

/* ---- body copy ---- */

p { margin: 0 0 16px; }
b, strong { font-weight: 700; }
.lead { font-size: 19px; line-height: 1.65; margin-bottom: 20px; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }

.steps { list-style: none; margin: 8px 0 24px; padding: 0; counter-reset: step; }
.steps li { position: relative; margin: 0 0 12px; padding-left: 44px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--black); color: var(--orange); font-weight: 700; font-size: 14px; line-height: 1;
}

.bullets { list-style: none; margin: 8px 0 24px; padding: 0; }
.bullets li { position: relative; margin: 0 0 8px; padding-left: 24px; }
.bullets li::before { content: ""; position: absolute; left: 6px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }

/* ---- tables ---- */

.table-wrap { margin: 8px 0 28px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
th { padding: 12px 16px; background: var(--black); color: var(--white); font-weight: 600; text-align: left; }
td { padding: 12px 16px; vertical-align: top; border-bottom: 1px solid var(--rule); }
tbody tr:nth-child(even) { background: var(--row-tint); }
td:first-child { font-weight: 600; }

/* ---- callouts ---- */

.callout { margin: 8px 0 28px; padding: 16px 20px 6px; border-left: 4px solid var(--orange); background: var(--friendly); }
.callout.tip { border-left-color: var(--success); }
.callout.warn { border-left-color: var(--warning); background: var(--warn-tint); }
.callout p { font-size: 15px; line-height: 1.6; margin-bottom: 10px; }
.callout .callout-label { margin-bottom: 4px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--black); }

/* ---- footer ---- */

.site-footer { margin-top: 72px; padding: 32px 0; background: var(--black); color: #b5b5b5; font-size: 13px; }
.site-footer p { margin: 0 0 4px; }

/* ---- small screens ---- */

@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 12px; gap: 8px; }
  .layout { display: block; }
  .sidebar {
    position: fixed; top: var(--topbar-h); bottom: 0; left: 0; z-index: 26;
    width: min(320px, 86vw); height: auto;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  /* Shadow only while open, or it leaks onto the screen edge when the drawer is hidden. */
  body.nav-open .sidebar { transform: none; box-shadow: 4px 0 24px rgba(0, 0, 0, .2); }
  body.nav-open { overflow: hidden; }
  .hero { padding: 56px 0 52px; }
  .band { padding: 40px 0 36px; }
  .guide-section { margin-top: 40px; }
  h3.major { font-size: 24px; }
  h3.sub { font-size: 20px; }
  @media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
}

@media print {
  .topbar, .sidebar, .scrim, .toc, .anchor, .skip { display: none !important; }
  .layout { display: block; }
  .hero, .band, .site-footer { background: none; color: var(--black); }
  .hero-title, .band-title, .hero-title span, .band-num, .hero-sub, .band-blurb { color: var(--black); }
  .guide-section { break-before: page; margin-top: 0; }
  h3, .steps li, .callout, tr { break-inside: avoid; }
}
