/* Halienne — editorial fashion house. High-contrast Cormorant serif display,
   neutral Inter grotesque, white ground, near-black ink, generous whitespace. */

:root {
  --bg: #ffffff;
  --panel: #fafafa;
  --ink: #141414;
  --ink-soft: #3c3a37;
  --muted: #8d8a85;
  --faint: #b8b5af;
  --line: #e8e6e2;       /* hairline */
  --line-strong: #141414;
  --rose: #a23a2c;       /* muted error */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--ink-soft);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.005em;
}

#app {
  max-width: 448px;
  margin: 0 auto;
  padding: 0 28px 72px;
}

/* ---- top bar ---- */
.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 0 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  z-index: 5;
}
.brand {
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: 0.005em;
  color: var(--ink);
}
#key-pill { position: absolute; right: 0; }

/* ---- screens ---- */
.screen { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); padding-top: 6px; }
.hidden { display: none !important; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- typography ---- */
.kicker {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 6px 0 22px;
}
h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  font-size: clamp(3rem, 12vw, 4.1rem);
  line-height: 1.0;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 22px;
}
h1 em { font-style: italic; font-weight: 400; }
h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 9vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 18px;
}
h3 {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
p { line-height: 1.7; margin: 0 0 14px; font-weight: 400; color: var(--ink-soft); }
p em { font-style: normal; color: var(--ink); font-weight: 500; }
.lede { color: var(--ink-soft); font-size: 1.04rem; line-height: 1.65; }
.muted { color: var(--muted); }
.note {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  color: var(--muted);
  font-size: 1.02rem;
  font-style: italic;
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 1.5;
}

/* ---- hero emblem ---- */
.hero { text-align: center; padding-top: 30px; }
.hero .kicker { margin-top: 26px; }
.emblem {
  width: 72px; height: 72px; margin: 0 auto;
  color: var(--ink);
  opacity: 0.9;
}
.emblem svg { width: 100%; height: 100%; display: block; }
.hero h1, .hero .lede { text-align: center; }
.hero .lede { margin-left: auto; margin-right: auto; max-width: 22em; }

/* ---- lists ---- */
.steps { list-style: none; padding: 0; margin: 22px 0 8px; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 15px 0 15px 42px;
  border-top: 1px solid var(--line);
  line-height: 1.5;
  color: var(--ink-soft);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 16px;
  font-size: 0.68rem; letter-spacing: 0.1em;
  color: var(--muted); font-weight: 600;
}

/* ---- forms (editorial underline style) ---- */
label {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 28px 0 10px;
}
input, select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  border-radius: 0;
  padding: 12px 2px;
  font-family: "Inter", sans-serif;
  font-size: 1.02rem;
  outline: none;
  transition: border-color 0.25s ease;
}
input::placeholder { color: var(--faint); }
input:focus, select:focus { border-bottom-color: var(--line-strong); }
select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23141414' stroke-width='1.2'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
}
.row { display: flex; gap: 22px; }
.row > div { flex: 1; }
.row > input { flex: 1; }

/* ---- buttons ---- */
button {
  font-family: "Inter", sans-serif;
  cursor: pointer;
  border: none;
}
.primary {
  width: 100%;
  margin-top: 34px;
  padding: 17px;
  border-radius: 0;
  color: #ffffff;
  background: var(--ink);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  transition: opacity 0.2s ease, transform 0.12s ease;
}
.primary:hover { opacity: 0.82; }
.primary:active { transform: translateY(1px); }
.primary:disabled { opacity: 0.4; cursor: default; }
.ghost {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}
.ghost:hover { background: var(--ink); color: #fff; }
.ghost.small { width: auto; margin-top: 16px; padding: 9px 16px; font-size: 0.62rem; }
.link {
  width: 100%; margin-top: 38px; background: none; color: var(--muted);
  font-size: 0.66rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line);
}
.link:hover { color: var(--ink); text-decoration-color: var(--ink); }

.error { color: var(--rose); min-height: 1.1em; font-size: 0.86rem; margin: 12px 0 0; }

/* ---- key pill ---- */
.pill {
  font-size: 0.58rem; padding: 5px 12px; border-radius: 999px;
  letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600;
  border: 1px solid var(--line); color: var(--muted);
}
.pill.ok { color: var(--ink); border-color: var(--ink); }
.pill.invalid { color: var(--rose); border-color: rgba(162,58,44,0.5); }

/* ---- bulb picker ---- */
.bulb-list { display: flex; flex-direction: column; margin-top: 8px; }
.bulb {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 2px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.bulb:last-child { border-bottom: 1px solid var(--line); }
.bulb.disabled { opacity: 0.4; cursor: default; }
.bulb input { width: auto; accent-color: var(--ink); }
.bulb .meta { flex: 1; }
.bulb .name { font-weight: 500; color: var(--ink); font-size: 1.02rem; }
.bulb .sub { font-size: 0.78rem; color: var(--muted); margin-top: 3px; letter-spacing: 0.02em; }

/* ---- cards ---- */
.card {
  border-top: 1px solid var(--line);
  padding: 24px 0 26px;
}
.card:last-of-type { border-bottom: 1px solid var(--line); }
.last-pushed { font-size: 1.7rem; font-family: "Cormorant Garamond", serif; color: var(--ink); font-weight: 500; }
.last-pushed .sub { font-size: 0.76rem; font-family: "Inter", sans-serif; color: var(--muted); margin-top: 6px; letter-spacing: 0.02em; font-weight: 400; }
#dash-bulbs > div, #dash-schedule > div { color: var(--ink); line-height: 1.7; }
#dash-schedule strong { font-weight: 600; text-transform: capitalize; }
.swatch {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  vertical-align: -2px; margin-right: 10px; border: 1px solid var(--line);
}

/* ---- banner ---- */
.banner {
  border: 1px solid rgba(162,58,44,0.4);
  color: var(--rose);
  border-radius: 0; padding: 18px; margin-bottom: 18px;
  font-style: italic; font-family: "Cormorant Garamond", serif;
  font-size: 1.08rem;
  line-height: 1.5;
}

/* ---- spinner ---- */
.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.35); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
