/* ============================================================
   skamgodenyheter — design system
   Naive folk-art inspired by Atle Østrem.
   Thick black outlines, flat color, no gradients, no shadows.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,600;1,9..144,700&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

/* ===== Tokens ===== */
:root {
  /* Backgrounds */
  --cream: #F5EFE0;
  --warm-white: #FAF7F0;

  /* Text */
  --ink: #1A1A1A;
  --ink-soft: #3B2A1A;
  --ink-mid: #6B4C30;
  --ink-light: #A07850;

  /* Brand accents */
  --terracotta: #C4623A;
  --sun-yellow: #F5C842;
  --gold: #E8B84B;
  --sage: #7A8C6E;
  --tongue: #E8845A;
  --fur: #C4843A;
  --fur-dark: #A06B2E;

  /* System */
  --border: 4px solid var(--ink);
  --border-thick: 6px solid var(--ink);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 28px;

  /* Type */
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'DM Sans', -apple-system, system-ui, sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
input { font: inherit; }
a { color: inherit; }

/* ===== Base ===== */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-style: italic;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-style: italic;
}

h3 {
  font-size: 1.4rem;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 38ch;
}

a.link {
  color: var(--terracotta);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a.link:hover { color: var(--ink); }

/* ===== Wordmark (used in header/footer) ===== */
.wordmark {
  font-family: Georgia, serif;
  font-weight: 700;
  font-style: italic;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark:hover { color: var(--terracotta); }
.wordmark .accent { color: var(--gold); }

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: clamp(48px, 8vw, 96px) 0;
}

/* ===== Header ===== */
.site-header {
  padding: 24px 0;
  border-bottom: var(--border);
  background: var(--cream);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header .nav {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
}

.site-header .nav a {
  text-decoration: none;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s;
}

.site-header .nav a:hover { color: var(--terracotta); }

/* ===== Hero ===== */
.hero {
  padding: clamp(40px, 6vw, 72px) 0 clamp(48px, 8vw, 96px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 {
  margin-bottom: 24px;
}

.hero h1 .accent {
  color: var(--gold);
}

.hero-logo {
  border: var(--border-thick);
  border-radius: var(--radius-lg);
  background: var(--warm-white);
  overflow: hidden;
  /* Tiny tilt for hand-made feel */
  transform: rotate(-1.2deg);
  transition: transform 0.3s ease;
}

.hero-logo:hover { transform: rotate(0); }

.hero-logo img { width: 100%; display: block; }

/* ===== Forms ===== */
.signup-form {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.signup-form input[type="email"] {
  flex: 1 1 260px;
  min-width: 0;
  padding: 16px 20px;
  font-size: 1.05rem;
  background: var(--warm-white);
  border: var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  outline: none;
  transition: transform 0.1s, border-color 0.15s;
}

.signup-form input[type="email"]:focus {
  border-color: var(--terracotta);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}

.signup-form input[type="email"]::placeholder {
  color: var(--ink-light);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 28px;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  background: var(--sun-yellow);
  color: var(--ink);
  border: var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  box-shadow: 4px 4px 0 var(--ink);
}

.btn:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.btn:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--ink);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-terracotta { background: var(--terracotta); color: var(--warm-white); }
.btn-cream { background: var(--warm-white); }

.form-hint {
  font-size: 0.85rem;
  color: var(--ink-light);
  margin-top: 12px;
}

/* Form feedback messages */
.form-status {
  margin-top: 16px;
  padding: 14px 18px;
  border: var(--border);
  border-radius: var(--radius);
  font-weight: 500;
  display: none;
}

.form-status.is-visible { display: block; }
.form-status.is-success { background: #DDEBD3; }
.form-status.is-error   { background: #F4D4C7; }

/* ===== Email preview card ===== */
.email-preview {
  background: var(--warm-white);
  border: var(--border-thick);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  /* Slight opposite tilt to hero-logo for asymmetric folk-art feel */
  transform: rotate(0.6deg);
}

.email-preview::before {
  content: "✉ Mandag morgen";
  position: absolute;
  top: -14px;
  left: 24px;
  background: var(--terracotta);
  color: var(--warm-white);
  padding: 4px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  border: var(--border);
  border-radius: 999px;
}

.email-preview .emoji {
  font-size: 2.4rem;
  margin-bottom: 8px;
}

.email-preview h3 {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.email-preview .ingress {
  font-weight: 500;
  margin-bottom: 14px;
}

.email-preview .body {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.email-preview .source {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 2px dashed var(--ink-light);
  font-size: 0.85rem;
  color: var(--ink-mid);
}

/* ===== "Slik funker det" steps ===== */
.how-it-works {
  background: var(--warm-white);
  border-top: var(--border);
  border-bottom: var(--border);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; }
}

.step {
  background: var(--cream);
  border: var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}

.step:nth-child(1) { transform: rotate(-0.6deg); }
.step:nth-child(2) { transform: rotate(0.4deg); }
.step:nth-child(3) { transform: rotate(-0.3deg); }

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--sun-yellow);
  border: var(--border);
  border-radius: 50%;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 18px;
}

.step h3 {
  font-family: var(--serif);
  font-style: italic;
  margin-bottom: 8px;
}

.step p {
  color: var(--ink-soft);
  font-size: 1rem;
}

/* ===== Section: footer CTA ===== */
.cta-band {
  text-align: center;
  background: var(--terracotta);
  color: var(--warm-white);
  border-top: var(--border);
  border-bottom: var(--border);
  padding: 64px 24px;
}

.cta-band h2 { color: var(--warm-white); }

.cta-band .btn {
  background: var(--sun-yellow);
  margin-top: 24px;
}

/* ===== Footer ===== */
.site-footer {
  padding: 40px 0;
  font-size: 0.9rem;
  color: var(--ink-mid);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.site-footer .nav {
  display: flex;
  gap: 20px;
}

.site-footer .nav a {
  color: var(--ink-mid);
  text-decoration: none;
}

.site-footer .nav a:hover {
  color: var(--terracotta);
  text-decoration: underline;
}

/* ===== Decorative dots (matching the logo's vibe) ===== */
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--ink);
  border-radius: 50%;
  vertical-align: middle;
}

/* ===== Sun decoration (CSS-only, matches the logo's sun) ===== */
.sun-deco {
  display: inline-block;
  width: 56px;
  height: 56px;
  position: relative;
  background: var(--sun-yellow);
  border: var(--border);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== Heart decoration ===== */
.heart-deco {
  display: inline-block;
  color: var(--terracotta);
  font-size: 1.4em;
}

/* ===== Confirmation / status pages ===== */
.status-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
}

.status-card {
  background: var(--warm-white);
  border: var(--border-thick);
  border-radius: var(--radius);
  padding: 48px 36px;
  max-width: 540px;
  width: 100%;
  transform: rotate(-0.5deg);
}

.status-card h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
}

.status-emoji {
  font-size: 3.5rem;
  margin-bottom: 12px;
}

/* ===== Long-form content (privacy page) ===== */
.prose {
  max-width: 680px;
  margin: 0 auto;
}

.prose h2 {
  margin-top: 2em;
  font-size: 1.6rem;
}

.prose h3 {
  margin-top: 1.6em;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 600;
  font-size: 1.1rem;
}

.prose p, .prose li {
  color: var(--ink-soft);
}

.prose ul {
  padding-left: 1.4em;
}

.prose li {
  margin-bottom: 0.5em;
}

/* ===== Utility ===== */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.center { text-align: center; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
