/* Figo help — brand system from the Figo Brand Identity Book.
   Palette: Flame D14F31 · Bistre 292119 · Alabaster F1F2EC · Ash Gray B9C8C0
            Harvest Gold DFA639 · Cerulean 4E7987 · Black · White
   Type: Avenir only. Black for headers, Light for body, Medium for secondary. */

:root {
  --flame: #d14f31;
  --bistre: #292119;
  --alabaster: #f1f2ec;
  --ash: #b9c8c0;
  --gold: #dfa639;
  --cerulean: #4e7987;
  --white: #ffffff;
  --black: #000000;

  --ink: var(--bistre);
  --ink-soft: #5c564c;
  --border: #e3e2da;
  --card-shadow: 0 1px 2px rgb(41 33 25 / 5%), 0 8px 24px rgb(41 33 25 / 6%);

  /* Device LED colors — these mirror the cooker, not the brand chrome. */
  --led-red: #d14f31;
  --led-blue: #4e7987;
  --led-green: #3e7c5a;
  --led-purple: #6b3d8c;
  --led-off: #cfcdc3;

  --max: 46rem;
  --wide: 66rem;
  --radius: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--alabaster);
  color: var(--ink);
  font-family: 'Avenir Next', Avenir, 'Century Gothic', sans-serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--flame); }
a:hover { color: var(--bistre); }

strong { font-weight: 600; }
em { font-style: italic; font-weight: 500; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 20;
  background: var(--white);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--alabaster);
  position: sticky;
  top: 0;
  z-index: 10;
}

.wordmark { display: inline-flex; align-items: center; text-decoration: none; }
.wordmark img { height: 30px; width: auto; display: block; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav a { color: var(--ink-soft); text-decoration: none; padding: 0.2rem 0; }
.nav a[aria-current="page"] { color: var(--flame); }
.nav a:hover { color: var(--ink); }

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

.hero, .page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.75rem 1.5rem 4.5rem;
}
.hero.wide, .page.wide { max-width: var(--wide); }

.kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--flame);
  margin: 0 0 0.7rem;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2.6rem 0 0.7rem;
}

h3 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 0.4rem; }

p { margin: 0 0 1rem; }
.lede { font-size: 1.2rem; font-weight: 300; color: var(--ink-soft); max-width: 38rem; }

ol.steps { padding-left: 1.35rem; }
ol.steps > li { margin: 0 0 1.05rem; }
ol.steps > li::marker { color: var(--flame); font-weight: 700; }

ul { padding-left: 1.35rem; }
ul > li { margin: 0 0 0.6rem; }

/* ---------- the two doors ---------- */

.doors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  margin: 2rem 0 1rem;
}
.door {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.7rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--card-shadow);
  transition: transform 120ms ease, border-color 120ms ease;
}
.door:hover { transform: translateY(-2px); border-color: var(--ash); color: inherit; }
.door .kicker { margin-bottom: 0.5rem; color: var(--flame); }
.door h2 { margin: 0 0 0.45rem; font-size: 1.45rem; }
.door p { margin: 0; color: var(--ink-soft); font-weight: 300; }
.door .go {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--flame);
}

/* ---------- light picker ---------- */

.light-picker {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  margin: 1.5rem 0 2rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.25rem 0 1.4rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1.5px solid var(--border);
  background: var(--alabaster);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.chip:hover { border-color: var(--ash); }
.chip[aria-pressed="true"] {
  border-color: var(--bistre);
  background: var(--white);
}

.led {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgb(41 33 25 / 15%);
}
.led.off { background: var(--led-off); }
.led.red { background: var(--led-red); }
.led.blue { background: var(--led-blue); }
.led.green { background: var(--led-green); }
.led.purple { background: var(--led-purple); }
.led.flash-red { background: var(--led-red); animation: led-flash 0.5s steps(1, end) infinite; }
.led.blink-green { background: var(--led-green); animation: led-breathe 1.6s ease-in-out infinite; }

@keyframes led-flash { 50% { background: var(--led-off); } }
@keyframes led-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.light-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.light-panel.has-photo { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }

.light-panel .big-led {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  margin-bottom: 0.9rem;
  box-shadow: inset 0 0 0 1px rgb(41 33 25 / 12%), 0 0 24px rgb(209 79 49 / 0%);
}
.light-panel h3 { margin: 0 0 0.35rem; font-size: 1.3rem; font-weight: 700; }
.light-panel .meaning { color: var(--ink-soft); font-weight: 300; margin-bottom: 0.75rem; }
.light-panel .do {
  border-left: 3px solid var(--flame);
  padding: 0.15rem 0 0.15rem 0.9rem;
  font-weight: 500;
  margin-bottom: 0.9rem;
}
.light-panel .more { font-size: 0.92rem; font-weight: 600; }

.light-photo {
  width: 100%;
  max-width: 15rem;
  justify-self: end;
  border-radius: 16px;
  overflow: hidden;
  background: var(--black);
}
.light-photo img { display: block; width: 100%; height: auto; }
.light-photo[hidden] { display: none; }

@media (max-width: 620px) {
  .light-panel.has-photo { grid-template-columns: 1fr; }
  .light-photo { justify-self: start; max-width: 12rem; }
}

/* ---------- stepper ---------- */

.stepper { margin: 1.75rem 0 2rem; }

.step-rail {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}
.step-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: none;
  background: none;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
}
.step-dot .n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: 1.5px solid var(--ash);
  background: var(--white);
  font-size: 0.8rem;
  color: var(--ink);
}
.step-dot[aria-current="step"] { color: var(--ink); }
.step-dot[aria-current="step"] .n {
  background: var(--flame);
  border-color: var(--flame);
  color: var(--white);
}
.step-dot.done .n { background: var(--bistre); border-color: var(--bistre); color: var(--alabaster); }
.step-dot .lbl { display: none; }
.step-dot[aria-current="step"] .lbl { display: inline; }

.step {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 1.6rem 1.6rem 1.4rem;
  margin-bottom: 1.1rem;
}
.step > h2 { margin-top: 0; }
.stepper.js .step[hidden] { display: none; }

.step-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.4rem;
}
.stepper:not(.js) .step-nav, .stepper:not(.js) .step-rail { display: none; }

/* ---------- buttons (site) ---------- */

.btn {
  display: inline-block;
  background: var(--flame);
  color: var(--white);
  text-decoration: none;
  border: none;
  font-family: inherit;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.btn:hover { background: var(--bistre); color: var(--white); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--bistre); }
.btn.ghost:hover { background: var(--bistre); color: var(--alabaster); }
.btn:disabled { opacity: 0.35; cursor: default; }
.btn:disabled:hover { background: var(--flame); }
.btn.ghost:disabled:hover { background: transparent; color: var(--ink); }

/* ---------- tickets ---------- */

.talk {
  display: block;
  background: var(--bistre);
  color: var(--alabaster);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.7rem;
  text-decoration: none;
  margin: 2rem 0 1rem;
  box-shadow: var(--card-shadow);
}
.talk:hover { color: var(--alabaster); }
.talk .kicker { color: var(--gold); }
.talk h2 { margin: 0 0 0.45rem; font-size: 1.45rem; color: var(--white); }
.talk p { margin: 0; color: var(--ash); font-weight: 300; }
.talk .go {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.ticket-toolbar { margin: 1.25rem 0 0; }
.ticket-toolbar .btn { display: inline-block; }

.form-card, .thread-card, .ticket-list {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.field { margin: 0 0 1.05rem; }
.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
}
.field input, .field textarea, .field select {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  background: var(--alabaster);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
}
.field textarea { min-height: 8.5rem; resize: vertical; line-height: 1.45; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--bistre);
  background: var(--white);
}
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-error {
  color: var(--flame);
  font-weight: 500;
  margin: 0 0 0.8rem;
}
.status-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  background: var(--ash);
  color: var(--bistre);
}
.status-pill.new, .status-pill.open { background: #f3d7cf; color: var(--flame); }
.status-pill.waiting { background: #efe3c4; color: #6a4e12; }
.status-pill.resolved { background: #d5e4dc; color: var(--led-green); }

.ticket-row {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--border);
}
.ticket-row:last-child { border-bottom: 0; padding-bottom: 0; }
.ticket-row:first-child { padding-top: 0; }
.ticket-row:hover h3 { color: var(--flame); }
.ticket-row h3 { margin: 0.25rem 0 0.2rem; font-size: 1.05rem; }
.ticket-row p { margin: 0; color: var(--ink-soft); font-weight: 300; font-size: 0.95rem; }

.bubble {
  border-radius: 16px;
  padding: 0.85rem 1rem;
  margin: 0 0 0.75rem;
  max-width: 36rem;
}
.bubble.customer { background: var(--alabaster); }
.bubble.staff {
  background: var(--white);
  border: 1.5px solid var(--bistre);
}
.bubble .who {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.3rem;
}
.bubble p { margin: 0; white-space: pre-wrap; }
.bubble .when {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 300;
}

.meta-line {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-weight: 300;
  margin: 0 0 1rem;
}

/* ---------- two-button simulator ---------- */

.button-sim {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  margin: 1.5rem 0 2rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
}
@media (max-width: 560px) { .button-sim { grid-template-columns: 1fr; } }

.device-face {
  width: 7.5rem;
  background: linear-gradient(180deg, #d8d8d4, #babab6);
  border-radius: 18px;
  padding: 1.9rem 0 2.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  justify-self: center;
}
.device-face .f-mark { height: 1.5rem; width: auto; opacity: 0.85; margin-bottom: 0.4rem; }
.device-face { cursor: pointer; }
.device-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  padding: 0;
  font: inherit;
  background: var(--bistre);
  box-shadow: inset 0 2px 4px rgb(0 0 0 / 45%), 0 1px 0 rgb(255 255 255 / 45%);
  cursor: pointer;
}
.device-btn.active { outline: 3px solid var(--flame); outline-offset: 2px; }

.sim-controls { min-width: 0; }
.sim-controls .chip-row { margin-bottom: 1rem; }
.sim-result h3 { margin: 0 0 0.3rem; }
.sim-result p { margin: 0; color: var(--ink-soft); }

/* ---------- cards, tables, notes ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.9rem;
  margin: 1.5rem 0 2rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem 1.3rem;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: var(--card-shadow);
}
.card:hover { border-color: var(--ash); color: inherit; }
.card h2, .card h3 { margin: 0.2rem 0 0.4rem; font-size: 1.15rem; }
.card p { color: var(--ink-soft); margin: 0; font-size: 0.97rem; font-weight: 300; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 0.75rem 0 1.5rem;
}
th, td {
  text-align: left;
  padding: 0.75rem 0.9rem;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
th {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--alabaster);
}
tr:last-child td { border-bottom: 0; }

.note {
  background: var(--white);
  border-left: 3px solid var(--flame);
  padding: 0.9rem 1.1rem;
  margin: 1.2rem 0;
  border-radius: 0 14px 14px 0;
}
.note.cool { border-left-color: var(--cerulean); }
.note.ok { border-left-color: var(--led-green); }
.note.gold { border-left-color: var(--gold); }
.note p:last-child { margin-bottom: 0; }

.toc {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.toc .toc-title {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.toc ol { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.toc li { margin: 0.25rem 0; }
.toc a { color: var(--ink); text-decoration: none; font-weight: 500; }
.toc a:hover { color: var(--flame); }

/* ---------- QR cards ---------- */

.qr-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
}
.qr-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
  box-shadow: var(--card-shadow);
}
.qr-card img { width: 10rem; height: 10rem; display: block; margin: 0 auto 0.8rem; }
.qr-card .store {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bistre);
  color: var(--alabaster);
  padding: 2.5rem 1.5rem 3rem;
  font-size: 0.97rem;
  font-weight: 300;
}
.site-footer .inner { max-width: var(--max); margin: 0 auto; }
.site-footer img.mark { height: 2rem; width: auto; margin-bottom: 0.9rem; filter: invert(1) hue-rotate(180deg) saturate(0); opacity: 0.95; }
.site-footer a { color: var(--alabaster); font-weight: 500; }
.site-footer a:hover { color: var(--gold); }
.site-footer .tag { color: var(--ash); margin-bottom: 0.4rem; }

@media (max-width: 640px) {
  .site-header { padding: 0.8rem 1rem; }
  .hero, .page { padding: 2rem 1.1rem 3.5rem; }
  body { font-size: 1rem; }
  table { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .led.flash-red, .led.blink-green { animation: none; }
  .door { transition: none; }
}
