/* AtomSparq — site styles (hand-edited; not touched by the build) */

@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }

:root {
  --blue: #0ea5e9;          /* logo sky blue: "Atom", ring */
  --rose: #f43f5e;          /* logo rose: "Sparq", spark */
  --link: #0369a1;
  --page-light: #f7f7f7;    /* Carrd look: #C7C7C7 under a white gradient (86% -> 14%) */
  --page-dark: #cfcfcf;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --ink: #1d1d1f;
  --muted: #5f6368;
  --line: rgba(0, 0, 0, 0.08);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px -16px rgba(0,0,0,.18);
  --radius: 20px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --link: #7dd3fc;
    --page-light: #2c2c2e;
    --page-dark: #161618;
    --surface: #242426;
    --surface-2: #2e2e31;
    --ink: #f2f2f7;
    --muted: #a1a1aa;
    --line: rgba(255, 255, 255, 0.08);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 16px 40px -18px rgba(0,0,0,.7);
  }
}

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

html {
  -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px;
  background: var(--page-dark);
}

body {
  margin: 0; min-height: 100vh;
  background: linear-gradient(115deg, var(--page-dark) 0%, var(--page-light) 55%, var(--page-light) 100%);
  color: var(--ink);
  font: 17px/1.65 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }

/* ---------- wordmark ---------- */

.wordmark { font-weight: 500; letter-spacing: -0.03em; white-space: nowrap; line-height: 1; }
.wordmark .atom { color: var(--blue); }
.wordmark .sparq { color: var(--rose); }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--page-light) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand .wordmark { font-size: 22px; }
.site-nav { display: flex; gap: 4px; }
.site-nav { gap: 20px; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--rose); }

/* ---------- hero ---------- */

.hero .wrap {
  display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: center;
  padding-top: 72px; padding-bottom: 56px;
}
.hero-mark {
  justify-self: center; width: min(280px, 60vw);
}
.hero-mark img { width: 100%; height: auto; }
.hero h1 { font-size: clamp(52px, 8vw, 84px); margin: 0 0 22px; }
.hero .tagline { font-size: 22px; font-weight: 500; color: var(--ink); margin: 0 0 8px; }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 42ch; margin: 0; }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; padding-bottom: 24px; }
  .hero-mark { width: min(140px, 40vw); justify-self: start; }
  .hero .tagline { font-size: 19px; }
  .hero .lead { font-size: 17px; }
}

/* ---------- sections ---------- */
/* Open layout: no boxed cards. Sections are separated by hairlines and space. */

.section { padding: 0 0 56px; }
.section > .wrap { border-top: 1px solid var(--line); padding-top: 48px; }
.section:last-of-type { padding-bottom: 88px; }
.section > .wrap > h2, .about h2, .product h2 { font-size: clamp(26px, 3.6vw, 36px); margin: 0 0 14px; }
.kicker { font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--rose); margin: 0 0 8px; }
.intro { color: var(--muted); font-size: 18px; max-width: 60ch; margin: 0 0 36px; }
.about p:last-child { color: var(--muted); font-size: 19px; max-width: 64ch; margin: 0; }

.principles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 40px 36px; }
.principle { grid-column: span 2; border-top: 2px solid var(--blue); padding-top: 18px; }
.principle:nth-child(4), .principle:nth-child(5) { grid-column: span 3; }
.principle svg { width: 26px; height: 26px; color: var(--blue); }
.principle h3 { font-size: 18px; margin: 12px 0 8px; }
.principle p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.65; }
@media (max-width: 900px) {
  .principles { grid-template-columns: 1fr 1fr; }
  .principle, .principle:nth-child(4), .principle:nth-child(5) { grid-column: span 1; }
  .principle:nth-child(5) { grid-column: span 2; }
}
@media (max-width: 560px) {
  .principles { grid-template-columns: 1fr; gap: 32px; }
  .principle:nth-child(5) { grid-column: span 1; }
}

.apps { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.app { display: flex; gap: 20px; text-decoration: none; color: inherit; align-items: flex-start; }
a.app:hover h3 { color: var(--link); }
.app img { width: 64px; height: 64px; border-radius: 15px; flex: none; }
.app h3 { font-size: 21px; margin: 2px 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.app p { margin: 0 0 10px; color: var(--muted); font-size: 16px; }
.app .more { font-weight: 600; color: var(--link); font-size: 15px; }
.placeholder {
  width: 64px; height: 64px; border-radius: 15px; flex: none; display: grid; place-items: center;
  border: 1.5px dashed color-mix(in srgb, var(--muted) 45%, transparent); color: var(--muted); font-size: 28px; font-weight: 400;
}
@media (max-width: 820px) { .apps { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 420px) { .app { flex-direction: column; gap: 14px; } }

.badge {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .02em; line-height: 1;
  padding: 6px 9px; border-radius: 6px; color: var(--link);
  background: color-mix(in srgb, var(--blue) 14%, transparent);
}

.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 16px; padding: 12px 20px; border-radius: 8px;
  background: var(--ink); color: var(--page-light); white-space: nowrap;
}
.btn.secondary { background: transparent; color: var(--ink); border: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent); }
.btn:hover { filter: brightness(1.15); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* Apple's official badge: unaltered artwork, at least 40px tall, clear space around it */
.store-badge { display: inline-block; line-height: 0; margin-right: 6px; }
.store-badge img { height: 50px; width: auto; }

/* ---------- page heads ---------- */

.page-head .wrap { padding-top: 56px; padding-bottom: 40px; }
.page-head h1 { font-size: clamp(38px, 6vw, 58px); margin: 0; }
.page-head p { margin: 10px 0 0; color: var(--muted); font-size: 19px; max-width: 60ch; }
@media (max-width: 820px) { .page-head .wrap { padding-top: 36px; } }

/* ---------- products ---------- */

.product-head { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.product-head img { width: 88px; height: 88px; border-radius: 20px; flex: none; }
.product-head h2 { margin: 0 0 4px; }
.product-head .sub { margin: 0; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.product-lead { font-size: 18px; max-width: 64ch; }
.ticks { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 0 0 32px; }
.phone { border-radius: 30px; padding: 6px; background: #0b1220; box-shadow: var(--shadow), inset 0 0 0 1px #2a3446; }
.phone img { border-radius: 25px; width: 100%; height: auto; aspect-ratio: 720 / 1564; }
@media (max-width: 820px) {
  .shots { grid-template-columns: repeat(4, 64vw); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .shots .phone { scroll-snap-align: start; }
}

/* ---------- contact ---------- */

.contact h2 { font-size: 26px; margin: 0 0 8px; }
.contact p { color: var(--muted); margin: 0 0 12px; }
.email { font-size: 22px; font-weight: 500; }
.email a { overflow-wrap: anywhere; }
.contact .btn { margin-top: 8px; }

/* ---------- document page ---------- */

.doc-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; padding-top: 40px; padding-bottom: 88px; border-top: 1px solid var(--line); }
.toc { position: sticky; top: 88px; align-self: start; font-size: 15px; }
.toc summary {
  font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); list-style: none; cursor: default; margin-bottom: 10px;
}
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc li a:hover { color: var(--ink); border-left-color: var(--blue); }
.prose { max-width: 76ch; overflow-wrap: break-word; }
.prose a { overflow-wrap: anywhere; }
.prose h2 { font-size: 25px; margin: 44px 0 12px; }
.prose h2:first-of-type { margin-top: 36px; }
.prose .meta:first-child { margin-top: 4px; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--blue); }
.prose .meta { color: var(--muted); font-size: 15px; margin-top: 0; }
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 0; border-top: 0; }
  .toc { position: static; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; }
  .toc summary { cursor: pointer; margin: 0; display: flex; justify-content: space-between; align-items: center; }
  .toc summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); }
  .toc[open] summary::after { content: "–"; }
  .toc[open] summary { margin-bottom: 10px; }
}

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 36px 0 52px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer p { margin: 0; }
.site-footer p.legal { margin-top: 8px; font-size: 13px; line-height: 1.5; }

/* ---------- 404 ---------- */

.notfound { text-align: center; padding: 120px 20px; }
.notfound h1 { font-size: 44px; margin: 0 0 12px; }
.notfound p { color: var(--muted); margin: 0 0 28px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
