/* PetPass demo — shared design system */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,300&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --teal: #0D7F6E;
  --teal-l: #E0F4F1;
  --teal-m: #1AA08A;
  --teal-d: #075E51;
  --teal-xd: #0A4A40;
  --amber: #E07A1F;
  --amber-l: #FDF1E7;
  --coral: #E05050;
  --coral-l: #FDEAEA;
  --ink: #1A1F2E;
  --ink-2: #3D4355;
  --ink-3: #6B7280;
  --ink-4: #9CA3AF;
  --surface: #F8F7F4;
  --surface-2: #EDEBE6;
  --white: #FFFFFF;
  --border: #E5E3DE;
  --shadow: 0 2px 12px rgba(0, 0, 0, .08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, .12);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, .18);
  --r: 14px;
  --r-sm: 8px;
  --r-lg: 20px;
  --r-xl: 28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', -apple-system, system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Type ── */
h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 300; color: var(--teal); }
a { color: inherit; text-decoration: none; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 100px; font-family: 'Outfit', sans-serif; font-weight: 600; cursor: pointer; transition: .2s; letter-spacing: .01em; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--teal); color: #fff; padding: 14px 28px; font-size: 15px; box-shadow: 0 4px 16px rgba(13, 127, 110, .3); }
.btn-primary:hover { background: var(--teal-d); }
.btn-secondary { background: var(--teal-l); color: var(--teal-d); padding: 12px 20px; font-size: 14px; }
.btn-outline { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); padding: 12px 20px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--ink-2); padding: 10px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-coral { background: var(--coral); color: #fff; padding: 14px 24px; font-size: 14px; box-shadow: 0 4px 16px rgba(224, 80, 80, .3); }
.btn-sm { padding: 8px 16px; font-size: 12px; }

/* ── Chips ── */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.chip-teal { background: var(--teal-l); color: var(--teal-d); }
.chip-amber { background: var(--amber-l); color: var(--amber); }
.chip-coral { background: var(--coral-l); color: var(--coral); }
.chip-gray { background: #F0EEE9; color: var(--ink-3); }

/* ── Inputs ── */
input, select, textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13, 127, 110, .12); }
label.field-label { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; display: block; }
.field { margin-bottom: 14px; }

/* ── Cards ── */
.card { background: var(--white); border-radius: var(--r); border: 1px solid var(--border); overflow: hidden; }
.card-body { padding: 16px; }

.section-title { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 12px; }

/* ── Logo ── */
.logo-row { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 36px; height: 36px; background: var(--teal); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.logo-mark.on-dark { background: rgba(255, 255, 255, .15); }
.logo-text { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.logo-text.on-dark { color: #fff; }
.logo-text em { font-weight: 300; font-style: italic; color: var(--teal); }
.logo-text.on-dark em { color: rgba(255, 255, 255, .8); }

/* ── Device frame (mobile mockup wrap, used on desktop) ── */
.device {
  width: 390px;
  min-height: 800px;
  max-height: 900px;
  background: var(--white);
  border-radius: 40px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .25), 0 0 0 8px #1A1A1A, inset 0 0 0 1px #333;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.sb-notch { width: 90px; height: 28px; background: #1A1A1A; border-radius: 0 0 18px 18px; position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 5; }
.status-bar { padding: 12px 28px 6px; display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 600; color: var(--ink); flex-shrink: 0; background: var(--white); }
.status-bar .right { display: flex; gap: 4px; align-items: center; }

/* On mobile, kill the frame and go fullscreen */
@media (max-width: 480px) {
  body.has-device { background: var(--white); padding: 0; }
  .device {
    width: 100%;
    min-height: 100vh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }
  .sb-notch { display: none; }
  .status-bar { display: none; }
}

/* Desktop: center the device frame */
body.has-device {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 48px;
}

/* ── Generic screen container (used inside device or page) ── */
.screen { flex: 1; overflow-y: auto; overflow-x: hidden; display: none; flex-direction: column; }
.screen.active { display: flex; }
.screen::-webkit-scrollbar { width: 0; }

/* ── Top bar (in-app) ── */
.top-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--white); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.top-bar-title { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 600; color: var(--ink); }
.top-bar-back { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.top-bar-back svg { width: 16px; height: 16px; stroke: var(--ink); stroke-width: 2.5; fill: none; }
.top-bar-action { font-size: 13px; font-weight: 600; color: var(--teal); background: none; border: none; cursor: pointer; font-family: 'Outfit', sans-serif; }

/* ── Bottom nav ── */
.bottom-nav { background: var(--white); border-top: 1px solid var(--border); display: flex; padding: 8px 0 16px; flex-shrink: 0; }
.bnav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; padding: 4px 0; transition: .15s; background: none; border: none; font-family: 'Outfit', sans-serif; }
.bnav-item svg { width: 22px; height: 22px; stroke: var(--ink-3); stroke-width: 1.8; fill: none; transition: .15s; }
.bnav-item span { font-size: 10px; color: var(--ink-3); font-weight: 500; }
.bnav-item.active svg, .bnav-item.active span { stroke: var(--teal); color: var(--teal); }
.bnav-item.active svg { stroke-width: 2.2; }

/* ── Toast ── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 100px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); z-index: 9999; opacity: 0; pointer-events: none; transition: .3s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Demo helper bar (the "this is a demo" hint at top) ── */
.demo-bar { position: fixed; top: 0; left: 0; right: 0; background: var(--ink); color: #fff; padding: 6px 16px; font-size: 11px; text-align: center; z-index: 1000; font-weight: 500; letter-spacing: .02em; }
.demo-bar a { color: var(--teal-l); text-decoration: underline; margin-left: 8px; }
body.has-demo-bar { padding-top: 28px; }

/* ── Utility ── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
