/* css/main.css — Briiq design system */
/* Fonts loaded via <link> in each HTML <head> — not @import, which blocks rendering */

/* ── Tokens ── */
:root {
  --teal:        #0F6E56;
  --teal-dark:   #0a4f3e;
  --teal-light:  #e6f4f0;
  --bg:          #F5F4F0;
  --ink:         #0D0D0D;
  --ink-muted:   #5a5a52;
  --ink-faint:   #a8a89e;
  --amber:       #BA7517;
  --amber-light: #fdf3e3;
  --white:       #ffffff;
  --border:      #e2e1db;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.07);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.09);
  --transition:  0.18s ease;
  --font-body:   'DM Sans', sans-serif;
  --font-display:'DM Serif Display', serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(1.75rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.3rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1rem, 2vw, 1.25rem); }
p  { color: var(--ink-muted); }
a  { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) { .container { padding: 0 16px; } }
.section { padding: clamp(40px, 8vw, 72px) 0; }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245,244,240,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
@media (max-width: 480px) { .nav { padding: 0 16px; } }
.nav-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; gap: 12px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem; color: var(--teal);
  letter-spacing: -0.02em; flex-shrink: 0;
}
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { font-size: 0.9rem; color: var(--ink-muted); font-weight: 500; white-space: nowrap; }
.nav-links a:hover { color: var(--teal); text-decoration: none; }
@media (max-width: 560px) {
  .nav-text-link { display: none !important; }
  .nav-links { gap: 10px; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-family: var(--font-body);
  font-size: 0.95rem; font-weight: 500;
  padding: 11px 22px; border-radius: var(--radius);
  border: none; cursor: pointer; transition: var(--transition);
  text-decoration: none !important; white-space: nowrap; line-height: 1;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn-primary  { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); color: var(--white); }
.btn-outline  { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.btn-outline:hover { background: var(--teal-light); }
.btn-ghost    { background: transparent; color: var(--ink-muted); }
.btn-ghost:hover { background: var(--border); }
.btn-amber    { background: var(--amber); color: var(--white); }
.btn-amber:hover { background: #9e620f; color: var(--white); }
.btn-lg  { padding: 14px 28px; font-size: 1rem; border-radius: 12px; }
.btn-sm  { padding: 8px 14px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ── Cards ── */
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 4vw, 28px);
  box-shadow: var(--shadow-sm);
}

/* ── Forms ── */
.form-group  { display: flex; flex-direction: column; gap: 6px; }
.form-label  { font-size: 0.875rem; font-weight: 500; color: var(--ink); }
.form-input, .form-select, .form-textarea {
  font-family: var(--font-body);
  font-size: 1rem; /* 1rem prevents iOS auto-zoom */
  color: var(--ink); background: var(--white);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; transition: border-color var(--transition);
  width: 100%; outline: none;
  -webkit-appearance: none; appearance: none;
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a5a52' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15,110,86,0.12);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint  { font-size: 0.8rem; color: var(--ink-faint); }
.form-error { font-size: 0.8rem; color: #c0392b; }
.form-stack { display: flex; flex-direction: column; gap: 18px; }

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 440px) { .grid-3 { grid-template-columns: 1fr; } }

/* ── Badge / Status ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.78rem; font-weight: 500;
  padding: 3px 10px; border-radius: 99px;
}
.badge-green { background: #e6f4f0; color: var(--teal); }
.badge-amber { background: var(--amber-light); color: var(--amber); }
.badge-gray  { background: #f0efeb; color: var(--ink-muted); }
.badge-red   { background: #fdecea; color: #b92b2b; }

/* ── Trust bar ── */
.trust-bar  { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.trust-fill { height: 100%; border-radius: 3px; background: var(--teal); transition: width 0.6s ease; }

/* ── Alert ── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 0.9rem; border: 1px solid transparent; }
.alert-success { background: #e6f4f0; color: var(--teal); border-color: #b3ddd3; }
.alert-error   { background: #fdecea; color: #b92b2b; border-color: #f5b8b4; }
.alert-info    { background: #e8f4fd; color: #1a6fa8; border-color: #b3d9f5; }

/* ── Spinner ── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: currentColor; border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ── Utility ── */
.text-center { text-align: center; }
.text-muted  { color: var(--ink-muted); }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.78rem; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.w-full  { width: 100%; }
.hidden  { display: none !important; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: clamp(28px, 5vw, 40px) 24px;
  text-align: center; font-size: 0.85rem; color: var(--ink-faint);
}
footer a { color: var(--ink-faint); }
footer a:hover { color: var(--teal); }
.footer-links { display: flex; gap: 20px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
@media (max-width: 480px) { .footer-links { gap: 14px; } }
