:root {
  --ink: #10253f;
  --paper: #f7f2e8;
  --muted: #5e6b78;
  --teal: #2f7f8f;
  --coral: #f05d4f;
  --lime: #b7c64b;
  --line: #d9ded8;
  --white: #fffdf8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

a { color: inherit; }

.nav {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px clamp(18px, 5vw, 64px);
  background: rgba(247, 242, 232, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  font-weight: 850;
  text-decoration: none;
  letter-spacing: 0;
}

.brand span { color: var(--teal); }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.nav-links a {
  color: #34465a;
  font-size: 15px;
  text-decoration: none;
}

.hero {
  min-height: 82vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 6vw, 76px);
  align-items: center;
  padding: clamp(48px, 8vw, 100px) clamp(18px, 5vw, 64px);
  overflow: hidden;
}

.eyebrow {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 14px;
  text-transform: uppercase;
}

h1, h2, h3 { letter-spacing: 0; }

h1 {
  max-width: 760px;
  margin: 0 0 22px;
  font-size: clamp(54px, 9vw, 104px);
  line-height: 0.92;
}

h1 em, h2 em { color: var(--coral); font-style: normal; }

.lead {
  max-width: 690px;
  margin: 0 0 30px;
  color: #34465a;
  font-size: clamp(19px, 2vw, 25px);
}

.primary-button, .light-button, .app-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 13px 18px;
  font-weight: 760;
  text-decoration: none;
}

.primary-button {
  background: var(--ink);
  color: white;
}

/* Ny hero-visuell komponent */
.hero-visual {
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-card-grid {
  width: 100%;
  max-width: 460px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(16, 37, 63, 0.12);
}

.hero-app-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-app-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(16, 37, 63, 0.08);
}

.hero-app-tile img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 3px 8px rgba(16, 37, 63, 0.12);
}

.tile-icon-mathsnake {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #8b5cf6;
  color: white;
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 3px 8px rgba(16, 37, 63, 0.12);
}

.hero-app-tile strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.2;
}

.hero-app-tile span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 2px;
}

section {
  padding: clamp(56px, 8vw, 96px) clamp(18px, 5vw, 64px);
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 1120px;
  margin: 0 auto 30px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 34px;
}

.section-heading h2, .promise h2, .contact-banner h2 {
  margin: 0;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1;
}

.section-heading p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
}

.app-grid {
  max-width: 1120px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.app-card {
  min-height: 292px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 42px rgba(16, 37, 63, 0.08);
}

.app-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(16, 37, 63, 0.12);
}

.app-icon-mathsnake {
  background: #8b5cf6;
  color: white;
  font-size: 26px;
}

.app-tag {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  margin: 22px 0 8px;
  text-transform: uppercase;
}

.app-card h3 {
  margin: 0 0 10px;
  font-size: 28px;
}

.app-card p { color: var(--muted); }

.app-card a {
  margin-top: 24px;
  border: 1px solid var(--ink);
}

.store-note {
  max-width: 1120px;
  margin: 20px auto 0;
  color: var(--muted);
}

.promise {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  background: var(--ink);
  color: white;
}

.promise p { color: #d8e5ec; }
.promise-copy { max-width: 560px; }
.promise-copy a { color: white; font-weight: 760; }

.contact-banner {
  background: var(--teal);
  color: white;
}

.light-button {
  margin-top: 22px;
  background: white;
  color: var(--ink);
}

.simple-page {
  min-height: 100vh;
}

.simple-header {
  padding: 24px clamp(18px, 5vw, 64px);
}

.back { color: #34465a; text-decoration: none; }

.page-content {
  max-width: 860px;
  padding: clamp(34px, 7vw, 84px) clamp(18px, 5vw, 64px) 96px;
}

.page-content h1 {
  font-size: clamp(46px, 8vw, 86px);
}

.intro {
  color: #34465a;
  font-size: 22px;
}

.content-block {
  padding: 34px 0 0;
  border-top: 0;
}

.content-block h2 {
  font-size: 28px;
}

.content-block p, .content-block li { color: var(--muted); }
.contact-email { color: var(--teal); font-weight: 800; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 34px clamp(18px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: #667687;
}

footer div {
  display: flex;
  gap: 14px;
}

footer a { text-decoration: none; }

@media (max-width: 820px) {
  .hero, .section-heading, .promise { grid-template-columns: 1fr; display: grid; }
  .hero-visual { min-height: auto; margin-top: 24px; }
  .hero-card-grid { grid-template-columns: 1fr 1fr; }
  .app-grid { grid-template-columns: 1fr; }
  .nav { align-items: flex-start; }
}

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