/* Garnappen – landningssida. Samma färger som appen (apps/mobile/constants/theme.ts). */

:root {
  --background: #f6efe6;
  --surface: #fffaf4;
  --surface-muted: #efe4d6;
  --border: #e2d3c1;
  --text: #3b2f2a;
  --text-muted: #7a6a5f;
  --primary: #a4553a;
  --on-primary: #ffffff;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --max-width: 960px;
  --gutter: 20px;

  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: ui-serif, 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1e1916;
    --surface: #2a2320;
    --surface-muted: #352c28;
    --border: #4a3e38;
    --text: #f3e9de;
    --text-muted: #b8a696;
    --primary: #e08a6a;
    --on-primary: #1e1916;
  }
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.5rem, 4.5vw, 2rem);
}

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Sidhuvud ---------------------------------------------------------------- */

.site-header {
  padding: 18px 0;
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.logo img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.nav a {
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

/* Hero -------------------------------------------------------------------- */

.hero {
  padding: 40px 0 56px;
  text-align: center;
}

.hero .lead {
  font-size: clamp(1.1rem, 3.5vw, 1.3rem);
  color: var(--text-muted);
  max-width: 34em;
  margin: 0 auto 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}

.badge svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Sektioner --------------------------------------------------------------- */

.section {
  padding: 56px 0;
}

.section--muted {
  background: var(--surface-muted);
}

.section-intro {
  max-width: 36em;
}

.features {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.feature h3 {
  font-size: 1.15rem;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
}

/* Skärmbilder ------------------------------------------------------------- */

.screens {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(70%, 240px);
  gap: 20px;
  margin: 32px calc(var(--gutter) * -1) 0;
  padding: 4px var(--gutter) 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 800px) {
  .screens {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 200px));
    grid-auto-columns: auto;
    justify-content: center;
    gap: 24px;
    overflow: visible;
    margin: 32px 0 0;
    padding: 0;
  }
}

.screen {
  margin: 0;
  scroll-snap-align: center;
  text-align: center;
}

.phone {
  aspect-ratio: 9 / 19.5;
  border-radius: 34px;
  border: 8px solid var(--text);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.12);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screen figcaption {
  margin-top: 12px;
  font-weight: 600;
}

/* Berättelse -------------------------------------------------------------- */

.story {
  display: grid;
  gap: 24px;
  align-items: center;
}

@media (min-width: 720px) {
  .story {
    grid-template-columns: auto 1fr;
    gap: 40px;
  }
}

.story-mark {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
}

.story-mark svg {
  width: 52px;
  height: 52px;
}

/* Kontakt ----------------------------------------------------------------- */

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  max-width: 36em;
}

.contact-card a {
  font-weight: 600;
  font-size: 1.1rem;
  word-break: break-word;
}

/* Sidfot ------------------------------------------------------------------ */

.site-footer {
  padding: 32px 0 48px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}

.site-footer p {
  margin: 0;
}

.ad-notice {
  flex-basis: 100%;
}

/* Integritetspolicy ------------------------------------------------------- */

.policy {
  max-width: 42em;
  padding-top: 16px;
  padding-bottom: 56px;
}

.policy h2 {
  font-size: 1.35rem;
  margin-top: 1.8em;
}

.policy ul {
  padding-left: 1.2em;
}

.policy li {
  margin-bottom: 0.4em;
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
