/* Kiddy Calc — shared styles.
   Palette mirrors the app's Theme.swift exactly. */

:root {
  --ink: #4d3359;
  --ink-soft: #6b5178;
  --ink-outline: #613d62;

  --sky-top: #82c7fa;
  --sky-mid: #bae3ff;
  --sky-bottom: #fff2db;

  --cream: #fffcf7;
  --cream-2: #f7f2ec;
  --lip: #d1c7de;

  --coral: #f08c7d;
  --tangerine: #fa994f;
  --ocean: #599ef0;
  --bubblegum: #f278b3;
  --leaf: #54c270;
  --grape: #b375eb;
  --marigold: #f2b833;
  --mint: #45c4a6;

  --night-top: #171c47;
  --night-mid: #29265c;

  --radius: 26px;
  --radius-lg: 40px;
  --shadow: 0 10px 30px rgba(77, 51, 89, 0.13);
  --shadow-lg: 0 24px 60px rgba(77, 51, 89, 0.20);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui,
          -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: #7a56c9; text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(255, 252, 247, 0.82);
  border-bottom: 1px solid rgba(77, 51, 89, 0.07);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 66px;
}
.topbar .mark {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 1.06rem;
  color: var(--ink);
  white-space: nowrap;
  flex: 0 0 auto;
}
.topbar .mark img {
  width: 34px; height: 34px;
  border-radius: 9px;
  box-shadow: 0 2px 7px rgba(77, 51, 89, 0.22);
}
.topbar nav {
  margin-left: auto;
  display: flex;
  gap: 22px;
  font-weight: 700;
  font-size: 0.94rem;
  white-space: nowrap;
}
.topbar nav a { color: var(--ink-soft); }

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

.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 86px 0 96px;
  background: linear-gradient(180deg,
    var(--sky-top) 0%, var(--sky-mid) 52%, var(--sky-bottom) 100%);
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 120px;
  background:
    radial-gradient(120% 100% at 50% 100%, #8ed17f 0%, #8ed17f 46%, transparent 47%);
  opacity: 0.55;
}
.hero .cloud {
  position: absolute;
  background: #fff;
  border-radius: 999px;
  opacity: 0.9;
  pointer-events: none;
}
.hero .cloud::before,
.hero .cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
}
.c1 { width: 150px; height: 40px; top: 78px; left: 6%; }
.c1::before { width: 62px; height: 62px; top: -28px; left: 22px; }
.c1::after  { width: 46px; height: 46px; top: -18px; left: 74px; }
.c2 { width: 108px; height: 30px; top: 168px; right: 9%; opacity: 0.75; }
.c2::before { width: 46px; height: 46px; top: -20px; left: 16px; }
.c2::after  { width: 34px; height: 34px; top: -12px; left: 54px; }

.hero-inner { position: relative; z-index: 2; }

.hero .appicon {
  width: 148px; height: 148px;
  margin: 0 auto 26px;
  border-radius: 33px;
  box-shadow: 0 18px 40px rgba(48, 60, 100, 0.30);
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero .slogan {
  margin: 0 auto 30px;
  max-width: 620px;
  font-size: clamp(1.1rem, 2.7vw, 1.42rem);
  font-weight: 700;
  color: #3f2d55;
  opacity: 0.86;
}
/* App Store badge — Apple's official artwork.
   Apple's guidelines require the badge to keep its aspect ratio, sit at
   least 40px tall, and be surrounded by clear space of at least 1/4 its
   height, so the shadow and hover lift stay outside the artwork itself. */
.appstore {
  display: inline-block;
  margin-bottom: 30px;
  border-radius: 9px;
  box-shadow: 0 8px 22px rgba(30, 45, 80, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.appstore:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(30, 45, 80, 0.34);
}
.appstore:active { transform: translateY(0); }
.appstore img {
  height: 56px;
  width: auto;
  display: block;
}

.badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.pill {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: #3f2d55;
  font-weight: 800;
  font-size: 0.86rem;
  padding: 9px 16px;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(60, 80, 130, 0.12);
}

/* ---------- Sections ---------- */

section { padding: 82px 0; }
section.tint { background: var(--cream-2); }

h2 {
  font-size: clamp(1.8rem, 4.4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  text-align: center;
}
.lede {
  max-width: 660px;
  margin: 0 auto 48px;
  text-align: center;
  font-size: 1.09rem;
  color: var(--ink-soft);
}

/* ---------- Screenshots ---------- */

.shots {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  padding: 8px 4px 26px;
  scroll-snap-type: x mandatory;
}
.shot {
  flex: 0 0 auto;
  width: 246px;
  scroll-snap-align: center;
  text-align: center;
}
.shot img {
  width: 100%;
  border-radius: 30px;
  border: 7px solid #2c2340;
  box-shadow: var(--shadow-lg);
  background: #2c2340;
}
.shot span {
  display: block;
  margin-top: 16px;
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--ink-soft);
}

/* ---------- Feature cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 22px;
}
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(77, 51, 89, 0.05);
}
.card .key {
  width: 54px; height: 54px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 17px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.14);
}
.k-tangerine { background: var(--tangerine); box-shadow: 0 5px 0 #c26f2c; }
.k-ocean     { background: var(--ocean);     box-shadow: 0 5px 0 #3f70ad; }
.k-bubblegum { background: var(--bubblegum); box-shadow: 0 5px 0 #b05683; }
.k-leaf      { background: var(--leaf);      box-shadow: 0 5px 0 #3c8c51; }
.k-grape     { background: var(--grape);     box-shadow: 0 5px 0 #8154ab; }
.k-marigold  { background: var(--marigold);  box-shadow: 0 5px 0 #b08526; }
.k-mint      { background: var(--mint);      box-shadow: 0 5px 0 #328d78; }
.k-coral     { background: var(--coral);     box-shadow: 0 5px 0 #b0655a; }

.card h3 {
  margin: 0 0 8px;
  font-size: 1.17rem;
  font-weight: 800;
}
.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.99rem;
}

/* ---------- Parents strip ---------- */

.parents {
  background: linear-gradient(160deg, var(--night-top), var(--night-mid));
  color: #eef0ff;
}
.parents h2 { color: #fff; }
.parents .lede { color: #c3c6ee; }
.parents .card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}
.parents .card h3 { color: #fff; }
.parents .card p { color: #c3c6ee; }

/* ---------- Content pages ---------- */

.page { padding: 62px 0 90px; }
.page .wrap { max-width: 760px; }
.page h1 {
  font-size: clamp(2rem, 5vw, 2.7rem);
  font-weight: 900;
  margin: 0 0 6px;
}
.page .updated {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0 0 40px;
}
.page h2 {
  text-align: left;
  font-size: 1.32rem;
  margin: 40px 0 10px;
}
.page p, .page li { color: #4a3a58; }
.page ul { padding-left: 22px; }
.page li { margin-bottom: 9px; }

.callout {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(77, 51, 89, 0.05);
  margin: 30px 0;
}
.callout p:last-child { margin-bottom: 0; }
.mail {
  display: inline-block;
  background: var(--leaf);
  color: #fff !important;
  font-weight: 800;
  padding: 14px 26px;
  border-radius: 999px;
  box-shadow: 0 5px 0 #3c8c51;
  margin-top: 6px;
}
.mail:hover { text-decoration: none; filter: brightness(1.05); }

.faq { margin-top: 8px; }
.faq details {
  background: #fff;
  border-radius: 18px;
  padding: 17px 22px;
  margin-bottom: 12px;
  box-shadow: 0 3px 12px rgba(77, 51, 89, 0.07);
  border: 1px solid rgba(77, 51, 89, 0.05);
}
.faq summary {
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  float: right;
  font-weight: 900;
  color: var(--grape);
}
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 12px 0 2px; }

/* ---------- Footer ---------- */

footer {
  background: var(--ink);
  color: #d8cde3;
  padding: 46px 0;
  font-size: 0.93rem;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}
footer a { color: #f0e6f7; font-weight: 700; }
footer .links { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; }

@media (max-width: 700px) {
  section { padding: 58px 0; }
  .hero { padding: 62px 0 74px; }
  .wrap { padding: 0 18px; }
  .topbar nav { gap: 16px; font-size: 0.88rem; }
  .topbar .mark { font-size: 0.98rem; }
  footer .links { margin-left: 0; }
}

/* On the narrowest phones, the wordmark alone carries the header. */
@media (max-width: 480px) {
  .topbar .mark span.name { display: none; }
  .topbar nav { gap: 14px; font-size: 0.85rem; }
}
