/* L9 — landing site
   Palette and interaction language are pulled directly from the app itself
   (see app/src/main/java/life/furrer/l9/MainActivity.kt): true black,
   dim/muted greys, white for "selected", muted green for "happening now",
   muted red for "battery low". */

:root {
  --black: #000000;
  --white: #ffffff;
  --grey-dim: #8a8a8a;
  --grey-muted: #666666;
  --grey-faint: #4d4d4d;
  --grey-divider: #262626;
  --red: #cf6679;
  --green: #89e1a7;

  --font-mono: ui-monospace, "Cascadia Code", "JetBrains Mono", "Roboto Mono",
    Menlo, Consolas, "Liberation Mono", monospace;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  --measure: 62ch;
}

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

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--white);
  color: var(--black);
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  z-index: 10;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey-muted);
  margin: 0 0 0.75rem;
}

h1,
h2,
h3 {
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1rem;
  max-width: var(--measure);
}

.lede {
  color: var(--grey-dim);
  font-size: 1.1rem;
  max-width: 46ch;
}

code,
pre {
  font-family: var(--font-mono);
}

pre {
  background: #0a0a0a;
  border: 1px solid var(--grey-divider);
  border-radius: 4px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  color: var(--grey-dim);
  max-width: var(--measure);
}

pre code {
  color: var(--white);
}

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

.site-header {
  border-bottom: 1px solid var(--grey-divider);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-block: 0.7rem;
}

.wordmark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  margin: 0;
}

.wordmark a {
  text-decoration: none;
}

.wordmark__tag {
  font-weight: 400;
  color: var(--grey-muted);
}

@media (max-width: 560px) {
  .wordmark__tag {
    display: none;
  }
}

.site-header nav ul,
.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header nav a,
.site-footer nav a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--grey-dim);
  text-decoration: none;
}

.site-header nav a:hover,
.site-footer nav a:hover {
  color: var(--white);
  text-decoration: underline;
}

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

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.8rem 1.3rem;
  border: 1px solid var(--grey-divider);
  color: var(--white);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  border-color: var(--grey-dim);
}

button.btn {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  background: none;
  cursor: pointer;
}

.btn:disabled {
  color: var(--grey-faint);
  border-color: var(--grey-divider);
  cursor: not-allowed;
  pointer-events: none;
}

.btn--primary {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.btn--primary:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--black);
}

.hero__note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--grey-faint);
}

.hero__note a {
  color: var(--grey-dim);
}

.hero__note a:hover {
  color: var(--white);
}

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

.hero {
  padding-block: clamp(3rem, 8vw, 5.5rem);
  border-bottom: 1px solid var(--grey-divider);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 860px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- phone mockup ---------- */

/* Proportions below follow the real Dumber Mini: 133 x 55 x 11mm body,
   2.8" 480x640 IPS screen — a narrow, elongated candybar shape, not a
   generic smartphone silhouette. */
.phone {
  margin: 0 auto;
  width: 228px;
  max-width: 100%;
  text-align: center;
}

.phone__caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-faint);
  margin-bottom: 0.75rem;
}

.phone__more {
  margin: 1rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.phone__more a {
  color: var(--grey-faint);
}

.phone__more a:hover {
  color: var(--white);
}

.phone__frame {
  border: 1px solid var(--grey-divider);
  border-radius: 30px;
  padding: 0.65rem;
  background: var(--black);
  box-shadow: 0 0 60px -30px rgba(137, 225, 167, 0.25);
}

.phone__camera {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grey-divider);
  margin: 0 auto 0.3rem;
}

.phone__screen {
  border: 1px solid var(--grey-divider);
  padding: 0.9rem 0.85rem 0.5rem;
  min-height: 272px;
}

.phone__status {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 0.75rem;
}

.phone__clock {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--white);
}

.phone__battery {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--grey-dim);
}

.phone__calendar {
  border-bottom: 1px solid var(--grey-divider);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.phone__event {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.3rem;
  text-align: left;
}

.phone__time {
  color: var(--grey-muted);
  white-space: nowrap;
}

.phone__title {
  color: var(--grey-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.phone__event.is-now .phone__time,
.phone__event.is-now .phone__title {
  color: var(--green);
}

.phone__list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.phone__list li {
  padding: 0.06rem 0;
  line-height: 1.2;
}

.phone__num {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  color: var(--grey-faint);
  margin-right: 0.5em;
  animation: cycle-num 8s linear infinite;
}

.phone__label {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  color: var(--grey-dim);
  animation: cycle-label 8s linear infinite;
}

.phone__list li:nth-child(1) .phone__num,
.phone__list li:nth-child(1) .phone__label {
  animation-delay: 0s;
}
.phone__list li:nth-child(2) .phone__num,
.phone__list li:nth-child(2) .phone__label {
  animation-delay: -6s;
}
.phone__list li:nth-child(3) .phone__num,
.phone__list li:nth-child(3) .phone__label {
  animation-delay: -4s;
}
.phone__list li:nth-child(4) .phone__num,
.phone__list li:nth-child(4) .phone__label {
  animation-delay: -2s;
}

/* Each row owns an unbroken quarter of the 8s loop, so exactly one row is
   always selected — the highlight hands off row to row instead of ever
   dropping to zero, matching the real app's underline-follows-selection. */
@keyframes cycle-label {
  0%,
  24.9% {
    color: var(--white);
    text-decoration: underline;
  }
  25% {
    color: var(--grey-dim);
    text-decoration: none;
  }
}

@keyframes cycle-num {
  0%,
  24.9% {
    color: var(--grey-dim);
  }
  25% {
    color: var(--grey-faint);
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone__num,
  .phone__label {
    animation: none;
  }
  .phone__list li:first-child .phone__label {
    color: var(--white);
    text-decoration: underline;
  }
  .phone__list li:first-child .phone__num {
    color: var(--grey-dim);
  }
}

.phone__icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* One continuous molded surface, flush against the screen above it — nav
   keys and T9 keys share the same flush-cell treatment (hairline dividers,
   no per-key rounding), matching the real keypad. Only the d-pad breaks
   the rectangular grid, and only the outer bottom corners round off,
   matching the frame's own top corners. */
.phone__keypad {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "menu dpad back"
    "call dpad end";
  margin: 0;
  padding: 0;
  border: 1px solid var(--grey-divider);
  border-radius: 0 0 30px 30px;
  overflow: hidden;
}

.phone__key {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--grey-faint);
  padding: 0.2rem 0;
  min-height: 1.6rem;
}

.phone__key--edge-r {
  border-right: 1px solid var(--grey-divider);
}

.phone__key--edge-b {
  border-bottom: 1px solid var(--grey-divider);
}

.phone__key--menu {
  grid-area: menu;
}

.phone__key--dpad {
  grid-area: dpad;
}

.phone__dpad-shape {
  width: 76%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 30%, #2c2c2c, #0a0a0a 72%);
  border: 1px solid var(--grey-divider);
}

.phone__dpad-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--grey-dim);
}

.phone__key--call {
  grid-area: call;
  color: var(--green);
}

.phone__key--end {
  grid-area: end;
  color: var(--red);
}

.phone__key-icon {
  width: 0.85rem;
  height: 0.85rem;
  fill: currentColor;
}

.phone__key--end .phone__key-icon {
  transform: rotate(135deg);
}

.phone__key-num {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  color: var(--grey-faint);
}

.phone__key-sub {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--grey-faint);
}

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

section {
  padding-block: clamp(3rem, 7vw, 4.5rem);
  border-bottom: 1px solid var(--grey-divider);
}

section:last-of-type {
  border-bottom: none;
}

/* ---------- features ---------- */

.feature-list {
  list-style: none;
  counter-reset: feature;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 3rem;
}

@media (max-width: 720px) {
  .feature-list {
    grid-template-columns: 1fr;
  }
}

.feature-list li {
  counter-increment: feature;
  border-top: 1px solid var(--grey-divider);
  padding: 1.4rem 0;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
}

.feature-list li::before {
  content: counter(feature);
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--grey-faint);
}

.feature-list h3,
.feature-list p {
  grid-column: 2;
}

.feature-list h3 {
  margin-bottom: 0.4rem;
}

.feature-list p {
  color: var(--grey-dim);
  margin: 0;
}

/* ---------- philosophy ---------- */

.statement {
  margin: 0 0 1.5rem;
  padding: 0;
  border: none;
}

.statement p {
  font-family: var(--font-mono);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  line-height: 1.45;
  color: var(--white);
  max-width: 40ch;
}

.philosophy p:not(.statement p) {
  color: var(--grey-dim);
}

/* ---------- get it ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 720px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.card {
  border: 1px solid var(--grey-divider);
  border-radius: 6px;
  padding: 1.6rem;
}

.card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.card p {
  color: var(--grey-dim);
}

.fine-print {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--grey-faint);
}

/* ---------- docs teaser ---------- */

.docs-teaser p {
  color: var(--grey-dim);
}

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

.site-footer {
  padding-block: 2.5rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer .fine-print {
  width: 100%;
  margin: 0;
}

/* ---------- docs page ---------- */

.docs-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.docs-page caption {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--grey-muted);
  margin-bottom: 0.6rem;
}

.docs-page th,
.docs-page td {
  text-align: left;
  padding: 0.6rem 0.8rem 0.6rem 0;
  border-bottom: 1px solid var(--grey-divider);
  vertical-align: top;
}

.docs-page th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey-muted);
  font-weight: 400;
}

.docs-page td:first-child {
  font-family: var(--font-mono);
  color: var(--white);
  white-space: nowrap;
}

.docs-page dl {
  margin: 1.5rem 0;
}

.docs-page dt {
  font-family: var(--font-mono);
  color: var(--white);
  margin-top: 1rem;
}

.docs-page dd {
  margin: 0.25rem 0 0;
  color: var(--grey-dim);
  max-width: var(--measure);
}

.docs-page details {
  border-top: 1px solid var(--grey-divider);
  padding: 1rem 0;
}

.docs-page details:last-of-type {
  border-bottom: 1px solid var(--grey-divider);
}

.docs-page summary {
  cursor: pointer;
  font-family: var(--font-mono);
  color: var(--white);
}

.docs-page summary::marker {
  color: var(--grey-faint);
}

.docs-page details p {
  color: var(--grey-dim);
  margin: 0.75rem 0 0;
}

.status-note {
  border: 1px solid var(--grey-divider);
  border-left: 2px solid var(--green);
  padding: 1rem 1.2rem;
  color: var(--grey-dim);
  max-width: var(--measure);
}

.screenshots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 720px) {
  .screenshots {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .screenshots {
    grid-template-columns: 1fr;
  }
}

.screenshots figure {
  margin: 0;
}

.screenshots img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--grey-divider);
  border-radius: 8px;
}

.screenshots figcaption {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--grey-muted);
}
