/* Wreckfinder website styles. Colours match the app's design system (DESIGN.md §2).
   Change a colour here and it changes everywhere on the site. */
:root {
  --cyan: #00B4D8;
  --action: #007A99;
  --deep: #0B4A5E;
  --navy: #04111F;
  --bg: #F3F5F7;
  --surface: #FFFFFF;
  --border: #E3E8EC;
  --text: #12293A;
  --text-2: #5B6B78;
  --on-dark: #FFFFFF;
  --on-dark-2: #B9D3DC;
  --premium: #F2B92A;
  --success: #2BA86A;
  --sea: #8FD9EE;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--action); }
a:hover { color: var(--deep); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 16px; }
h1 { font-size: clamp(32px, 5vw, 52px); letter-spacing: -0.5px; }
h2 { font-size: clamp(26px, 3.5vw, 36px); }
h3 { font-size: 20px; }
p { margin: 0 0 16px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.label { font-size: 13px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-2); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }

/* Header */
.site-header { background: var(--navy); color: var(--on-dark); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--on-dark); text-decoration: none; font-weight: 700; font-size: 20px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand:hover { color: var(--on-dark); }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--on-dark-2); text-decoration: none; padding: 10px 12px; border-radius: var(--radius-sm); font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--on-dark); background: rgba(255,255,255,0.08); }
.nav .nav-cta { background: var(--cyan); color: var(--navy); }
.nav .nav-cta:hover { background: #22C3E6; color: var(--navy); }
@media (max-width: 720px) {
  .nav { flex-wrap: nowrap; }
  .nav .nav-hide-sm { display: none; }
  .nav a { padding: 10px; font-size: 15px; white-space: nowrap; }
  .brand { font-size: 18px; }
}
@media (max-width: 430px) {
  .site-header .wrap { padding: 0 16px; gap: 8px; }
  .nav { gap: 0; }
  .nav a { padding: 8px 7px; }
  .nav .nav-cta { padding: 8px 10px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand img { width: 32px; height: 32px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 28px; border-radius: var(--radius-md); font-weight: 600; font-size: 17px; text-decoration: none; border: 1.5px solid transparent; }
.btn-primary { background: var(--action); color: var(--on-dark); }
.btn-primary:hover { background: var(--deep); color: var(--on-dark); }
.btn-on-dark { background: var(--cyan); color: var(--navy); }
.btn-on-dark:hover { background: #22C3E6; color: var(--navy); }
.btn-secondary { border-color: var(--action); color: var(--action); background: transparent; }
.store-badges { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.store-badges img { display: block; height: 48px; width: auto; }
/* device.js: show only the visitor's own store on phones */
.is-android .badge-ios, .is-ios .badge-android { display: none; }

/* Hero */
.hero { background: var(--navy); color: var(--on-dark); padding: 56px 0 0; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: end; }
.hero h1 { color: var(--on-dark); }
.hero .lead { font-size: 20px; color: var(--on-dark-2); max-width: 34em; }
.hero .hero-copy { padding-bottom: 56px; }
.hero .small { color: var(--on-dark-2); font-size: 15px; margin-top: 16px; }
.hero .small a { color: var(--cyan); }
.coord-chip { display: inline-flex; gap: 10px; align-items: center; background: var(--deep); border-radius: var(--radius-md); padding: 10px 16px; margin-bottom: 24px; color: var(--on-dark); font-size: 18px; }
.coord-chip .label { color: var(--cyan); }
.phone { width: min(320px, 80%); margin: 0 auto; border-radius: 36px 36px 0 0; border: 10px solid #1D3547; border-bottom: 0; overflow: hidden; background: var(--surface); }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .hero-copy { padding-bottom: 8px; }
}

/* Sections */
section { padding: 72px 0; }
.section-head { max-width: 40em; margin-bottom: 40px; }
.section-head p { color: var(--text-2); font-size: 19px; }
.alt { background: var(--surface); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.alt .card { background: var(--bg); }
.card p { color: var(--text-2); margin: 0; }
.icon { width: 48px; height: 48px; border-radius: var(--radius-md); background: #E1F6FB; color: var(--action); display: grid; place-items: center; margin-bottom: 16px; }
.icon svg { width: 26px; height: 26px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }

.showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; align-items: start; }
.showcase figure { margin: 0; }
.showcase img { border-radius: 28px; border: 8px solid #1D3547; background: var(--surface); }
.showcase figcaption { margin-top: 16px; }
.showcase figcaption strong { display: block; font-size: 18px; }
.showcase figcaption span { color: var(--text-2); }
@media (max-width: 860px) { .showcase { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; } }

.audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .audience { grid-template-columns: 1fr; } }

/* Pricing */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 860px; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; display: flex; flex-direction: column; align-items: flex-start; }
.plan .ticks { align-self: stretch; }
.plan .btn { margin-top: auto; }
.plan.premium { background: var(--deep); color: var(--on-dark); border-color: var(--deep); }
.plan .price { font-size: 40px; font-weight: 700; margin: 8px 0 4px; }
.plan .price small { font-size: 17px; font-weight: 600; }
.plan .sub { color: var(--text-2); }
.plan.premium .sub, .plan.premium .label { color: var(--on-dark-2); }
.badge { display: inline-block; background: var(--premium); color: var(--navy); font-size: 12px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; }
.ticks { list-style: none; padding: 0; margin: 24px 0; }
.ticks li { padding: 6px 0 6px 32px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 14px; height: 8px; border-left: 2.5px solid var(--success); border-bottom: 2.5px solid var(--success); transform: rotate(-45deg); }
.plan.premium .ticks li::before { border-color: var(--cyan); }
@media (max-width: 720px) { .pricing { grid-template-columns: 1fr; } }

.press { text-align: center; }
.press img { margin: 0 auto; max-width: 720px; width: 100%; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0 24px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; padding: 20px 0; min-height: 56px; list-style: none; position: relative; padding-right: 32px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 16px; font-size: 26px; color: var(--action); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--text-2); }

/* CTA band */
.cta { background: var(--deep); color: var(--on-dark); text-align: center; }
.cta h2 { color: var(--on-dark); }
.cta p { color: var(--on-dark-2); font-size: 19px; }
.cta .store-badges { justify-content: center; margin-top: 24px; }

/* Plain text pages (privacy, terms, about) */
.page { padding: 56px 0 72px; }
.page .wrap { max-width: 780px; }
.page h2 { font-size: 24px; margin-top: 40px; }
.page .updated { color: var(--text-2); }
.page ul { padding-left: 22px; }
.page li { margin-bottom: 8px; }
.notice { background: #FFF6DD; border: 1px solid var(--premium); border-radius: var(--radius-md); padding: 16px 20px; margin-bottom: 32px; }

/* Footer */
.site-footer { background: var(--navy); color: var(--on-dark-2); padding: 48px 0 32px; font-size: 15px; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer h3 { color: var(--on-dark); font-size: 16px; }
.site-footer a { color: var(--on-dark-2); text-decoration: none; display: inline-block; padding: 4px 0; }
.site-footer a:hover { color: var(--on-dark); }
.site-footer .brand { display: flex; color: var(--on-dark); margin-bottom: 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer .legal { border-top: 1px solid #1D3547; margin-top: 32px; padding-top: 20px; }
@media (max-width: 720px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* Dusty chat box (assets/dusty.js) */
.dusty-launch { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border: 0; border-radius: 999px; background: var(--action); color: var(--on-dark); font: inherit; font-weight: 600; box-shadow: 0 6px 20px rgba(4,17,31,.25); cursor: pointer; }
.dusty-launch:hover { background: var(--deep); }
.dusty-launch[hidden] { display: none; }
.dusty-panel { position: fixed; right: 16px; bottom: 16px; z-index: 51; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 32px)); display: flex; flex-direction: column; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 12px 40px rgba(4,17,31,.3); overflow: hidden; }
.dusty-panel[hidden] { display: none; }
.dusty-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--deep); color: var(--on-dark); }
.dusty-head > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dusty-sub, .dusty-who { font-size: 12px; color: var(--on-dark-2); }
.dusty-who { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dusty-auth, .dusty-close { border: 0; background: transparent; color: var(--on-dark); font: inherit; cursor: pointer; }
.dusty-auth { font-size: 13px; padding: 6px 10px; border: 1px solid var(--on-dark-2); border-radius: var(--radius-sm); }
.dusty-auth[hidden] { display: none; }
.dusty-close { font-size: 24px; line-height: 1; padding: 0 4px; }
.dusty-list { flex: 1; overflow-y: auto; padding: 14px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.dusty-msg { max-width: 85%; padding: 10px 12px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); }
.dusty-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.dusty-from { display: block; font-size: 12px; font-weight: 600; color: var(--action); margin-bottom: 2px; }
.dusty-customer { align-self: flex-end; background: var(--action); color: var(--on-dark); border-color: var(--action); }
.dusty-sean .dusty-from { color: var(--deep); }
.dusty-typing { font-size: 14px; color: var(--text-2); font-style: italic; }
.dusty-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
.dusty-form textarea { flex: 1; resize: none; font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); background: var(--surface); }
.dusty-send { border: 0; border-radius: var(--radius-sm); padding: 0 16px; background: var(--action); color: var(--on-dark); font: inherit; font-weight: 600; cursor: pointer; }
.dusty-send:disabled { opacity: .6; cursor: default; }
.dusty-note { margin: 0; padding: 0 12px 10px; font-size: 11px; color: var(--text-2); }
.dusty-note a { color: var(--action); }
