/* TufteBye AI Mobil-PWA — base-CSS
   Tokens og base-styles delt med dashboard.tuftebyeai.com.
   Mobile-first. Ingen utility-framework. */

:root {
  /* Farger */
  --navy:        #141c2e;
  --navy-mid:    #1a2540;
  --navy-card:   #1e2d45;
  --gold:        #C4A060;
  --gold-light:  #D8BC84;
  --gold-dark:   #A08448;
  --platinum:    #C0CDD8;
  --text:        #EAE2D4;
  --text-body:   #C8C2B8;
  --text-muted:  #8A9AA8;
  --divider:     rgba(196, 160, 96, 0.25);

  /* Statusfarger */
  --green: #6cca6c;
  --amber: #e8a55a;
  --red:   #d96565;

  /* Easing */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-snappy: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  /* Spacing-skala (mobil-first) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Typografi */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Trygge soner — iPhone notch/dynamic island */
  --safe-top:    env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left:   env(safe-area-inset-left);
  --safe-right:  env(safe-area-inset-right);
}

/* ── Reset ────────────────────────────────────────────── */

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

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

body {
  background: var(--navy);
  color: var(--text-body);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.65;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(196, 160, 96, 0.06), transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(196, 160, 96, 0.04), transparent 60%);
  background-attachment: fixed;

  /* Trygg sone for notch */
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

/* ── Typografi ────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
h2 { font-size: clamp(1.35rem, 5vw, 1.7rem); }
h3 { font-size: clamp(1.1rem, 4vw, 1.3rem); }
h4 { font-size: 1rem; }

p {
  line-height: 1.75;
  margin-bottom: var(--space-4);
}
p:last-child { margin-bottom: 0; }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  a:hover { color: var(--gold-light); }
}

a:active { color: var(--gold-dark); }

strong { color: var(--text); font-weight: 500; }
em     { color: var(--gold); font-style: italic; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-3);
}

.lede {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-body);
}

.muted { color: var(--text-muted); }

/* ── Layout ──────────────────────────────────────────── */

.app {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-12);
  min-height: 100vh;
  min-height: 100dvh;
}

.divider {
  height: 1px;
  background: var(--divider);
  margin: var(--space-6) 0;
  border: none;
}

/* ── Card ────────────────────────────────────────────── */

.card {
  background: var(--navy-card);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}

.card h3 { margin-bottom: var(--space-2); }
.card p  { font-size: 0.9rem; }

/* ── Knapper ─────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  transition: transform 200ms var(--ease-snappy),
              background 200ms var(--ease-out),
              color      200ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover         { background: rgba(196, 160, 96, 0.1); }
  .btn-primary:hover { background: var(--gold-light); }
}

.btn:active {
  transform: scale(0.97);
  transition-duration: 100ms;
}

.btn:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

/* ── Tilgjengelighet ─────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Placeholder-spesifikk ───────────────────────────── */

.placeholder-hero {
  text-align: center;
  padding: var(--space-12) var(--space-4);
}
.placeholder-hero .logo-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-6);
  display: block;
  border-radius: var(--radius);
}
.placeholder-hero h1 {
  margin-bottom: var(--space-3);
}
.placeholder-hero h1 em { color: var(--gold); }
.placeholder-hero .lede {
  max-width: 360px;
  margin: 0 auto var(--space-8);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  background: rgba(108, 202, 108, 0.12);
  border: 1px solid rgba(108, 202, 108, 0.4);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.status-pill::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(108, 202, 108, 0.6);
  animation: pulse 2.4s var(--ease-out) infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   rgba(108, 202, 108, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(108, 202, 108, 0); }
  100% { box-shadow: 0 0 0 0   rgba(108, 202, 108, 0); }
}
