/* ==========================================================================
   Kura Cafe — design system
   Ported from design handoff: assets/tokens.css (kuracafe.in, Sep 2026)
   Display: Lora · UI: Sora · Restrained radii (<=16px) · No gradients*
   (*hero legibility overlay is the single sanctioned exception)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Sora:wght@100..800&display=swap');

:root {
  /* Primary — forest greens */
  --kura-forest:   #003B2F;
  --kura-forest-2: #004D3E;
  --kura-moss:     #00735C;

  /* Neutrals — warm creams */
  --kura-cream:    #f7f4ee;
  --kura-cream-2:  #f9f6ef;
  --kura-cream-3:  #fbfaf7;
  --kura-white:    #ffffff;

  /* Accents */
  --kura-taupe:    #B9A894;
  --kura-taupe-2:  #d4c8b6;
  --kura-earth:    #673A37;
  --kura-ink:      #241B16;
  --kura-ink-60:   rgba(36, 27, 22, 0.60);
  --kura-ink-40:   rgba(36, 27, 22, 0.40);
  --kura-ink-20:   rgba(36, 27, 22, 0.20);
  --kura-ink-08:   rgba(36, 27, 22, 0.08);

  /* Semantic */
  --kura-ok:       #00735C;
  --kura-warn:     #B87A2E;
  --kura-alert:    #A03A2E;

  /* Hairlines (taupe at the opacities used across the design) */
  --line-40: rgba(185, 168, 148, 0.40);
  --line-50: rgba(185, 168, 148, 0.50);
  --line-55: rgba(185, 168, 148, 0.55);
  --line-35: rgba(185, 168, 148, 0.35);
  --line-30: rgba(185, 168, 148, 0.30);
  --line-20: rgba(185, 168, 148, 0.20);

  /* Type */
  --font-display: 'Lora', Georgia, serif;
  --font-body:    'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* Radii — restrained */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;

  /* Elevations — subtle */
  --sh-1: 0 1px 2px rgba(36, 27, 22, 0.06);
  --sh-2: 0 4px 12px rgba(36, 27, 22, 0.08), 0 1px 2px rgba(36, 27, 22, 0.04);
  --sh-3: 0 12px 32px rgba(36, 27, 22, 0.12), 0 2px 6px rgba(36, 27, 22, 0.06);

  /* Spacing — 4px base */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-6: 24px; --s-8: 32px; --s-12: 48px; --s-16: 64px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--kura-cream);
  color: var(--kura-ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { min-height: 100vh; }

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; color: inherit; }

img { max-width: 100%; display: block; }

a { color: var(--kura-forest); text-decoration: none; }

::selection { background: var(--kura-forest); color: var(--kura-cream); }

/* ── Typography ────────────────────────────────────────────────────────── */
.kura {
  font-family: var(--font-body);
  color: var(--kura-ink);
  font-feature-settings: 'ss01', 'cv11';
}

h1, h2, h3, h4, .k-serif {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.2;
}

.k-num { font-variant-numeric: tabular-nums; }

.k-eyebrow {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(0, 59, 47, 0.75);
}

.k-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(36, 27, 22, 0.55);
}

.k-wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

/* ── Logo ──────────────────────────────────────────────────────────────── */
.k-logo { display: block; width: auto; user-select: none; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.k-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: transform .08s ease, background .15s ease, opacity .15s, border-color .15s;
  white-space: nowrap;
  line-height: 1.2;
}
.k-btn:active:not(:disabled) { transform: scale(0.985); }
.k-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.k-btn:focus-visible { outline: 2px solid rgba(0, 59, 47, 0.4); outline-offset: 2px; }

.k-btn--sm { padding: 8px 14px; font-size: 13px; gap: 6px; }
.k-btn--md { padding: 12px 18px; font-size: 14px; gap: 8px; }
.k-btn--lg { padding: 16px 22px; font-size: 15px; gap: 10px; }
.k-btn--full { width: 100%; }

.k-btn--primary { background: var(--kura-forest); color: var(--kura-cream); border-color: var(--kura-forest); }
.k-btn--primary:hover:not(:disabled) { background: var(--kura-forest-2); border-color: var(--kura-forest-2); }
.k-btn--solid   { background: var(--kura-ink); color: var(--kura-cream); border-color: var(--kura-ink); }
.k-btn--outline { background: transparent; color: var(--kura-forest); border-color: var(--kura-forest); }
.k-btn--outline:hover:not(:disabled) { background: rgba(0, 59, 47, 0.05); }
.k-btn--ghost   { background: transparent; color: var(--kura-ink); border-color: transparent; }
.k-btn--ghost:hover:not(:disabled) { background: rgba(0, 59, 47, 0.05); }
.k-btn--subtle  { background: rgba(0, 59, 47, 0.06); color: var(--kura-forest); border-color: transparent; }
.k-btn--subtle:hover:not(:disabled) { background: rgba(0, 59, 47, 0.11); }
.k-btn--danger  { background: transparent; color: var(--kura-alert); border-color: rgba(160, 58, 46, 0.35); }
.k-btn--danger:hover:not(:disabled) { background: rgba(160, 58, 46, 0.06); }

/* Spinner inside a loading button */
.k-spin {
  width: 14px; height: 14px; flex: none;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: k-spin .7s linear infinite;
}
@keyframes k-spin { to { transform: rotate(360deg); } }

/* ── Fields ────────────────────────────────────────────────────────────── */
.k-field { display: block; }
.k-field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--kura-ink);
  margin-bottom: 6px;
}
.k-field__hint { font-size: 11px; color: var(--kura-ink-60); margin-top: 4px; }
.k-field__error { font-size: 13px; line-height: 18px; color: var(--kura-alert); margin-top: 4px; }

.k-input {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 12px;
  background: var(--kura-cream-3);
  border: 1px solid var(--line-55);
  border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s;
}
.k-input:focus-within {
  border-color: var(--kura-forest);
  box-shadow: 0 0 0 3px rgba(0, 59, 47, 0.08);
}
.k-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14.5px;
  color: var(--kura-ink);
  padding: 10px 0;
}
.k-input input::placeholder { color: rgba(36, 27, 22, 0.35); }
.k-input__prefix { font-size: 14px; color: rgba(36, 27, 22, 0.55); white-space: nowrap; }
.k-input__suffix { font-size: 12px; color: rgba(36, 27, 22, 0.55); white-space: nowrap; }
.k-input__suffix button {
  background: none; border: 0; padding: 0;
  color: var(--kura-forest); font-size: 12px; font-weight: 500;
}
.k-input.is-error { border-color: rgba(160, 58, 46, 0.6); }

.k-textarea {
  width: 100%;
  min-height: 100px;
  resize: vertical;
  background: var(--kura-cream-3);
  border: 1px solid var(--line-55);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 14.5px;
  line-height: 1.5;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.k-textarea:focus {
  border-color: var(--kura-forest);
  box-shadow: 0 0 0 3px rgba(0, 59, 47, 0.08);
}

/* ── Stepper ───────────────────────────────────────────────────────────── */
.k-stepper { display: inline-flex; align-items: center; gap: 10px; }
.k-stepper__btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-55);
  background: var(--kura-cream-3);
  color: var(--kura-forest);
  border-radius: var(--r-sm);
  transition: background .15s;
}
.k-stepper__btn:hover:not(:disabled) { background: rgba(0, 59, 47, 0.06); }
.k-stepper__btn:disabled { opacity: 0.4; cursor: not-allowed; }
.k-stepper__val {
  min-width: 72px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.k-stepper__unit { font-family: var(--font-body); font-size: 14px; color: var(--kura-ink-60); margin-left: 4px; }

/* ── Pills ─────────────────────────────────────────────────────────────── */
.k-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.k-pill--neutral { background: rgba(36, 27, 22, 0.06); color: var(--kura-ink); }
.k-pill--forest  { background: rgba(0, 59, 47, 0.10);  color: var(--kura-forest); }
.k-pill--moss    { background: rgba(0, 115, 92, 0.12); color: var(--kura-moss); }
.k-pill--taupe   { background: rgba(185, 168, 148, 0.28); color: var(--kura-earth); }
.k-pill--warn    { background: rgba(184, 122, 46, 0.12); color: var(--kura-warn); }
.k-pill--alert   { background: rgba(160, 58, 46, 0.12);  color: var(--kura-alert); }

/* ── Stars ─────────────────────────────────────────────────────────────── */
.k-stars { display: inline-flex; gap: 6px; }
.k-star {
  background: none; border: 0; padding: 2px;
  color: rgba(185, 168, 148, 0.55);
  transition: transform .1s ease, color .12s ease;
  display: inline-flex;
}
.k-star svg { display: block; }
.k-star.is-on { color: var(--kura-forest); }
.k-star:not(:disabled):hover { transform: scale(1.1); }
.k-star:disabled { cursor: default; }
.k-star--readonly { color: rgba(185, 168, 148, 0.55); }
.k-star--readonly.is-on { color: var(--kura-forest); }

/* ── Rule / divider ────────────────────────────────────────────────────── */
.k-rule { display: flex; align-items: center; gap: 12px; }
.k-rule__line { flex: 1; height: 1px; background: var(--line-40); }
.k-rule__label {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(36, 27, 22, 0.5);
}
.k-hairline { height: 1px; background: var(--line-40); border: 0; margin: 0; }

/* ── Consent ───────────────────────────────────────────────────────────── */
.k-consent {
  font-size: 10.5px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: rgba(36, 27, 22, 0.55);
}
.k-consent a, .k-consent b { color: var(--kura-forest); font-weight: 400; }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.k-card {
  background: var(--kura-cream-3);
  border: 1px solid var(--line-50);
  border-radius: var(--r-md);
}
.k-card--pad { padding: 20px; }

/* ── Toast ─────────────────────────────────────────────────────────────── */
.k-toast {
  position: fixed;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--kura-forest);
  color: var(--kura-cream);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-3);
  font-size: 13px;
  animation: k-toast-in .3s var(--ease-out);
}
.k-toast--dark { background: var(--kura-ink); }
@keyframes k-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Modal ─────────────────────────────────────────────────────────────── */
.k-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(36, 27, 22, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: k-fade .18s ease;
}
@keyframes k-fade { from { opacity: 0; } to { opacity: 1; } }
.k-modal__panel {
  width: 100%;
  max-width: 440px;
  background: var(--kura-cream);
  border-radius: var(--r-md);
  padding: 22px;
  box-shadow: var(--sh-3);
  animation: k-pop .2s var(--ease-out);
  max-height: 90vh;
  overflow: auto;
}
@keyframes k-pop { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
.k-modal__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.k-modal__title { font-family: var(--font-display); font-size: 18px; font-weight: 500; }
.k-modal__sub { font-size: 11.5px; color: var(--kura-ink-60); margin-top: 4px; }
.k-modal__x {
  background: none; border: 0; padding: 4px; color: var(--kura-ink);
  display: inline-flex; border-radius: var(--r-xs);
}
.k-modal__x:hover { background: rgba(0, 59, 47, 0.06); }
.k-modal__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ── Progress dots ─────────────────────────────────────────────────────── */
.k-dots { display: flex; gap: 5px; align-items: center; }
.k-dot {
  width: 6px; height: 4px; border-radius: 2px;
  background: rgba(185, 168, 148, 0.6);
  transition: width .2s var(--ease-in-out), background .2s;
}
.k-dot.is-on { background: var(--kura-forest); }
.k-dot.is-active { width: 18px; background: var(--kura-forest); }

/* ── Screen header (in-phone) ──────────────────────────────────────────── */
.k-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px;
  background: var(--kura-cream);
  border-bottom: 1px solid var(--line-40);
  position: sticky;
  top: 0;
  z-index: 20;
}
.k-header__title {
  flex: 1;
  text-align: center;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.k-header__side { min-width: 32px; display: flex; align-items: center; }
.k-header__side--end { justify-content: flex-end; }
.k-header__back {
  background: none; border: 0; padding: 4px; margin-left: -4px;
  color: var(--kura-ink); display: inline-flex; border-radius: var(--r-xs);
}
.k-header__back:hover { background: rgba(0, 59, 47, 0.06); }

/* ── Screen title ──────────────────────────────────────────────────────── */
.k-title__h {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.k-title__eyebrow { margin-bottom: 10px; }
.k-title__sub {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(36, 27, 22, 0.65);
  max-width: 340px;
}

/* ── Motion utilities ──────────────────────────────────────────────────── */
@keyframes k-slide-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}
.k-step-enter { animation: k-slide-in .2s var(--ease-in-out); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Accessibility ─────────────────────────────────────────────────────── */
.k-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
