/* ============================================================
   Veiled – Brand Design System
   Brand vars: edit these to restyle the entire site.
   ============================================================ */
:root {
  /* Brand */
  --brand-primary:    #6C63FF;
  --brand-primary-dk: #4B44CC;
  --brand-accent:     #A89CFF;
  --brand-name:       "Veiled";

  /* Neutrals (light theme) */
  --bg:               #FFFFFF;
  --bg-alt:           #F6F5FF;
  --bg-card:          #FFFFFF;
  --border:           #E2E0F5;
  --text:             #1A1A2E;
  --text-muted:       #5C5C7A;
  --text-light:       #8888AA;

  /* Semantic */
  --success:          #22C55E;
  --warning:          #F59E0B;

  /* Typography */
  --font-sans:        'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-size-base:   1rem;       /* 16px */
  --line-height:      1.65;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2.5rem;
  --space-2xl: 4rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(108,99,255,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(108,99,255,.12), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 32px rgba(108,99,255,.16), 0 4px 12px rgba(0,0,0,.08);

  /* Layout */
  --max-w: 1080px;
  --nav-h: 64px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--text);
  background: var(--bg);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-primary); text-decoration: underline; }
a:hover { color: var(--brand-primary-dk); }
ul, ol { padding-left: 1.25em; }
h1,h2,h3,h4,h5 { line-height: 1.25; font-weight: 700; color: var(--text); }

/* ---- Typography scale ---- */
.text-xs   { font-size: .75rem; }
.text-sm   { font-size: .875rem; }
.text-md   { font-size: 1rem; }
.text-lg   { font-size: 1.125rem; }
.text-xl   { font-size: 1.25rem; }
.text-2xl  { font-size: 1.5rem; }
.text-3xl  { font-size: 1.875rem; }
.text-4xl  { font-size: 2.25rem; }
.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }
strong { font-weight: 600; }

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}
.section {
  padding-block: var(--space-2xl);
}
.section-alt {
  background: var(--bg-alt);
}
.grid-2 {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
.grid-3 {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }
.text-center { text-align: center; }

/* ---- Navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}
.nav-logo img, .nav-logo svg { height: 32px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
  padding: 0;
}
.nav-links a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--brand-primary);
  background: var(--bg-alt);
}
.nav-cta {
  font-size: .875rem;
  font-weight: 600;
  background: var(--brand-primary);
  color: #fff !important;
  padding: .45rem 1rem !important;
  border-radius: var(--radius-sm) !important;
  text-decoration: none;
  transition: background .15s !important;
}
.nav-cta:hover { background: var(--brand-primary-dk) !important; color: #fff !important; }

/* Mobile nav */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
@media (max-width: 680px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: var(--space-md) var(--space-lg);
    gap: var(--space-xs);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .6rem var(--space-sm); width: 100%; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.btn-primary {
  background: var(--brand-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-primary-dk);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.btn-outline:hover {
  background: var(--bg-alt);
}
.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.btn-sm {
  font-size: .875rem;
  padding: .5rem 1.25rem;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  font-size: 1.5rem;
}
.card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}
.card p {
  font-size: .9rem;
  color: var(--text-muted);
}

/* ---- Hero ---- */
.hero {
  padding-block: calc(var(--space-2xl) * 1.4) var(--space-2xl);
  background: linear-gradient(135deg, var(--bg-alt) 0%, #fff 60%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 80% 20%, rgba(108,99,255,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brand-primary);
  background: rgba(108,99,255,.1);
  border-radius: 100px;
  padding: .3rem .85rem;
  margin-bottom: var(--space-md);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -.02em;
  margin-bottom: var(--space-md);
  max-width: 620px;
}
.hero h1 span { color: var(--brand-primary); }
.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: var(--space-xl);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* ---- Section headings ---- */
.section-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--brand-primary);
  margin-bottom: var(--space-sm);
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-md);
  letter-spacing: -.02em;
}
.section-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 540px;
}

/* ---- Forms ---- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}
.form-group label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
}
.form-group input,
.form-group textarea,
.form-group select {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: .65rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,.15);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-light); }
.form-group textarea { min-height: 110px; resize: vertical; }
.form-group .hint {
  font-size: .78rem;
  color: var(--text-light);
}
.form-group .error {
  font-size: .78rem;
  color: #DC2626;
  display: none;
}
.form-group.has-error input,
.form-group.has-error textarea {
  border-color: #DC2626;
}
.form-group.has-error .error { display: block; }

/* Checkbox consent */
.consent-wrap {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}
.consent-wrap input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  accent-color: var(--brand-primary);
  cursor: pointer;
  border-radius: 4px;
}
.consent-wrap label {
  font-size: .82rem;
  line-height: 1.55;
  color: var(--text-muted);
  cursor: pointer;
}
.consent-wrap label a { color: var(--brand-primary); }
.consent-wrap.required-error {
  border-color: #DC2626;
}
.consent-required-msg {
  font-size: .78rem;
  color: #DC2626;
  display: none;
  margin-top: calc(var(--space-xs) * -1);
  margin-bottom: var(--space-md);
}
.consent-required-msg.show { display: block; }

/* ---- Opt-in box ---- */
.optin-box {
  background: linear-gradient(135deg, var(--bg-alt), #fff);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  max-width: 520px;
}
.optin-box h3 {
  font-size: 1.35rem;
  margin-bottom: var(--space-sm);
}
.optin-box p {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

/* ---- SMS message bubbles ---- */
.bubble-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 4px;
  padding: var(--space-md) var(--space-lg);
  position: relative;
  box-shadow: var(--shadow-sm);
  max-width: 420px;
}
.bubble-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brand-accent);
  margin-bottom: var(--space-xs);
}
.bubble p {
  font-size: .9rem;
  color: var(--text);
  line-height: 1.55;
}
.bubble-sender {
  font-size: .7rem;
  color: var(--text-light);
  margin-top: var(--space-xs);
}

/* ---- Info boxes ---- */
.info-box {
  background: rgba(108,99,255,.06);
  border-left: 4px solid var(--brand-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-md) var(--space-lg);
  margin-block: var(--space-lg);
}
.info-box p { font-size: .9rem; color: var(--text-muted); }
.info-box strong { color: var(--text); }

.warn-box {
  background: rgba(245,158,11,.07);
  border-left: 4px solid var(--warning);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-md) var(--space-lg);
  margin-block: var(--space-lg);
}

/* ---- Keyword opt-in box ---- */
.keyword-box {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}
.keyword-icon {
  font-size: 2rem;
  line-height: 1;
}
.keyword-box h4 { font-size: 1rem; margin-bottom: var(--space-xs); }
.keyword-box p { font-size: .875rem; color: var(--text-muted); }
.keyword-box code {
  background: rgba(108,99,255,.1);
  color: var(--brand-primary);
  padding: .1em .4em;
  border-radius: 4px;
  font-size: .9em;
  font-family: monospace;
}

/* ---- STOP/HELP ---- */
.stophelp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
@media (max-width: 480px) {
  .stophelp-grid { grid-template-columns: 1fr; }
}
.stophelp-card {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
}
.stophelp-card.stop { background: #FEF2F2; border-color: #FECACA; }
.stophelp-card.help { background: var(--bg-alt); }
.stophelp-card .kw {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: var(--space-sm);
}
.stophelp-card.stop .kw { color: #DC2626; }
.stophelp-card.help .kw { color: var(--brand-primary); }
.stophelp-card p { font-size: .875rem; color: var(--text-muted); }

/* ---- Policy pages ---- */
.policy-wrap {
  max-width: 760px;
  margin-inline: auto;
  padding-block: var(--space-2xl);
}
.policy-wrap h1 {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}
.policy-meta {
  font-size: .875rem;
  color: var(--text-light);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}
.policy-wrap h2 {
  font-size: 1.25rem;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}
.policy-wrap p, .policy-wrap li {
  font-size: .95rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}
.policy-wrap ul, .policy-wrap ol {
  margin-bottom: var(--space-md);
}
.policy-wrap a { color: var(--brand-primary); }
.policy-wrap .highlight-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-block: var(--space-lg);
  font-size: .9rem;
}
.policy-wrap .highlight-box strong { display: block; margin-bottom: var(--space-xs); color: var(--text); }

/* ---- Page hero (inner pages) ---- */
.page-hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: var(--space-2xl) 0 var(--space-xl);
}
.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -.02em;
  margin-bottom: var(--space-sm);
}
.page-hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 540px;
}

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}
@media (min-width: 700px) {
  .contact-grid { grid-template-columns: 1fr 1.4fr; }
}
.contact-info-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.contact-info-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}
.contact-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.contact-info-item strong {
  display: block;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-light);
  margin-bottom: 2px;
}
.contact-info-item span, .contact-info-item a {
  font-size: .95rem;
  color: var(--text);
}

/* ---- Modal ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
}
.modal-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34,197,94,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  font-size: 2rem;
}
.modal h2 { font-size: 1.4rem; margin-bottom: var(--space-sm); }
.modal p { font-size: .9rem; color: var(--text-muted); margin-bottom: var(--space-lg); }
.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-light);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.modal-close:hover { background: var(--bg-alt); }

/* ---- Footer ---- */
.footer {
  background: var(--text);
  color: rgba(255,255,255,.75);
  padding-block: var(--space-2xl) var(--space-xl);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}
@media (min-width: 600px) {
  .footer-grid { grid-template-columns: 1.8fr 1fr 1fr; }
}
.footer-brand p {
  font-size: .875rem;
  margin-top: var(--space-sm);
  max-width: 260px;
  line-height: 1.6;
}
.footer-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
.footer-logo-text span { color: var(--brand-accent); }
.footer h4 {
  color: #fff;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: var(--space-md);
}
.footer ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.footer ul a {
  font-size: .875rem;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  transition: color .15s;
}
.footer ul a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  justify-content: space-between;
}
.footer-bottom p { font-size: .78rem; color: rgba(255,255,255,.45); }
.footer-disclaimer {
  font-size: .75rem;
  color: rgba(255,255,255,.4);
  margin-top: var(--space-md);
  max-width: 640px;
  line-height: 1.55;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  font-size: .8rem;
  color: var(--text-light);
  margin-bottom: var(--space-md);
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-light); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-primary); }
.breadcrumb span { color: var(--text-light); }

/* ---- Table ---- */
.table-wrap { overflow-x: auto; margin-block: var(--space-lg); }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th {
  background: var(--bg-alt);
  text-align: left;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  padding: .6rem 1rem;
  border-bottom: 2px solid var(--border);
}
td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}
td strong { color: var(--text); }
tr:last-child td { border-bottom: none; }

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-md);
  background: var(--brand-primary);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  z-index: 999;
  text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: 0; }

/* ---- 404 ---- */
.not-found {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}
.not-found-code {
  font-size: 7rem;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--brand-primary);
  opacity: .2;
  line-height: 1;
  margin-bottom: var(--space-lg);
}

/* ---- Divider ---- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: var(--space-xl);
}

/* ---- Focus visible ---- */
:focus-visible {
  outline: 3px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Print ---- */
@media print {
  .nav, .footer, .btn, .modal-overlay { display: none !important; }
  .hero { padding-block: 1rem; }
}
