/* DwelLogs.com page styles. Colors and fonts come from tokens.css;
   no hex values here. */

* { box-sizing: border-box; }
body {
  /* svh, not vh: on iOS, 100vh is the height with the URL bar hidden, which
     makes the page taller than the screen. vh stays as a fallback. */
  margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  overflow-x: clip;
  background: var(--bg); color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, strong, .wordmark, .soon { font-family: "Space Grotesk", system-ui, sans-serif; }

/* Fixed background: one heart-monitor line that traces a house, a castle, a
   barn and an apartment block between beats. Stays put while content
   scrolls over it. "slice" crops the sides on phones so the shapes stay
   readable instead of shrinking to a squiggle. */
/* overflow: hidden matters on iOS Safari: "slice" draws the line wider than
   the screen, and Safari can count that overflow toward the scrollable page
   even though the layer is fixed, adding empty scroll past the footer. */
.vitals { position: fixed; inset: 0; z-index: 0; pointer-events: none; display: flex; align-items: flex-end; overflow: hidden; }
.vitals svg { display: block; width: 100%; height: 46vh; height: 46svh; margin-bottom: 6vh; margin-bottom: 6svh; overflow: hidden; }
.vitals path {
  /* Thicker and more opaque after testing: at 3px / .55 it read as a smudge
     on a phone, and the cards covered the shapes. */
  fill: none; stroke: var(--trace); stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; opacity: .9;
  stroke-dasharray: 4200; stroke-dashoffset: 4200; animation: trace 5s ease-out forwards;
}
.vitals circle { fill: var(--trace); }
@keyframes trace { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .vitals path { animation: none; stroke-dashoffset: 0; } }

main, footer { position: relative; z-index: 1; }
/* `flex: 1` is `flex-basis: 0`, which asks the browser to IGNORE how tall the
   content is and then grow the box back. On a page taller than the screen that
   round trip is pointless, and on iOS -- where the visible height changes as
   the address bar collapses -- it is the usual suspect behind a page that
   scrolls past its own footer into nothing. `margin-top: auto` on the footer
   pins it to the bottom of a short page without ever asking main to be a size
   it is not. Same result, one less thing that can overshoot. */
main { width: 100%; max-width: 720px; margin: 0 auto; padding: 64px 20px 40px; }
footer { margin-top: auto; }
.wordmark {
  display: flex; align-items: center; gap: 10px; margin: 0 0 48px;
  font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; color: var(--ink);
}
.wordmark img { width: 36px; height: 36px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.wordmark b { font-weight: 700; }
.wordmark span { color: var(--accent); }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 700; line-height: 1.1; margin: 0 0 20px; letter-spacing: -.025em; }
.lede { font-size: 1.15rem; color: var(--muted); margin: 0 0 40px; max-width: 34em; }
ul { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 12px; }
li {
  background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(3px);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px;
}
li strong { display: block; font-weight: 600; }
li span { color: var(--muted); font-size: .95rem; }
.soon {
  display: inline-block; border: 1px solid var(--accent); color: var(--accent); background: var(--bg);
  border-radius: 999px; padding: 6px 14px; font-size: .9rem; font-weight: 600;
}
footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 20px; }
footer p { max-width: 36em; margin: 0 auto; }
/* An address, because until now there was none anywhere a visitor could see.
   The in-app button works, but it needs you to already be inside the app and
   to find it -- somebody who reads the front page, forms a view and wants to
   say so had nowhere to put it. Phrased to invite the useful half: what is
   wrong or missing, not what is nice. */
footer .say { margin-top: .7rem; }
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* The way in. Both pages used to end in a "Coming soon" chip, which stopped
   being true the day the app went up -- and nothing on either page linked to
   it, so the only way to reach your log was a URL somebody handed you. */
.go { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 8px; }
.cta {
  display: inline-block; border-radius: 999px; padding: 10px 20px;
  font-family: "Space Grotesk", system-ui, sans-serif; font-size: 1rem; font-weight: 600;
  text-decoration: none; border: 1px solid var(--accent);
  background: var(--accent); color: var(--bg);
}
.cta.quiet { background: var(--card); color: var(--accent); }
.cta:hover { opacity: .9; }
/* Somebody coming back for their log should not have to read the pitch again. */
.wordmark .top {
  margin-left: auto; font-family: system-ui, sans-serif; font-size: .95rem;
  font-weight: 600; color: var(--accent); text-decoration: none;
}
.wordmark .top:hover { text-decoration: underline; }


/* The front page as a pitch (decided 10 Oct: "the home page is lacklustre";
   say plainly it is a web app, and get it onto the Home Screen). Wider than the
   other pages so the screens can sit beside the words. */
main.home { max-width: 1040px; }
.home h2 { font-family: "Space Grotesk", system-ui, sans-serif; font-size: clamp(1.35rem, 3.2vw, 1.8rem);
  line-height: 1.2; letter-spacing: -.015em; margin: 0 0 12px; }
.home h3 { font-family: "Space Grotesk", system-ui, sans-serif; font-size: 1.1rem; margin: 0 0 8px; }
.home section { margin: 0 0 72px; }
.home p { max-width: 36em; }
.home a { color: var(--accent); }
.home .cta { color: var(--bg); } .home .cta.quiet { color: var(--accent); }
.hero { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
.phone { margin: 0; justify-self: center; width: min(300px, 78vw); aspect-ratio: 390 / 760; overflow: hidden;
  border-radius: 34px; border: 8px solid var(--ink); background: var(--card);
  box-shadow: 0 24px 60px -24px color-mix(in srgb, var(--ink) 55%, transparent); }
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone.sm { width: min(250px, 66vw); }
.band { background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(3px);
  border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 14px; padding: 22px 24px; }
.band p { margin: 0 0 8px; color: var(--muted); } .band p:last-child { margin: 0; }
.feat { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
.feat p, .story p { color: var(--muted); }
.also { grid-template-columns: 1fr; margin-bottom: 72px; }
.install .ways { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 16px 0; }
.way { background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(3px);
  border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.way ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; }
/* Steps are plain numbered lines, not the feature cards every li gets above. */
.way li { background: none; backdrop-filter: none; border: 0; border-radius: 0; padding: 0 0 0 .2rem; }
.ico { width: 1.15em; height: 1.15em; vertical-align: -.2em; fill: none; stroke: var(--accent); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.way .ico circle { fill: var(--accent); stroke: none; }
.install .note { color: var(--muted); font-size: .95rem; }
.story { border-top: 1px solid var(--line); padding-top: 40px; }
@media (min-width: 760px) {
  .hero { grid-template-columns: 1.2fr 1fr; }
  .feat { grid-template-columns: auto 1fr; gap: 48px; }
  .feat.flip > figure { order: 2; }
  .also { grid-template-columns: 1fr 1fr; }
  .install .ways { grid-template-columns: repeat(3, 1fr); }
}
