/* web/styles.css — shared styles for all hah.sg pages. Mobile-first; single
   breakpoint at 768px. No external CSS frameworks. */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --color-primary:         #4A6741;
  --color-primary-deep:    #2D5A3D;
  --color-primary-hover:   #3a5232;
  --color-accent:          #8EAF82;
  --color-bg:              #F7F5F0;
  --color-mint:            #EAF3EC;
  --color-surface:         #FFFFFF;
  --color-border:          #e0ddd5;
  --color-text:            #1a1a1a;
  --color-text-secondary:  #5b5f5a;
  --color-text-muted:      #999;
  --color-success-bg:      #F0F7EC;
  --color-success-border:  #A8CFA0;
  --color-success-text:    #2D5A27;
  --color-error:           #A32D2D;
  --radius-card:           16px;
  --radius-btn:            10px;
  --shadow-card:           0 4px 20px rgba(45,74,56,0.07);
  --shadow-card-hover:     0 12px 34px rgba(45,74,56,0.13);
  --max-width:             1120px;
  --font:                  'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  font-family: var(--font);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Sticky footer: full-height flex column so the footer pins to the bottom on
     short pages (account, billing, refer, delete-account); no effect on long pages. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ── Buttons ────────────────────────────────────────────── */
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-btn);
  padding: 12px 24px;
  border: none;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  text-align: center;
  transition: background .15s, opacity .15s;
}
.btn-primary:hover { background: var(--color-primary-hover); text-decoration: none; }
.btn-primary:disabled { background: #ccc; cursor: default; box-shadow: none; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: var(--radius-btn);
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  text-align: center;
  transition: background .15s;
}
.btn-ghost:hover { background: rgba(74,103,65,0.06); text-decoration: none; }

/* ── Cards & text ───────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.error-text { color: var(--color-error); font-size: 13px; margin-top: 6px; }
.muted      { color: var(--color-text-muted); font-size: 13px; }

/* ── Forms ──────────────────────────────────────────────── */
label {
  display: block;
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus { border-color: var(--color-primary); }
input.invalid { border-color: var(--color-error); }

.checkbox-row { display: flex; gap: 10px; align-items: flex-start; }
.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.checkbox-row label { margin-bottom: 0; cursor: pointer; }

/* ── Shared success / early-bird banner ─────────────────── */
.success-banner {
  background: var(--color-success-bg);
  border: 1px solid var(--color-success-border);
  color: var(--color-success-text);
  border-radius: var(--radius-card);
  padding: 16px 18px;
}

/* ── Spinner ────────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: hah-spin .7s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
.spinner-dark { border: 2.5px solid rgba(74,103,65,0.25); border-top-color: var(--color-primary); }
@keyframes hah-spin { to { transform: rotate(360deg); } }

/* ── Shared site header ─────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247,245,240,0.85); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(74,103,65,0.08); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.site-header .brand { display: flex; align-items: center; gap: 10px; }
.site-header .brand:hover { text-decoration: none; }
.site-header .brand img { height: 38px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--color-text-secondary); }
.nav-links a:hover { color: var(--color-primary); text-decoration: none; }
.nav-links .btn-primary { padding: 10px 20px; font-size: 14px; color: #fff; }
.nav-links .btn-primary:hover { color: #fff; }

/* ── Shared site footer ─────────────────────────────────── */
.site-footer { background: #14241b; color: #cdd6cf; padding: 56px 0 32px; margin-top: auto; }
.site-footer .footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 36px; }
.site-footer .footer-brand { max-width: 300px; }
.site-footer .footer-brand img { height: 40px; margin-bottom: 14px; }
.site-footer .footer-brand p { font-size: 14px; line-height: 1.6; opacity: .75; }
.site-footer .footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.site-footer .footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; margin-bottom: 14px; }
.site-footer .footer-col a { display: block; color: #cdd6cf; font-size: 14px; margin-bottom: 10px; opacity: .82; }
.site-footer .footer-col a:hover { opacity: 1; text-decoration: none; }
.site-footer .footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 22px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 13px; opacity: .7; }

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .nav-links { gap: 18px; }
  .nav-links a:not(.btn-primary) { font-size: 14px; }
}

/* App-store badges — shared by index.html (CTA band) and onboarding/success.html */
.store-badges { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 24px; margin-bottom: 20px; }
.store-badge { display: inline-flex; line-height: 0; text-decoration: none; transition: transform .15s ease; }
.store-badge img { height: 46px; width: auto; display: block; }
a.store-badge:hover { transform: translateY(-1px); }
.store-badge.disabled { opacity: .55; cursor: default; }

/* Refer-a-friend band (under the pricing section on index.html) */
.refer-band { padding: 20px 0 8px; }
.refer-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: #F0F7F2; border: 1px solid #C6DECE; border-radius: 16px; padding: 24px 28px; }
.refer-card .kicker { margin: 0 0 4px; }
.refer-card h3 { font-size: 20px; margin: 0 0 6px; color: var(--color-text); letter-spacing: -0.01em; }
.refer-card p { margin: 0; color: var(--color-text-secondary); font-size: 14px; line-height: 1.55; max-width: 560px; }
.refer-card .btn-primary { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 768px) { .refer-card { flex-direction: column; align-items: flex-start; } .refer-card .btn-primary { width: 100%; text-align: center; } }
