/* gotcha.dog — design tokens (from docs/plan/design.md, source: MD3 prototype) */

:root {
  /* Surfaces */
  --bg: #F6F2E9;          /* warm cream ground */
  --surface: #FFFFFF;     /* cards */
  --surface-alt: #EEE8DA; /* muted panels, "while you wait" */

  /* Ink / text */
  --ink: #1C2E48;         /* collar navy — headings, dark buttons, nav */
  --ink-2: #2A2926;       /* body on white */
  --muted: #6B6A62;       /* secondary text */
  --muted-2: #8A8474;     /* tertiary text, micro-labels */

  /* Hairlines */
  --hairline: #E4DECD;
  --hairline-2: #EEE8DA;
  --hairline-3: #DED8C8;

  /* Brand accent (brass tag) */
  --gold: #C79A3B;
  --gold-bright: #E7C86E;

  /* Success (sage) */
  --green: #3F7A50;
  --green-soft: #D7E7D9;
  --green-deep: #356A43;
  --green-deepest: #1E4A2B;

  /* Alert (brick) */
  --red: #B3402A;
  --red-soft: #F6DED7;

  /* Secondary / misc */
  --blue-soft: #D7E0F0;
  --notes-bg: #F4E6C2;
  --notes-ink: #7A5B12;
  --notes-ink-2: #4A3D1A;

  /* Dark navy scene (hero code-entry card) */
  --navy-bg: #1C2E48;
  --navy-well: #28405F;
  --navy-placeholder: #8FA3C0;
  --navy-text: #FBF7ED;

  /* Radii */
  --r-card: 28px;
  --r-hero: 34px;
  --r-input: 14px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-card: 0 10px 24px -18px rgba(0,0,0,.5);

  /* Type */
  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;
}

/* Pet signature colors (owner picks one) */
:root {
  --pet-navy: #1C2E48;
  --pet-gold: #C79A3B;
  --pet-red: #B3402A;
  --pet-green: #3F7A50;
  --pet-teal: #2E6E7E;
  --pet-purple: #6B4E8A;
  --pet-orange: #D57A4A;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Mobile-first: content column centered on larger screens */
.app-shell {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 20px;
}

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.4px; margin: 0; }

.mono { font-family: var(--font-mono); }

/* Buttons */
.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  border: none;
  border-radius: var(--r-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: transform .08s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { cursor: not-allowed; opacity: .7; }
.btn-primary { background: var(--gold-bright); color: var(--ink); }
.btn-navy { background: var(--ink); color: var(--navy-text); }
.btn-green { background: var(--green); color: #fff; }
.btn-blue-soft { background: var(--blue-soft); color: var(--ink); }
.btn-disabled { background: #C9C3B4; color: #F3EFE4; }

/* Button sizes */
.btn-60 { width: 100%; height: 60px; font-size: 18px; }
.btn-68 { width: 100%; height: 68px; font-size: 22px; }

/* Logo wordmark */
.logo { font-family: var(--font-display); font-weight: 600; font-size: 22px; color: var(--ink); display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.logo .dot { color: var(--gold); }

/* Logo tag-mark: rounded gold gradient square with a punched cream hole (pure CSS) */
.logo-mark {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px 9px 11px 11px;
  background: linear-gradient(160deg, var(--gold-bright), var(--gold));
  position: relative;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.5), 0 2px 6px rgba(0,0,0,.25);
}
.logo-mark::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bg);
}

/* Micro-label: small uppercase letterspaced tertiary label */
.micro-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.card-alt {
  background: var(--surface-alt);
  border-radius: var(--r-card);
}

/* Row card: icon tile + title/sub + trailing chevron (tappable card as a link) */
.row-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.row-card:active { transform: scale(.99); }
.row-card-title { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--ink); }
.row-card-sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.row-card-chevron { color: #C7C0AF; font-size: 26px; margin-left: auto; }

/* Page header: logo left, muted link right */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.link-muted {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* Hero heading + subhead */
.h1-hero { font-size: 42px; font-weight: 700; line-height: 1.05; }
.subhead { color: var(--muted); font-size: 15.5px; margin: 10px 0 0; line-height: 1.5; }

/* Pills / chips */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 13px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 12px;
  padding: 5px 11px;
}
.chip-green { background: var(--green-soft); color: var(--green-deep); }
.chip-red { background: var(--red-soft); color: var(--red); }

/* Icon tile (e.g. green paw tile on landing "Own a dog?" card) */
.icon-tile {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-tile-green { background: var(--green-soft); color: var(--green); }

/* Inputs */
.input, textarea.input {
  width: 100%;
  border: 2px solid var(--hairline);
  background: var(--surface);
  border-radius: var(--r-input);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink-2);
  outline: none;
  transition: border-color .15s ease;
}
.input:focus, textarea.input:focus { border-color: var(--gold); }
.input::placeholder, textarea.input::placeholder { color: var(--muted-2); }

/* Icons (Material Symbols Rounded, filled) */
.msr {
  font-family: 'Material Symbols Rounded';
  font-variation-settings: 'FILL' 1;
  line-height: 1;
}

/* Divider row: "— OR —" */
.divider-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0;
}
.divider-row .line { flex: 1; height: 1px; background: var(--hairline-3); }
.divider-row .label { font-size: 12px; font-weight: 600; color: #B0AC9E; }

/* Hero code-entry card (navy) */
.hero-card {
  background: var(--navy-bg);
  border-radius: var(--r-hero);
  padding: 24px 22px;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(231, 200, 110, .13);
  pointer-events: none;
}
.hero-card > * { position: relative; }
.hero-label { color: var(--gold-bright); }
.code-well {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  background: var(--navy-well);
  border-radius: 16px;
  padding: 8px 14px;
}
.code-well .prefix { font-family: var(--font-mono); font-size: 15px; color: var(--navy-placeholder); }
.code-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--navy-text);
  outline: none;
}
.code-error {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #F0B4A5;
  font-size: 13px;
}
.code-well.shake { animation: gd-shake .3s ease; }

/* Hint row */
.hint-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 12.5px;
  justify-content: center;
  text-align: center;
}

/* Entry / success animations */
@keyframes gd-screen { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes gd-pop { 0% { transform: scale(.85); opacity: 0; } 60% { transform: scale(1.05); } 100% { transform: scale(1); opacity: 1; } }
@keyframes gd-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.fade-rise { animation: gd-screen .4s ease both; }
.pop-in { animation: gd-pop .45s ease both; }

@media (prefers-reduced-motion: reduce) {
  .fade-rise, .pop-in, .code-well.shake {
    animation: none !important;
  }
  .btn, .input, textarea.input {
    transition: none !important;
  }
}
