/*
 * Elevenses landing page. Dark only, in the owner’s house style: near-black, white text, magenta.
 * No frameworks. One self-hosted font (Red Hat Display, Latin subset, SIL OFL: assets/fonts/OFL.txt).
 *
 * Contrast (WCAG AA), measured:
 *   white #ffffff on #121212 ........ 18.7:1   body text
 *   grey #929292 on #121212 / #1b1b1b  6.0 / 5.5:1   muted text
 *   magenta #e100ff on #121212 ...... 5.0:1    links, tagline, secondary buttons
 *   magenta #e100ff on #1b1b1b ...... 4.6:1    links inside cards
 *   #121212 on magenta #e100ff ...... 5.0:1    primary buttons: DARK text on magenta
 *                                               (white on #e100ff is only 3.7:1, so it is never used)
 *   #121212 on #eb4dff (hover) ...... 6.3:1
 */

@font-face {
  font-family: "Red Hat Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/red-hat-display-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Red Hat Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/red-hat-display-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #121212;
  --surface: #1b1b1b;
  --surface-2: #171717;
  --ink: #ffffff;
  --muted: #929292;
  --line: #333333;
  --accent: #e100ff; /* magenta: buttons, links, focus */
  --accent-hover: #eb4dff;
  --accent-ink: #121212; /* text on magenta */
  --accent-text: #e100ff;
  --accent-soft: #2c112f; /* magenta at about 15% on the background */
  --accent-2: #00f0ff; /* cyan, the second accent: the logo and the fairy-light dividers only.
                          13.3:1 on #121212. Never cyan on magenta or magenta on cyan (2.6:1). */
  --focus: #e100ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  --glow: 0 0 0 1px rgba(225, 0, 255, 0.35), 0 18px 70px rgba(225, 0, 255, 0.28); /* the one magenta shadow */
  --radius: 14px;
  --btn-radius: 8px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: "Red Hat Display", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--font);
  overflow-wrap: break-word;
}

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

a {
  color: var(--accent-text);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}

h1,
h2 {
  font-weight: 400;
}

h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.4rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--accent-soft);
  padding: 0.05em 0.35em;
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 10;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
}

.skip:focus {
  top: 8px;
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--btn-radius);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg);
  color: var(--accent-text);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background: var(--accent-soft);
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.icon-button {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--btn-radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
}

.icon-button:hover {
  background: var(--accent-soft);
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  padding: 4px 0;
  color: var(--ink);
  text-decoration: none;
}

/* The small lockup (mark and wordmark): sized by height, so a new logo file with another shape fits. */
.brand img {
  height: 32px;
  width: auto;
}

.footer-brand > img {
  height: 36px;
  width: auto;
  flex: none;
}

/* ------------------------------------------------------------------ fairy lights */

/* A string of cyan and magenta dots between major sections. Used twice on the page, no more. */
.fairy-lights {
  height: 14px;
  max-width: var(--wrap);
  margin: 0 auto;
  background:
    radial-gradient(circle, var(--accent-2) 0 3px, transparent 3.5px) 0 50% / 40px 14px repeat-x,
    radial-gradient(circle, var(--accent) 0 3px, transparent 3.5px) 20px 50% / 40px 14px repeat-x;
  background-origin: content-box;
  padding: 0 var(--gutter);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  opacity: 0.85;
}

.site-footer .fairy-lights {
  margin-bottom: 36px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: inline-block;
  padding: 8px 10px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.95rem;
}

.nav-list a:hover {
  background: var(--accent-soft);
  color: var(--accent-text);
}

@media (max-width: 480px) {
  .nav-list a {
    padding: 8px 7px;
  }
}

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

.hero {
  padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px);
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(225, 0, 255, 0.18), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--bg);
}

.hero-grid {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
}

.hero-text {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: var(--btn-radius);
  background: var(--bg);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(2.6rem, 1.6rem + 4.5vw, 4.4rem);
  letter-spacing: -0.03em;
}

/* The H1 reads "Free project planner Elevenses": the first part keeps the old eyebrow's look, on its own
   line, sized in rem so it doesn't take the H1's size. */
.hero h1 .h1-kicker {
  display: table;
  margin: 0 auto 16px;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.hero h1 .h1-name {
  display: block;
}

.tagline {
  margin: 10px 0 18px;
  font-size: clamp(1.3rem, 1rem + 1.3vw, 1.75rem);
  font-weight: 700;
  color: var(--accent-text);
}

.lede {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 auto 28px;
  max-width: 640px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.cta-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-shot,
.shot {
  margin: 0;
}

.hero-shot {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--glow);
  background: var(--surface);
}

/* ------------------------------------------------------------------ sections */

.section {
  padding: clamp(48px, 8vw, 96px) 0;
}

.section-tint {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-lede {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 680px;
  margin: 12px 0 32px;
}

/* ------------------------------------------------------------------ feature cards */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 800px) {
  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-width: 0;
}

.card-body {
  padding: 20px 22px 22px;
}

.card-body p {
  margin: 8px 0 0;
  color: var(--muted);
}

.card .shot {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.card .shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.card-wide {
  grid-column: 1 / -1;
}

/* Wide cards keep the whole screenshot (no crop). */
.card .shot-natural {
  aspect-ratio: auto;
  border-bottom: 0;
  background: transparent;
  padding: 0 22px 22px;
}

.card .shot-natural img {
  height: auto;
  object-fit: initial;
  border: 1px solid var(--line);
  border-radius: 10px;
}

@media (min-width: 800px) {
  .card-split {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    align-items: center;
  }

  .card-split .shot-natural {
    padding: 22px 22px 22px 0;
  }
}

/* ------------------------------------------------------------------ exports */

.steps {
  list-style: none;
  margin: 0 0 36px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 560px) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.step-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 750;
}

.export-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 900px) {
  .export-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

.export {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 12px;
  padding: 20px 22px;
}

.export p {
  margin: 8px 0 0;
  color: var(--muted);
}

.export-more {
  margin: 20px 0 36px;
  color: var(--muted);
}

.export-shots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

@media (min-width: 800px) {
  .export-shots {
    grid-template-columns: 1.2fr 1fr;
  }
}

.export-shots img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ------------------------------------------------------------------ privacy */

.privacy {
  display: grid;
  gap: 8px 48px;
}

@media (min-width: 900px) {
  .privacy {
    grid-template-columns: 1fr 1.4fr;
  }
}

.privacy-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.privacy-list li {
  position: relative;
  padding: 16px 18px 16px 52px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

/* A small lock drawn in CSS (no icon font, no image). */
.privacy-list li::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 24px;
  width: 16px;
  height: 12px;
  border-radius: 3px;
  background: var(--accent);
}

.privacy-list li::after {
  content: "";
  position: absolute;
  left: 23px;
  top: 16px;
  width: 10px;
  height: 10px;
  border: 2.5px solid var(--accent);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}

/* ------------------------------------------------------------------ FAQ */

.faq > * {
  max-width: 820px;
}

.faq h2 {
  margin-bottom: 24px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
}

.faq summary {
  position: relative;
  cursor: pointer;
  padding: 16px 56px 16px 20px;
  font-weight: 700;
  list-style: none;
  border-radius: 12px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

/* A plus that turns into a minus when open. */
.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 14px;
  height: 2px;
  margin-top: -1px;
  background: var(--accent-text);
  border-radius: 1px;
}

.faq summary::after {
  transform: rotate(90deg);
}

.faq details[open] summary::after {
  transform: none;
}

.faq summary:hover {
  color: var(--accent-text);
}

.faq details p {
  margin: 0;
  padding: 0 22px 16px;
  color: var(--muted);
}

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

.site-footer {
  padding: 28px 0 48px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  gap: 16px 48px;
  align-items: start;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 220px 1fr;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand p {
  margin: 0;
  color: var(--ink);
}

.footer-legal p {
  margin: 0 0 10px;
  max-width: 760px;
}

/* ------------------------------------------------------------------ dialog */

dialog {
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.dialog-inner {
  padding: 22px 24px 20px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.dialog-head h2 {
  font-size: 1.45rem;
  padding-top: 6px;
}

.dialog-head h2:focus {
  outline: none;
}

.dialog-head h2:focus-visible {
  outline: 3px solid var(--focus);
}

.notice {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
}

.offline-steps {
  margin: 0 0 14px;
  padding-left: 1.3em;
  display: grid;
  gap: 8px;
}

.dialog-aside {
  color: var(--muted);
  font-size: 0.95rem;
}

.dialog-foot {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .cta-row .btn {
    width: 100%;
  }

  .dialog-inner {
    padding: 18px 16px 16px;
  }
}

.footer-brand .made {
  margin-top: 4px;
  color: var(--muted);
}

/* The SHA-256 under the buttons: small, and the long hash may break anywhere (no sideways scroll). */
.hash-note {
  margin: 12px auto 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 0.85rem;
}

.hash-note code {
  overflow-wrap: anywhere;
  word-break: break-all;
  background: none;
  padding: 0;
  color: var(--ink);
}

/* Text for screen readers only, such as "(opens in a new tab)". */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* The 404 page. */
.not-found h1 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem);
  margin-bottom: 8px;
}
