@import url('./colors_and_type.css');

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); }

.bm-app { min-height: 100vh; background: var(--paper); color: var(--ink); }

/* ============ NAV ============ */
.bm-nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(244,239,230,0.82);
  border-bottom: 1px solid var(--ink-08);
}
.bm-nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 48px; height: 64px;
}
/* ============ WORDMARK ============
   Lowercase lockup. Geneva sans, tight tracking. The "o" glyphs in
   "bored" and "mothers" are replaced with the life-preserver mark. */
.wordmark {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.wm-lockup {
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
  font-feature-settings: "ss01";
}
.wm-lockup .wm-text { line-height: 1; }
.wm-lockup .wm-soft { color: var(--ink-50); font-weight: 400; }
.wm-lockup .wm-gap { display: inline-block; width: 0.32em; }
.wm-lockup .wm-o {
  /* Sit on the lowercase x-height — centered in the letter band, not the cap height */
  align-self: baseline;
  transform: translateY(-0.02em);
  margin: 0 0.01em;
}
.wordmark:hover .wm-soft { color: var(--ink); }
.bm-nav nav { display: flex; gap: 22px; margin-left: 10px; }
.bm-nav nav a { font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--ink); text-decoration: none; letter-spacing: 0.02em; padding: 4px 0; }
.bm-nav nav a:hover { color: var(--terracotta); }

/* ============ HERO ============ */
.bm-hero { max-width: 1100px; margin: 0 auto; padding: 96px 48px 48px; text-align: center; }
.bm-hero .eyebrow { font-family: var(--font-sans); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-70); margin-bottom: 24px; }
.bm-hero h1 {
  font-family: var(--font-serif); font-weight: 600; font-size: 88px; line-height: 0.95;
  letter-spacing: -0.025em; margin: 0; text-wrap: balance;
}
.bm-hero h1 em { font-style: italic; font-weight: 500; position: relative; display: inline-block; }
.bm-hero h1 em .circle-mark { position: absolute; inset: -10px -14px; color: var(--terracotta); pointer-events: none; }
.bm-hero .sub { margin: 28px auto 0; font-size: 19px; line-height: 1.55; color: var(--ink-70); max-width: 620px; }

/* ============ BUTTONS ============ */
.btn { font-family: var(--font-sans); font-size: 14px; font-weight: 500; letter-spacing: 0.02em; padding: 14px 24px; border: 0; cursor: pointer; transition: background var(--dur-hover) var(--ease), transform 100ms var(--ease); display: inline-flex; align-items: center; gap: 6px; }
.btn-primary { background: var(--terracotta); color: var(--paper); }
.btn-primary:hover { background: var(--terracotta-dark); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { background: var(--stone); cursor: default; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); padding: 13px 24px; }
.btn-ghost:hover { background: var(--pressed-paper); }
.btn-link { background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; padding: 8px 4px; }

/* ============ WIZARD ============ */
.bm-wizard { max-width: 820px; margin: 0 auto; padding: 32px 48px 96px; }
.bm-step-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 28px; padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.bm-step-head h2 { font-family: var(--font-serif); font-weight: 500; font-size: 40px; line-height: 1.05; letter-spacing: -0.015em; }
.bm-step-head h2 em { font-style: italic; }
.bm-step-head .meta { font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-70); }

.bm-step-body { }
.bm-step-body .lead { font-size: 17px; line-height: 1.55; color: var(--ink-70); margin-bottom: 28px; max-width: 560px; }

/* Option rows (where) */
.bm-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.bm-option {
  display: flex; align-items: center; gap: 16px;
  background: var(--cream); padding: 18px 22px; cursor: pointer;
  border: 1px solid transparent;
  transition: border-color var(--dur-hover) var(--ease), background var(--dur-hover) var(--ease);
}
.bm-option:hover { border-color: var(--ink-30); }
.bm-option .icon-circle { width: 42px; height: 42px; background: var(--paper); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bm-option .txt { flex: 1; }
.bm-option .t { font-family: var(--font-serif); font-weight: 500; font-size: 20px; line-height: 1.2; }
.bm-option .d { font-size: 13px; color: var(--ink-70); margin-top: 3px; }
.bm-option.or-divider { justify-content: center; background: transparent; padding: 4px 0; color: var(--ink-50); font-family: var(--font-serif); font-style: italic; font-size: 14px; cursor: default; border: 0; }
.bm-option.or-divider:hover { border: 0; }

/* Underline field */
.bm-underline {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--ink);
  padding: 12px 0; font-family: var(--font-sans); font-size: 22px; color: var(--ink); outline: none;
  font-weight: 400;
}
.bm-underline::placeholder { color: var(--ink-30); font-weight: 400; }
.bm-underline:focus { border-bottom-color: var(--terracotta); border-bottom-width: 2px; padding-bottom: 11px; }

/* When step */
.bm-when { display: flex; flex-direction: column; gap: 28px; }
.bm-big-options { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.bm-big-option {
  padding: 24px 20px; background: var(--cream); cursor: pointer;
  border: 1px solid transparent; transition: all var(--dur-hover) var(--ease);
  text-align: left;
}
.bm-big-option:hover { border-color: var(--ink-30); }
.bm-big-option.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.bm-big-option .t { font-family: var(--font-serif); font-weight: 500; font-size: 24px; }
.bm-big-option .d { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-70); margin-top: 4px; }
.bm-big-option.active .d { color: rgba(244,239,230,0.6); }

/* Segmented control — kids, vibe, anything binary/ternary */
.bm-seg {
  display: inline-flex;
  border: 1px solid var(--ink);
  overflow: hidden;
}
.bm-seg button {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--ink);
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}
.bm-seg button:last-child { border-right: 0; }
.bm-seg button:hover { background: var(--cream); }
.bm-seg button.active { background: var(--ink); color: var(--paper); }
.bm-seg button.active:hover { background: var(--ink); }
.bm-seg .hint { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--ink-50); margin-left: 6px; font-size: 13px; }
.bm-seg button.active .hint { color: rgba(244,239,230,0.55); }

/* Small variant — ages row, many buttons */
.bm-seg-small { flex-wrap: wrap; border: 0; gap: 6px; }
.bm-seg-small button {
  border: 1px solid var(--ink);
  padding: 8px 14px;
  font-size: 13px;
}
.bm-seg-small button .sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ink-50);
  font-size: 12px;
}
.bm-seg-small button.active .sub { color: rgba(244,239,230,0.6); }
.bm-age-field {
  width: 100%;
  animation: bm-fade-in 180ms var(--ease);
}
@keyframes bm-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bm-detail-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.bm-field label { display: block; font-family: var(--font-sans); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-70); margin-bottom: 6px; }
.bm-field input[type="date"], .bm-field input[type="time"], .bm-field select {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--ink);
  padding: 10px 0; font-family: var(--font-sans); font-size: 18px; color: var(--ink); outline: none;
}

.duration-slider { display: flex; align-items: center; gap: 18px; }
.duration-slider input[type="range"] { flex: 1; accent-color: var(--terracotta); }
.duration-slider .val { font-family: var(--font-serif); font-weight: 500; font-size: 28px; min-width: 110px; }
.duration-slider .val .unit { font-size: 14px; color: var(--ink-70); margin-left: 4px; font-family: var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; }

/* Step actions */
.step-actions { margin-top: 40px; display: flex; justify-content: space-between; align-items: center; }
.step-actions .back { font-family: var(--font-sans); font-size: 13px; color: var(--ink-70); background: transparent; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; }
.step-actions .back:hover { color: var(--ink); }

/* ============ WEATHER CARD ============ */
.bm-weather {
  background: var(--ink); color: var(--paper);
  padding: 28px 32px;
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 28px; align-items: center;
  margin-bottom: 32px;
}
.bm-weather .wx-icon { font-size: 56px; line-height: 1; }
.bm-weather .wx-main { }
.bm-weather .wx-eyebrow { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(244,239,230,0.6); margin-bottom: 4px; }
.bm-weather .wx-title { font-family: var(--font-serif); font-weight: 500; font-size: 28px; line-height: 1.15; }
.bm-weather .wx-title em { font-style: italic; }
.bm-weather .wx-stats { text-align: right; font-family: var(--font-serif); }
.bm-weather .wx-temp { font-size: 44px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.bm-weather .wx-stats .sub { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(244,239,230,0.6); font-family: var(--font-sans); margin-top: 6px; }

/* ============ SUGGESTIONS ============ */
.bm-suggestions { display: flex; flex-direction: column; gap: 16px; }
.bm-suggestion {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 22px; align-items: start;
  background: var(--cream); padding: 24px 28px; cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--dur-hover) var(--ease);
}
.bm-suggestion:hover { border-color: var(--ink-30); }
.bm-suggestion.selected { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.bm-suggestion.selected .s-meta, .bm-suggestion.selected .s-desc { color: rgba(244,239,230,0.7); }
.bm-suggestion .s-num { font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: 44px; line-height: 0.9; color: var(--terracotta); }
.bm-suggestion .s-title { font-family: var(--font-serif); font-weight: 500; font-size: 26px; line-height: 1.1; margin-bottom: 6px; letter-spacing: -0.005em; }
.bm-suggestion .s-title em { font-style: italic; }
.bm-suggestion .s-desc { font-size: 15px; line-height: 1.5; color: var(--ink-70); margin-bottom: 10px; }
.bm-suggestion .s-meta { display: flex; gap: 14px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--stone); }
.bm-suggestion .s-action { align-self: center; color: var(--terracotta); }
.bm-suggestion.selected .s-action { color: var(--paper); }

.bm-loading { padding: 48px 0; text-align: center; color: var(--ink-70); font-family: var(--font-serif); font-style: italic; font-size: 22px; }
.bm-loading .pulse { display: inline-block; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.4 } 50% { opacity: 1 } }

/* ============ PLAN EDITOR ============ */
.bm-plan { background: var(--paper); border: 1px solid var(--ink); padding: 36px 40px; }
.plan-eyebrow { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-70); margin-bottom: 8px; }
.plan-title-input { width: 100%; font-family: var(--font-serif); font-weight: 500; font-size: 40px; line-height: 1.05; letter-spacing: -0.015em; border: 0; background: transparent; outline: none; padding: 4px 0; color: var(--ink); }
.plan-title-input:focus { border-bottom: 1px dashed var(--ink-30); }
.plan-subtitle-input { width: 100%; font-family: var(--font-serif); font-style: italic; font-size: 18px; color: var(--ink-70); border: 0; background: transparent; outline: none; padding: 4px 0; margin-top: 8px; }
.bm-plan-steps { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-direction: column; gap: 20px; }
.bm-plan-step { display: grid; grid-template-columns: 78px 1fr; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--ink-15); }
.bm-plan-step:last-child { border-bottom: 0; }
.step-time { font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: 20px; color: var(--ink); }
.step-title-input { width: 100%; font-family: var(--font-serif); font-weight: 500; font-size: 22px; line-height: 1.15; border: 0; background: transparent; outline: none; padding: 2px 0; color: var(--ink); }
.step-desc-input { width: 100%; font-family: var(--font-sans); font-size: 15px; line-height: 1.5; color: var(--ink-70); border: 0; background: transparent; outline: none; resize: none; padding: 4px 0; margin-top: 4px; }
.step-title-input:focus, .step-desc-input:focus, .plan-title-input:focus, .plan-subtitle-input:focus { background: rgba(26,23,20,0.03); }

.plan-actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ============ TOAST ============ */
.bm-toast { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 14px 22px; font-size: 14px; box-shadow: 0 2px 12px rgba(26,23,20,0.15); display: flex; align-items: center; gap: 12px; z-index: 200; }
.bm-toast .dot { width: 6px; height: 6px; background: var(--terracotta); border-radius: 50%; }

/* ============ FOOTER ============ */
.bm-footer { padding: 56px 48px 32px; border-top: 1px solid var(--ink-15); }
.bm-footer-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr; gap: 48px; align-items: start; }
.bm-footer .bm-word {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
}
.bm-footer p { font-size: 14px; line-height: 1.55; color: var(--ink-70); margin-top: 10px; max-width: 360px; }
.bm-footer .fine { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--ink-15); display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-50); }

/* Page-load reveal */
@keyframes bm-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rise { animation: bm-rise 480ms var(--ease) both; }

.bm-plan.is-building { position: relative; }
.bm-suggestion.is-skeleton { cursor: default; opacity: 0.85; }
.bm-suggestion.is-skeleton:hover { background: var(--cream); }
.bm-suggestion.is-failed { cursor: default; opacity: 0.6; background: var(--cream); }
.bm-suggestion.is-failed:hover { background: var(--cream); }
.skel {
  display: block;
  background: linear-gradient(90deg, rgba(26,23,20,0.06), rgba(26,23,20,0.12), rgba(26,23,20,0.06));
  background-size: 200% 100%;
  animation: bm-skel 1.2s linear infinite;
  border-radius: 3px;
}
.skel-title { height: 20px; width: 62%; margin-bottom: 10px; }
.skel-line  { height: 12px; width: 92%; margin-bottom: 6px; }
.skel-line.short { width: 72%; }
@keyframes bm-skel {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}.bm-plan.is-building::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(26,23,20,0.025) 10px 20px);
  pointer-events: none; border-radius: 12px;
  animation: bm-shimmer 1.6s linear infinite;
}
@keyframes bm-shimmer {
  from { background-position: 0 0; }
  to   { background-position: 40px 0; }
}
.rise-2 { animation-delay: 80ms; }
.rise-3 { animation-delay: 160ms; }

/* Error */
.bm-error { padding: 14px 18px; background: var(--cream); border-left: 3px solid var(--terracotta); font-size: 14px; color: var(--ink); margin-bottom: 20px; }
.bm-error b { font-weight: 500; }
