/* Westie site — shared styles.
   Brand palette mirrors the app (mobile/lib/core/theme/app_theme.dart):
   black background, #1E1E1E surface, #5FA6E0 sky-blue accent, and the
   #14289F→black gradient used behind the app's screens. */

:root {
  --bg: #000000;
  --surface: #1E1E1E;
  --surface-2: #171717;
  --accent: #5FA6E0;
  --accent-deep: #14289F;
  --text: #FFFFFF;
  --text-dim: rgba(255, 255, 255, 0.72);
  --text-faint: rgba(255, 255, 255, 0.5);
  --border: rgba(255, 255, 255, 0.12);
  --radius: 14px;
  --maxw: 940px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- header / nav ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.85);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(150%) blur(8px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 18px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: block;
}

nav.site-nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
}
nav.site-nav a { color: var(--text-dim); }
nav.site-nav a:hover { color: var(--accent); }

/* ---------- hero ---------- */

.hero {
  background: linear-gradient(160deg, var(--accent-deep) 0%, var(--bg) 62%);
  padding: 72px 0 64px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero img.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin-bottom: 22px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 6vw, 3.1rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero .tagline {
  margin: 0 auto 10px;
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  color: var(--text);
  max-width: 620px;
}

.hero .sub {
  margin: 0 auto;
  color: var(--text-dim);
  max-width: 640px;
  font-size: 1rem;
}

/* Lead screenshot under the hero copy. Deliberately a step larger than the
   thumbnails in the gallery below (which render ~208px in the 4-up grid). */
.hero img.hero-shot {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 36px auto 0;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}

/* ---------- sections ---------- */

section { padding: 56px 0; }
section + section { border-top: 1px solid var(--border); }

h2 {
  font-size: clamp(1.45rem, 3.4vw, 1.9rem);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.12rem;
  margin: 30px 0 8px;
  color: var(--text);
}

.section-intro {
  color: var(--text-dim);
  margin: 0 0 28px;
  max-width: 700px;
}

/* ---------- feature grid ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 8px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--accent);
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.96rem;
}

/* ---------- screenshots ---------- */

/* Four phone screenshots: a 4-up filmstrip on desktop, collapsing to
   2-up and then 1-up as the viewport narrows. */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 22px;
  margin-top: 8px;
}

.shot { text-align: center; }

.shot img {
  width: 100%;
  height: auto;
  max-width: 300px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: block;
  margin: 0 auto 10px;
}

.shot figcaption {
  color: var(--text-faint);
  font-size: 0.9rem;
}

/* ---------- permissions table ---------- */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 620px;
  font-size: 0.95rem;
}

thead th {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

tbody td {
  padding: 15px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  vertical-align: top;
  color: var(--text-dim);
}

tbody tr:last-child td { border-bottom: none; }

tbody td:first-child {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    monospace;
  font-size: 0.86em;
  background: rgba(95, 166, 224, 0.13);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

/* ---------- callout ---------- */

.callout {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 26px 0;
}

.callout p { margin: 0; color: var(--text-dim); }
.callout p + p { margin-top: 10px; }
.callout strong { color: var(--text); }

/* ---------- contact ---------- */

.contact-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--text-dim);
}
.contact-block p { margin: 0 0 4px; }

/* ---------- legal pages ---------- */

.legal { padding: 52px 0 72px; }

.legal h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.legal .updated {
  color: var(--text-faint);
  font-size: 0.94rem;
  margin: 0 0 34px;
}

.legal h2 {
  font-size: 1.24rem;
  margin: 40px 0 10px;
  padding-top: 6px;
  scroll-margin-top: 80px;
}

.legal p,
.legal li { color: var(--text-dim); }

.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 7px; }

.legal strong { color: var(--text); }

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
}
.toc h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.toc li { margin-bottom: 5px; break-inside: avoid; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 34px 0 44px;
  color: var(--text-faint);
  font-size: 0.92rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.site-footer nav { display: flex; gap: 20px; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  section { padding: 44px 0; }
  .hero { padding: 56px 0 48px; }
  .toc ol { columns: 1; }
}

/* ---------- account deletion form (/delete-account) ---------- */

.account-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  margin: 26px 0;
  max-width: 460px;
}

.account-form h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.account-form .step-hint {
  margin: 0 0 20px;
  color: var(--text-dim);
  font-size: 15px;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-dim);
}

.field input {
  width: 100%;
  padding: 11px 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px; /* >=16px so iOS Safari doesn't zoom on focus */
}

.field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

/* The emailed code: short, fixed-width, visually distinct. */
.field input.code-input {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 22px;
  letter-spacing: 0.32em;
  text-align: center;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 12px 18px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: #000;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; filter: none; }

/* Irreversible action — visually separated from the neutral steps. */
.btn.btn-danger { background: #E0655F; color: #000; }

.btn-secondary {
  display: inline-block;
  width: 100%;
  margin-top: 10px;
  padding: 11px 18px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
}

.form-status {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.5;
}

.form-status.error { color: #E0655F; }
.form-status.ok { color: var(--accent); }
.form-status:empty { margin: 0; }

.signed-in-as {
  margin: 0 0 18px;
  padding: 11px 13px;
  background: var(--surface-2);
  border-radius: 9px;
  font-size: 14px;
  color: var(--text-dim);
  word-break: break-word;
}

.deleted-panel {
  border-color: var(--accent);
  text-align: center;
}

.deleted-panel .tick {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 10px;
}

@media (max-width: 520px) {
  .account-form { padding: 22px 18px; }
}
