/* Monitor Glucose — monitorglucose.ca */
:root {
  --night: #0f1b2d;
  --night-2: #172740;
  --night-ink: #e8eef5;
  --night-muted: #9fb0c4;
  --day: #eef3f7;
  --paper: #ffffff;
  --ink: #16212e;
  --muted: #526273;
  --rule: #d5dee7;
  --sky: #5bc0eb;
  --sky-deep: #1f7fae;
  --green: #3dbe7a;
  --yellow: #f2c94c;
  --red: #ff4d5a;
  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, monospace;
  --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--day);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--sky-deep); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(70rem, 100% - 2rem); margin-inline: auto; }

/* ---------- top bar ---------- */
.bar { background: var(--night); color: var(--night-ink); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; white-space: nowrap; color: inherit; text-decoration: none; font-weight: 700; font-size: 1.125rem; }
.brand img { width: 2rem; height: 2rem; border-radius: 0.5rem; }
.bar nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.bar nav a { color: var(--night-muted); text-decoration: none; }
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--night-ink); }

/* ---------- hero: the night view ---------- */
.hero { background: var(--night); color: var(--night-ink); padding-block: 3.5rem 5rem; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 1.25rem; font-weight: 800; max-width: 14ch; }
.hero p { color: var(--night-muted); font-size: 1.1875rem; max-width: 32rem; margin: 0 0 2rem; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn { display: inline-block; padding: 0.8rem 1.3rem; border-radius: 0.6rem; font-weight: 700; text-decoration: none; border: 2px solid transparent; }
.btn-primary { background: var(--sky); color: var(--night); }
.btn-primary:hover { background: #7fd0f1; }
.btn-ghost { color: var(--night-ink); border-color: #34496a; }
.btn-ghost:hover { border-color: var(--night-muted); }

/* The night view, drawn the way the app shows it in a dark bedroom. */
.nightview {
  background: #060c16;
  border-radius: 1.75rem;
  padding: 2.25rem 2rem 1.75rem;
  border: 1px solid #22344f;
  box-shadow: 0 30px 80px -30px #000;
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  text-align: center;
}
.nightview .clock { font-family: var(--mono); color: #6f819a; font-size: 1.1rem; letter-spacing: 0.04em; }
.nightview .reading { display: flex; align-items: center; gap: 0.6rem; color: var(--green); }
.nightview .value { font-family: var(--font); font-variant-numeric: tabular-nums; font-weight: 800; font-size: clamp(5.5rem, 13vw, 9rem); line-height: 1; letter-spacing: -0.04em; }
.nightview .arrow { width: clamp(2.6rem, 6vw, 4rem); height: auto; }
.nightview .unit { color: #6f819a; font-size: 0.95rem; }
.nightview .age { margin-top: 0.75rem; display: flex; gap: 1.25rem; color: #8ea1b8; font-size: 1rem; }
.nightview .age span::before { content: ""; display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--sky); margin-right: 0.45rem; vertical-align: 0.08em; }
.zones { display: flex; gap: 0.35rem; margin-top: 1.4rem; width: 100%; max-width: 18rem; }
.zones i { flex: 1; height: 0.4rem; border-radius: 1rem; background: var(--yellow); opacity: 0.35; }
.zones i:nth-child(1), .zones i:nth-child(5) { background: var(--red); }
.zones i:nth-child(3) { background: var(--green); opacity: 1; }

/* ---------- day sections ---------- */
main section { padding-block: 4rem; }
main section + section { border-top: 1px solid var(--rule); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.2; margin: 0 0 1rem; font-weight: 800; letter-spacing: -0.005em; }
h3 { font-size: 1.15rem; margin: 0 0 0.35rem; }
.lede { color: var(--muted); max-width: var(--measure); margin: 0 0 2.5rem; font-size: 1.125rem; }
.prose { max-width: var(--measure); }
.prose p, .prose li { color: var(--ink); }
.prose h2 { margin-top: 2.5rem; font-size: 1.45rem; }
.prose h2:first-child { margin-top: 0; }

/* Features: the zone colour marks what kind of help each one gives. */
.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 3rem; }
.features li { padding-left: 1.25rem; border-left: 4px solid var(--sky); }
.features li.g { border-color: var(--green); }
.features li.y { border-color: var(--yellow); }
.features li.r { border-color: var(--red); }
.features p { margin: 0; color: var(--muted); }

.needs { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.needs ul { margin: 0; padding-left: 1.2rem; }
.needs li { margin-bottom: 0.6rem; }

.stores { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.store { background: var(--paper); border: 1px solid var(--rule); border-radius: 0.8rem; padding: 1rem 1.25rem; min-width: 14rem; }
.store strong { display: block; font-size: 1.05rem; }
.store span { color: var(--muted); font-size: 0.95rem; }

.plus { background: var(--paper); border-radius: 1.25rem; padding: 2rem; border: 1px solid var(--rule); max-width: 46rem; }
.plus p:last-child { margin-bottom: 0; }

/* Medical notice: stated plainly, never hidden in small print. */
.plus + .notice { margin-top: 2rem; }
.notice { background: #fff8e1; border-left: 5px solid var(--yellow); padding: 1.1rem 1.25rem; border-radius: 0 0.6rem 0.6rem 0; max-width: 46rem; }
.notice p { margin: 0; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--rule); padding-block: 1rem; max-width: 46rem; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--sky-deep); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > *:not(summary) { margin: 0.75rem 0 0; color: var(--ink); }
.faq dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1rem; }
.faq dt { font-weight: 700; color: var(--red); }
.faq dd { margin: 0; }

.contact { background: var(--night); color: var(--night-ink); border-radius: 1.25rem; padding: 2rem; max-width: 46rem; }
.contact p { color: var(--night-muted); margin: 0 0 1rem; }
.contact a.mail { color: var(--sky); font-size: 1.3rem; font-weight: 700; word-break: break-all; }

/* Page title band for inner pages */
.pagehead { background: var(--night); color: var(--night-ink); padding-block: 2.5rem 3rem; }
.pagehead h1 { margin: 0 0 0.5rem; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.1; }
.pagehead p { margin: 0; color: var(--night-muted); }

/* ---------- footer ---------- */
footer { background: var(--night); color: var(--night-muted); padding-block: 2.5rem; font-size: 0.95rem; }
footer .wrap { display: grid; gap: 1rem; }
footer nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
footer a { color: var(--night-ink); }
footer p { margin: 0; max-width: 46rem; }

@media (max-width: 800px) {
  .hero { padding-block: 2rem 3.5rem; }
  .hero .wrap, .needs, .features { grid-template-columns: 1fr; }
  .hero .wrap { gap: 2.5rem; }
  .nightview { padding: 1.75rem 1.25rem 1.5rem; }
  main section { padding-block: 3rem; }
  .bar nav { gap: 0.9rem; font-size: 0.95rem; }
  .needs { gap: 0.5rem; }
  .needs .lede { margin-bottom: 1rem; }
}
@media (max-width: 560px) {
  .bar nav a[href="./"] { display: none; }
}
@media (max-width: 340px) {
  .brand span { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .nightview .reading { animation: settle 1.2s ease-out both; }
  @keyframes settle { from { opacity: 0; transform: translateY(6px); } }
}

/* ---------- products page ---------- */
.story { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: start; }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.pillars li { background: var(--paper); border: 1px solid var(--rule); border-radius: 1rem; padding: 1.25rem 1.4rem; }
.pillars p { margin: 0; color: var(--muted); }

.product-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 3rem; align-items: start; }
.product .prose ul { padding-left: 1.2rem; }
.product .prose li { margin-bottom: 0.5rem; }
.status { display: inline-block; margin: 0 0 0.75rem; padding: 0.25rem 0.75rem; border-radius: 2rem; font-size: 0.92rem; font-weight: 700; }
.status.soon { background: #dcf1fa; color: #135e82; }
.status.build { background: #e4f5ea; color: #1d6b40; }
.status.later { background: #fdf2cf; color: #7a5a00; }

/* Screenshots sit on the night background they were made for. */
.shots { display: flex; gap: 1rem; justify-content: center; background: var(--night); border-radius: 1.5rem; padding: 1.5rem; }
.shots img { width: calc((100% - 2rem) / 3); max-width: 13rem; border-radius: 1.1rem; box-shadow: 0 18px 40px -20px #000; }
.shots[data-set="plus"] img { width: calc((100% - 1rem) / 2); }
.webshot { margin-top: 2rem; border-radius: 1rem; border: 8px solid var(--night); box-shadow: 0 30px 60px -35px #0f1b2d; }

.servercard { margin: 0; background: var(--night); color: var(--night-ink); border-radius: 1.5rem; padding: 2rem; }
.servercard ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.servercard li { padding: 1rem 0 1rem 1.75rem; position: relative; font-weight: 700; }
.servercard li + li { border-top: 1px dashed #34496a; }
.servercard em { font-style: normal; font-weight: 400; color: var(--night-muted); }
.servercard .dot { position: absolute; left: 0; top: 1.3rem; width: 0.7rem; height: 0.7rem; border-radius: 50%; }
.dot.g { background: var(--green); } .dot.b { background: var(--sky); } .dot.y { background: var(--yellow); }

@media (max-width: 800px) {
  .story, .product-grid { grid-template-columns: 1fr; gap: 2rem; }
  .shots { padding: 1rem; gap: 0.6rem; }
  .shots img { width: calc((100% - 1.2rem) / 3); }
  .shots[data-set="plus"] img { width: calc((100% - 0.6rem) / 2); }
}

/* ---------- one app on every screen ---------- */
.devices-band { background: var(--night); color: var(--night-ink); padding-block: 3.5rem 4rem; overflow: hidden; }
.devices-band h2 { color: var(--night-ink); }
.devices-band .lede { color: var(--night-muted); }
.devices { display: flex; align-items: flex-end; justify-content: center; gap: clamp(0.75rem, 2.2vw, 2rem); margin-top: 2rem; }
.devices figure { margin: 0; display: grid; justify-items: center; gap: 0.75rem; }
.devices figcaption { color: var(--night-ink); font-family: "Dancing Script", cursive; font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1; letter-spacing: 0.01em; }
.dev-screen { display: block; width: 100%; height: auto; }

.laptop { width: min(46%, 34rem); }
.laptop .lid { background: #1f2a3a; border-radius: 0.9rem 0.9rem 0 0; padding: 3.2% 3.2% 3.6%; border: 1px solid #33445e; border-bottom: 0; }
.laptop .lid img { border-radius: 0.2rem; }
.laptop .base { width: 112%; margin-left: -6%; height: 0.9rem; background: linear-gradient(#3a4a62, #222e40); border-radius: 0 0 1rem 1rem; position: relative; }
.laptop .base::before { content: ""; position: absolute; left: 42%; right: 42%; top: 0; height: 0.3rem; background: #18212f; border-radius: 0 0 0.4rem 0.4rem; }
.laptop .wrapper { width: 100%; }

.tablet { width: min(19%, 13.5rem); }
.tablet .body { background: #1b2433; border: 1px solid #33445e; border-radius: 1.4rem; padding: 6%; }
.tablet .body img { border-radius: 0.5rem; }

.iphone { width: min(12%, 9rem); }
.iphone .body { background: #10161f; border: 2px solid #3d4b60; border-radius: 1.6rem; padding: 5%; position: relative; }
.iphone .body img { border-radius: 1.15rem; }
.iphone .body::after { content: ""; position: absolute; top: 4.6%; left: 50%; width: 30%; height: 3.2%; transform: translateX(-50%); background: #000; border-radius: 1rem; }

.android { width: min(11%, 8.2rem); }
.android .body { background: #151b24; border: 2px solid #2f3a4b; border-radius: 1.1rem; padding: 4.5%; position: relative; }
.android .body img { border-radius: 0.75rem; }
.android .body::after { content: ""; position: absolute; top: 4%; left: 50%; width: 6%; aspect-ratio: 1; transform: translateX(-50%); background: #000; border-radius: 50%; }

@media (max-width: 800px) {
  .devices { flex-wrap: wrap; align-items: flex-end; }
  .laptop { width: 100%; order: -1; }
  .tablet { width: 38%; }
  .iphone { width: 25%; }
  .android { width: 23%; }
}

.ways { list-style: none; padding: 0 !important; display: grid; gap: 0.9rem; margin: 0.5rem 0 1.75rem; }
.ways li { background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--sky); border-radius: 0.6rem; padding: 0.85rem 1rem; margin: 0 !important; }
.product .prose h3 { margin-top: 1.5rem; }

.prose .status + h2 { margin-top: 0; }
.servercard { position: sticky; top: 1.5rem; }

/* ---------- ecosystem diagrams ---------- */
.ecosystem { background: var(--night); color: var(--night-ink); }
.ecosystem h2 { color: var(--night-ink); }
.ecosystem .lede { color: var(--night-muted); max-width: 46rem; }
main section.ecosystem + section { border-top: 0; }
.legend { display: flex; gap: 1.5rem; margin: -1rem 0 1.5rem; color: var(--night-muted); font-size: 0.95rem; }
.legend span::before { content: ""; display: inline-block; width: 1.6rem; height: 4px; border-radius: 2px; margin-right: 0.5rem; vertical-align: middle; }
.legend .k-mg::before { background: var(--sky); }
.legend .k-ns::before { background: #b39ddb; }
.scenario { margin: 0 0 3rem; background: #0c1626; border: 1px solid #22344f; border-radius: 1.5rem; padding: 1.5rem; display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.scenario:last-child { margin-bottom: 0; }
.scenario svg { width: 100%; height: auto; display: block; }
.scenario figcaption h3 { font-size: 1.3rem; line-height: 1.25; margin: 0 0 0.6rem; color: var(--night-ink); }
.scenario figcaption p { margin: 0; color: var(--night-muted); }
@media (max-width: 900px) {
  .scenario { grid-template-columns: 1fr; gap: 1rem; padding: 0.6rem 0.4rem 1.2rem; border-radius: 1rem; }
  .scenario figcaption { padding-inline: 0.6rem; }
}

.ecosystem { border-top: 0 !important; }

.siteversion { font-size: 0.85rem; color: #6f819a; }
