:root {
  color-scheme: light dark;
  --paper: #f5f6f1;
  --ink: #17251f;
  --muted: #5e6862;
  --line: rgba(23, 37, 31, 0.16);
  --panel: rgba(255, 255, 255, 0.68);
  --brand: #285632;
  --mint: #aee7cc;
  --dearmaps: #7257ff;
  --halftri: #00b8b5;
  --shadow: 0 30px 80px rgba(23, 37, 31, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% 5%, rgba(174, 231, 204, 0.42), transparent 30rem),
    radial-gradient(circle at 92% 28%, rgba(114, 87, 255, 0.09), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 20; }
.skip-link:focus { left: 8px; padding: 10px 14px; background: var(--ink); color: var(--paper); border-radius: 8px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(18px) saturate(130%);
}
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { width: auto; height: 32px; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-size: 0.92rem; font-weight: 650; text-decoration: none; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--ink); }

.hero { padding: clamp(72px, 12vw, 148px) 0 84px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: clamp(40px, 7vw, 96px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; color: var(--brand); font-size: .82rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow::before { width: 34px; height: 1px; background: currentColor; content: ""; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.035em; line-height: 1; }
h1 { max-width: 760px; font-size: clamp(2.7rem, 5.6vw, 5.1rem); letter-spacing: -.03em; line-height: 1.04; }
.h1-accent { display: block; margin-top: .12em; color: var(--brand); font-style: italic; }
h2 { font-size: clamp(2.5rem, 5vw, 4.6rem); }
h3 { font-size: 1.4rem; letter-spacing: -.025em; }
.hero-copy > p { max-width: 650px; margin: 28px 0 0; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.35rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; border: 1px solid var(--ink); border-radius: 999px; font-weight: 750; text-decoration: none; }
.button.primary { background: var(--ink); color: var(--paper); }
.button.secondary { border-color: var(--line); background: var(--panel); }
.button:hover { transform: translateY(-2px); }
.hero-mark { position: relative; min-height: 480px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 44px 44px 120px 44px; background: #18231f; box-shadow: var(--shadow); }
.hero-mark::before { position: absolute; inset: 12%; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; content: ""; }
.hero-mark::after { position: absolute; width: 240px; height: 240px; right: -80px; bottom: -60px; border-radius: 50%; background: var(--mint); filter: blur(2px); opacity: .85; content: ""; }
.hero-mark img { position: relative; z-index: 1; width: 58%; filter: brightness(0) invert(1) drop-shadow(0 26px 50px rgba(0,0,0,.28)); }

@media (prefers-color-scheme: dark) {
  .brand img { filter: brightness(0) invert(1); }
}

.apps { padding: 82px 0 120px; }
.section-head { display: flex; justify-content: space-between; gap: 28px; align-items: end; margin-bottom: 34px; }
.section-head p { max-width: 480px; margin: 0; color: var(--muted); }
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.app-card { position: relative; min-height: 620px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 38px; color: white; box-shadow: var(--shadow); text-decoration: none; }
.app-card.dearmaps { background: linear-gradient(145deg, #170f32, #5739ca 62%, #8c75ff); }
.app-card.halftri { background: linear-gradient(145deg, #031620, #075264 62%, #00a9a6); }
.card-copy { position: relative; z-index: 2; padding: clamp(28px, 5vw, 50px); }
.app-title { display: flex; align-items: center; gap: 16px; }
.app-title img { width: 68px; height: 68px; border-radius: 18px; box-shadow: 0 12px 30px rgba(0,0,0,.22); }
.app-title h3 { font-size: 1.8rem; }
.card-copy p { max-width: 460px; margin: 22px 0 0; color: rgba(255,255,255,.78); font-size: 1.08rem; }
.card-link { display: inline-flex; gap: 8px; align-items: center; margin-top: 28px; font-weight: 750; }
.screen-stack { position: relative; flex: 1; min-height: 360px; margin-top: 8px; }
.screen { position: absolute; top: 34px; width: min(44%, 250px); border-radius: 28px; box-shadow: 0 30px 55px rgba(0,0,0,.32); }
.screen.one { left: 8%; transform: rotate(-6deg); }
.screen.two { right: 6%; top: 58px; transform: rotate(6deg); }
.app-card:hover .screen.one { transform: rotate(-4deg) translateY(-6px); }
.app-card:hover .screen.two { transform: rotate(4deg) translateY(-6px); }
.screen, .button { transition: transform .25s ease; }

.principles { padding: 90px 0 120px; border-top: 1px solid var(--line); }
.principle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 42px; }
.principle { padding: 26px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease; }
.principle:hover, .principle:focus-within { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-3px); }
.principle:hover p, .principle:focus-within p { color: color-mix(in srgb, var(--paper) 78%, transparent); }
.principle p { margin: 10px 0 0; color: var(--muted); }

.site-footer { padding: 34px 0 44px; border-top: 1px solid var(--line); }
.footer-row { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted); font-size: .9rem; text-decoration: none; }

.product-hero { padding: 74px 0 60px; }
.product-hero-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(42px, 8vw, 110px); align-items: center; }
.product-icon { width: 92px; height: 92px; margin-bottom: 26px; border-radius: 24px; box-shadow: 0 18px 45px rgba(0,0,0,.18); }
.product-hero h1 { font-size: clamp(3.6rem, 8vw, 7rem); }
.product-hero p { max-width: 590px; margin: 25px 0 0; color: var(--muted); font-size: 1.2rem; }
.status-pill { display: inline-flex; padding: 8px 14px; margin-top: 26px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .9rem; font-weight: 750; }
.phone-stage { min-height: 620px; position: relative; overflow: hidden; border-radius: 44px; background: linear-gradient(145deg, #170f32, #7257ff); }
.phone-stage img { position: absolute; width: 44%; bottom: -35px; border-radius: 26px; box-shadow: 0 30px 70px rgba(0,0,0,.38); }
.phone-stage img:nth-child(1) { left: 5%; transform: rotate(-7deg); }
.phone-stage img:nth-child(2) { right: 5%; transform: rotate(7deg); }
.feature-section { padding: 100px 0; }
.feature-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.feature { padding: 30px; border: 1px solid var(--line); border-radius: 26px; background: var(--panel); }
.feature span { display: block; margin-bottom: 28px; color: var(--dearmaps); font-weight: 850; }
.feature p { color: var(--muted); margin: 10px 0 0; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 110px; }
.gallery img { width: 100%; border-radius: 28px; box-shadow: var(--shadow); }

.doc-page { background: var(--paper); }
.doc-hero { padding: 72px 0 44px; border-bottom: 1px solid var(--line); }
.doc-hero h1 { font-size: clamp(3.2rem, 7vw, 5.6rem); }
.doc-hero p { margin: 18px 0 0; color: var(--muted); }
.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 70px; padding: 58px 0 110px; }
.doc-aside { position: sticky; top: 110px; align-self: start; }
.doc-aside a { display: block; padding: 7px 0; color: var(--muted); font-size: .9rem; text-decoration: none; }
.doc-content h2 { margin-top: 44px; font-family: inherit; font-size: 1.5rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; }
.doc-content h2:first-child { margin-top: 0; }
.doc-content h3 { margin-top: 28px; }
.doc-content p, .doc-content li { color: var(--muted); }
.doc-content a { color: var(--brand); font-weight: 700; }
.doc-content .notice { padding: 18px 20px; border-left: 3px solid var(--brand); background: var(--panel); }
.support-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 34px; }
.support-card { padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); }
.support-card p { margin-bottom: 0; }

@media (max-width: 850px) {
  .hero-grid, .app-grid, .principle-grid, .product-hero-grid { grid-template-columns: 1fr; }
  .hero-mark { min-height: 340px; }
  .section-head { display: block; }
  .section-head p { margin-top: 18px; }
  .principle-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-list, .gallery { grid-template-columns: 1fr; }
  .gallery { width: min(430px, 100%); margin-inline: auto; }
  .doc-layout { grid-template-columns: 1fr; gap: 24px; }
  .doc-aside { position: static; display: none; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 24px, 1180px); }
  .nav { min-height: 66px; }
  .nav-links a:not(:last-child) { display: none; }
  .hero { padding-top: 58px; }
  .hero-mark { border-radius: 30px 30px 80px 30px; }
  .app-card { min-height: 550px; border-radius: 28px; }
  .screen { width: 50%; top: 24px; }
  .screen.two { top: 44px; }
  .screen.one { left: 1%; }
  .screen.two { right: 0; }
  .principle-grid { grid-template-columns: 1fr; }
  .footer-row { display: block; }
  .footer-links { margin-top: 18px; }
  .phone-stage { min-height: 480px; }
  .support-grid { grid-template-columns: 1fr; }
}

.journals { padding: 90px 0 30px; border-top: 1px solid var(--line); }
.journal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.journal-card {
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.journal-card:hover, .journal-card:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  background: color-mix(in srgb, var(--paper) 88%, var(--brand) 12%);
}
.journal-card h3 { font-size: 1.4rem; letter-spacing: -.02em; }
.journal-card p { max-width: 46ch; margin: 14px 0 20px; color: var(--muted); }
.journal-card .card-link { margin-top: 0; color: var(--brand); font-weight: 750; }
@media (max-width: 780px) {
  .journal-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101612;
    --ink: #eff4ef;
    --muted: #a8b1ab;
    --line: rgba(239, 244, 239, .15);
    --panel: rgba(255,255,255,.04);
    --brand: #aee7cc;
    --shadow: 0 30px 90px rgba(0,0,0,.34);
  }
  body { background: radial-gradient(circle at 8% 5%, rgba(40,86,50,.35), transparent 30rem), var(--paper); }
}
