/* ============================================================
   SMS Guard — shared stylesheet
   Aesthetic: refined dark "security console"
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Familjen+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --ink:        #080b0a;
  --ink-2:      #0d1210;
  --panel:      #121a17;
  --panel-2:    #17211d;
  --line:       #24322c;
  --line-soft:  #1a2420;

  --signal:     #b8f24e;   /* brand / safe   */
  --signal-dim: #6f8f34;
  --amber:      #ffb454;   /* suspicious     */
  --coral:      #ff5e57;   /* high risk      */

  --mist:       #e9f1ec;
  --muted:      #8b9a92;
  --faint:      #55655d;

  --display: 'Bricolage Grotesque', serif;
  --body:    'Familjen Grotesk', sans-serif;
  --mono:    'Space Mono', monospace;

  --r-lg: 26px;
  --r-md: 16px;
  --r-sm: 10px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--mist);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* atmospheric background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60vw 60vw at 78% -10%, rgba(184,242,78,0.10), transparent 60%),
    radial-gradient(50vw 50vw at 8% 8%, rgba(255,94,87,0.06), transparent 55%),
    radial-gradient(70vw 40vw at 50% 120%, rgba(184,242,78,0.05), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
/* grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: min(1180px, 92vw); margin-inline: auto; position: relative; z-index: 2; }

.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ---------- selection & scrollbar ---------- */
::selection { background: var(--signal); color: var(--ink); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 20px; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--ink) 72%, transparent);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(150deg, var(--signal), var(--signal-dim));
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(184,242,78,0.4), 0 8px 24px -8px rgba(184,242,78,0.6);
}
.brand-mark svg { width: 19px; height: 19px; }
.brand span b { color: var(--signal); }

/* ---------- language toggle + i18n visibility ---------- */
html[lang="en"] .t-sv { display: none !important; }
html[lang="sv"] .t-en { display: none !important; }

.lang-toggle {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 3px; gap: 2px;
  background: color-mix(in srgb, var(--ink) 40%, transparent);
}
.lang-seg {
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); background: transparent; border: none; cursor: pointer;
  padding: 6px 11px; border-radius: 999px; line-height: 1;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.lang-seg.active { background: var(--signal); color: var(--ink); }
.lang-seg:not(.active):hover { color: var(--mist); }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { color: var(--muted); font-size: 0.94rem; font-weight: 500; transition: color 0.25s var(--ease); }
.nav-links a:hover { color: var(--mist); }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--body); font-weight: 600; font-size: 0.95rem;
  padding: 11px 20px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--signal); color: var(--ink);
  box-shadow: 0 10px 30px -10px rgba(184,242,78,0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(184,242,78,0.7); }
.btn-ghost { background: transparent; color: var(--mist); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--signal); color: var(--signal); }

/* ============================================================
   FOOTER (shared)
   ============================================================ */
.footer { position: relative; z-index: 2; border-top: 1px solid var(--line-soft); margin-top: 120px; padding: 70px 0 46px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer h4 { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); margin-bottom: 20px; }
.footer-col a { display: block; color: var(--muted); padding: 7px 0; font-size: 0.95rem; transition: color 0.2s, transform 0.2s var(--ease); }
.footer-col a:hover { color: var(--signal); transform: translateX(3px); }
.footer-lead { max-width: 320px; }
.footer-lead p { color: var(--muted); margin-top: 16px; font-size: 0.95rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 0.85rem; flex-wrap: wrap; gap: 12px; }
.footer-bottom .mono { color: var(--faint); }

/* ============================================================
   Reveal on load / scroll
   ============================================================ */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* ============================================================
   Sub-page (legal / policy) shell
   ============================================================ */
.page-hero { padding: 90px 0 40px; position: relative; z-index: 2; }
.page-hero .kicker { color: var(--signal); margin-bottom: 18px; }
.page-hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.03em; line-height: 1; }
.page-hero .updated { color: var(--faint); margin-top: 18px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }

.page-body { position: relative; z-index: 2; padding: 20px 0 40px; }
.page-empty {
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 80px 40px;
  text-align: center;
  color: var(--faint);
  background: linear-gradient(180deg, var(--ink-2), transparent);
}
.page-empty .mono { color: var(--signal-dim); }
.page-empty p { margin-top: 14px; max-width: 440px; margin-inline: auto; color: var(--muted); }

/* ---------- legal / long-form content ---------- */
.legal { max-width: 760px; }
.legal .intro { font-size: 1.1rem; color: var(--mist); line-height: 1.6; padding-bottom: 30px; margin-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.legal section { padding: 28px 0; border-bottom: 1px solid var(--line-soft); }
.legal section:last-of-type { border-bottom: none; }
.legal h2 {
  font-family: var(--display); font-weight: 700;
  font-size: 1.5rem; letter-spacing: -0.02em;
  display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px;
}
.legal h2 .num { font-family: var(--mono); font-size: 0.82rem; color: var(--signal); letter-spacing: 0.06em; flex-shrink: 0; }
.legal p { color: var(--muted); font-size: 1rem; line-height: 1.7; margin-bottom: 12px; }
.legal p:last-child { margin-bottom: 0; }
.legal strong { color: var(--mist); font-weight: 600; }
.legal ul { list-style: none; display: flex; flex-direction: column; gap: 14px; margin: 4px 0; }
.legal ul li { position: relative; padding-left: 26px; color: var(--muted); line-height: 1.65; }
.legal ul li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 8px; height: 8px; border-radius: 2px;
  background: var(--signal); opacity: 0.85;
}
.legal ul li strong { color: var(--mist); }
.legal a.inline { color: var(--signal); border-bottom: 1px solid rgba(184,242,78,0.35); transition: border-color 0.2s; }
.legal a.inline:hover { border-color: var(--signal); }
.legal .callout-box {
  margin-top: 22px; padding: 20px 22px;
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--panel), var(--ink-2));
  border: 1px solid var(--line);
}
.legal .callout-box .lbl { color: var(--signal); margin-bottom: 8px; }
.legal .meta-foot { margin-top: 40px; color: var(--faint); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; }

@media (max-width: 820px) {
  .nav-links a:not(.btn) { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-lead { grid-column: 1 / -1; }
}
