/* ─────────────────────────────────────────────────────────────────────────────
   Big Foot — design system
   Warm sand + teal + hand-drawn sketch aesthetic
   ───────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&display=swap');

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

/* ── Tokens ─────────────────────────────────────────────────────────────────── */
:root {
  /* sand palette */
  --sand:       #e8e2d0;
  --sand-2:     #ddd7c4;
  --cream:      #f2ede2;
  --cream-2:    #f8f5ee;

  /* ink */
  --ink:        #2a241e;
  --ink-2:      #5c5248;
  --ink-3:      #9a8e82;
  --ink-4:      #c8c0b6;
  --ink-5:      #ddd8d0;

  /* teal */
  --teal:       #5a8a87;
  --teal-dark:  #3d6968;
  --teal-light: #8ab6b3;
  --teal-wash:  rgba(90,138,135,0.12);
  --teal-text:  #3a6a68;

  /* feedback */
  --red:        #b84040;
  --amber:      #b07030;

  /* typography */
  --font-hand:  'Caveat', 'Comic Sans MS', cursive;
  --font-sans:  'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono:  ui-monospace, 'JetBrains Mono', 'Cascadia Code', monospace;

  /* shape */
  --radius:     13px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  /* shadow — hard ink offset (cartoon/sticker style) */
  --shadow:     4px 4px 0px var(--ink);
  --shadow-sm:  3px 3px 0px var(--ink);
}

/* ── Motion ────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Base ──────────────────────────────────────────────────────────────────── */
html { height: 100%; }

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--sand);
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SKETCH PATTERNS
   ══════════════════════════════════════════════════════════════════════════ */

/* diagonal hatch — used on canvas/placeholder zones */
.hatch {
  background-image: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 7px,
    rgba(90,138,135,0.14) 7px,
    rgba(90,138,135,0.14) 8.5px
  );
}

/* dashed border box */
.dashed-box {
  border: 1.5px dashed var(--ink-3);
  border-radius: var(--radius);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT — centered phone-width column
   ══════════════════════════════════════════════════════════════════════════ */

.screen {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}

.screen-center {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════════════════════════════════════════════ */

.t-hand      { font-family: var(--font-hand); }
.t-mono      { font-family: var(--font-mono); }
.t-muted     { color: var(--ink-3); }
.t-teal      { color: var(--teal-text); }

/* Kicker label — tiny mono all-caps */
.kicker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Hand-style heading */
.hand-heading {
  font-family: var(--font-hand);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.hand-heading-sm {
  font-family: var(--font-hand);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARD  — the core surface with sketch-style border + drop shadow
   ══════════════════════════════════════════════════════════════════════════ */

.card {
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
}

.card-sm {
  background: var(--cream);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
}

.card-teal {
  background: var(--teal);
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  color: #fff;
  padding: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGO CIRCLE
   ══════════════════════════════════════════════════════════════════════════ */

.logo-circle {
  width: 72px;
  height: 72px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.logo-circle-text {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.3;
  text-align: center;
  color: var(--ink);
}

.logo-circle-sm {
  width: 52px;
  height: 52px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════════════════ */

.btn {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  width: 100%;
  padding: 13px 20px;
  border-radius: 24px;
  transition: transform 0.08s, box-shadow 0.08s;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn:active:not(:disabled) {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink) !important;
}

.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Primary — teal fill */
.btn-primary {
  background: var(--teal);
  color: #fff;
  border: 2.5px solid var(--ink);
  box-shadow: var(--shadow);
}
.btn-primary:hover:not(:disabled) { background: var(--teal-dark); }

/* Ghost — cream outline */
.btn-ghost {
  background: var(--cream);
  color: var(--ink-2);
  border: 2px solid var(--ink-3);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--ink);
  color: var(--ink);
}

/* Inline text link */
.btn-link {
  background: none;
  border: none;
  color: var(--teal-text);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-sans);
  padding: 4px 0;
  width: auto;
  cursor: pointer;
  display: inline;
}
.btn-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════════
   FORM FIELDS
   ══════════════════════════════════════════════════════════════════════════ */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-family: var(--font-hand);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink-2);
}

.field-input {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream-2);
  border: 1.5px solid var(--ink-4);
  border-radius: var(--radius);
  padding: 10px 12px;
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
}

.field-input::placeholder { color: var(--ink-4); }
.field-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-wash); }

/* ═══════════════════════════════════════════════════════════════════════════
   FEEDBACK
   ══════════════════════════════════════════════════════════════════════════ */

.feedback-error {
  font-size: 0.85rem;
  color: var(--red);
  padding: 8px 10px;
  border-left: 2.5px solid var(--red);
  line-height: 1.5;
}

.feedback-warn {
  font-size: 0.85rem;
  color: var(--amber);
  padding: 8px 10px;
  border-left: 2.5px solid var(--amber);
  line-height: 1.5;
}

.loading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  padding: 8px 0;
}

.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--ink-4);
  border-top-color: var(--teal);
  border-radius: 50%;
  flex-shrink: 0;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════════════════
   SPACING HELPERS
   ══════════════════════════════════════════════════════════════════════════ */

.gap-xs  { gap: 8px; }
.gap-sm  { gap: 12px; }
.gap-md  { gap: 20px; }
.gap-lg  { gap: 32px; }

.mt-xs   { margin-top: 8px; }
.mt-sm   { margin-top: 14px; }
.mt-md   { margin-top: 24px; }
.mt-lg   { margin-top: 40px; }
.mt-xl   { margin-top: 56px; }

.stack   { display: flex; flex-direction: column; }

/* ═══════════════════════════════════════════════════════════════════════════
   PILL SELECT  (segmented control — e.g. AI preference)
   ══════════════════════════════════════════════════════════════════════════ */

.pill-select {
  display: flex;
  border: 2.5px solid var(--ink);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  touch-action: manipulation;
}

.pill-option {
  flex: 1;
  padding: 10px 8px;
  border: none;
  border-right: 1.5px solid var(--ink);
  background: var(--cream);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}

.pill-option:last-child { border-right: none; }

.pill-option.active {
  background: var(--teal);
  color: #fff;
}

.pill-option:active:not(.active) {
  background: var(--sand-2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ══════════════════════════════════════════════════════════════════════════ */

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-brand-name {
  font-family: var(--font-hand);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.login-tagline {
  font-family: var(--font-hand);
  font-size: 1.25rem;
  color: var(--ink-3);
  font-weight: 400;
}

.login-panel { display: flex; flex-direction: column; gap: 12px; }
.login-panel.hidden { display: none; }

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-4);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 4px 0;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: var(--ink-5);
}

.ai-pref-section { display: flex; flex-direction: column; gap: 8px; }

.ai-note {
  font-size: 0.76rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
  text-align: center;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   APP PLACEHOLDER PAGES
   ══════════════════════════════════════════════════════════════════════════ */

.placeholder-screen {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTPRINT TRAIL  (progress indicators, used across app)
   ══════════════════════════════════════════════════════════════════════════ */

.footprint-trail {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footprint {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.footprint.filled { background: var(--teal); }

/* ═══════════════════════════════════════════════════════════════════════════
   CHECKBOX ITEM  (task list)
   ══════════════════════════════════════════════════════════════════════════ */

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.task-check {
  width: 22px;
  height: 22px;
  border: 2px solid var(--ink-2);
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 1px;
  background: transparent;
  cursor: pointer;
}

.task-check.done {
  background: var(--teal);
  border-color: var(--teal);
}

.task-title       { font-size: 1rem; font-weight: 500; color: var(--ink); }
.task-title.done  { text-decoration: line-through; color: var(--ink-3); }
.task-sub         { font-size: 0.8rem; color: var(--ink-3); font-style: italic; }

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY
   ══════════════════════════════════════════════════════════════════════════ */

.hidden  { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

@media (max-width: 480px) {
  .screen-center { padding: 0 20px; }
}
