/* DuoOnAir website — mirrors the app: true black, neon red, faint grid. */

:root {
  --red: #ff1a14;
  --red-soft: #ff6b63;       /* Higher-contrast red for links and small text */
  --text: #f2f2f2;
  --text-dim: #a8a8a8;
  --panel: #111;
  --line: rgba(255, 255, 255, 0.08);
  --max: 760px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: #000;
  /* Faint 96px grid plus a subtle red glow from the top-right corner. */
  background-image:
    radial-gradient(circle at 100% 0%, rgba(255, 26, 20, 0.16), rgba(255, 26, 20, 0.04) 40%, transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 100% 100%, 96px 96px, 96px 96px;
  background-attachment: fixed;
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

a { color: var(--red-soft); text-underline-offset: 3px; }
a:hover { color: #fff; }
a:focus-visible { outline: 2px solid var(--red-soft); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { padding: 20px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: 0.02em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-header nav { display: flex; align-items: center; }
/* 44px-tall tap targets; the padding replaces the old margin so spacing is unchanged on desktop. */
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 9px; color: var(--text-dim); text-decoration: none; font-size: 15px; }
.site-header nav a:last-child { padding-right: 0; }
/* Phones without JavaScript: logo above, links centered below. */
@media (max-width: 560px) {
  .site-header { padding: 12px 0 4px; }
  .site-header .wrap { flex-direction: column; gap: 2px; }
  .site-header nav { justify-content: center; }
  .site-header nav a { padding: 0 14px; font-size: 16px; }
  .site-header nav a:last-child { padding-right: 14px; }
}
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--text); }

/* Hamburger menu (button added by assets/nav.js) */
.nav-toggle { display: none; }
@media (max-width: 560px) {
  .site-header.has-toggle { padding: 8px 0; }
  .site-header.has-toggle .wrap { flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 0; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-right: -10px; padding: 0;
    background: none; border: 0; border-radius: 10px; color: var(--text); cursor: pointer;
  }
  .nav-toggle:focus-visible { outline: 2px solid var(--red-soft); outline-offset: 2px; }
  .nav-toggle .bars { position: relative; display: block; width: 22px; height: 16px; }
  .nav-toggle .bars i {
    position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-toggle .bars i:nth-child(1) { top: 0; }
  .nav-toggle .bars i:nth-child(2) { top: 7px; }
  .nav-toggle .bars i:nth-child(3) { top: 14px; }
  .nav-toggle[aria-expanded="true"] .bars i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .bars i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-header.has-toggle nav {
    display: none; flex-direction: column; align-items: stretch; width: 100%;
    margin-top: 8px; padding-top: 4px; border-top: 1px solid var(--line);
  }
  .site-header.has-toggle.open nav { display: flex; }
  .site-header.has-toggle nav a,
  .site-header.has-toggle nav a:last-child { padding: 0 2px; font-size: 18px; min-height: 48px; }
  .site-header.has-toggle nav a + a { border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { .nav-toggle .bars i { transition: none; } }

/* Hero */
.hero { text-align: center; padding: 48px 0 32px; }
.hero .app-icon { width: 128px; height: 128px; border-radius: 28px; box-shadow: 0 0 60px rgba(255, 26, 20, 0.35); }
.neon {
  margin: 28px 0 8px;
  font-size: clamp(64px, 16vw, 128px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--red);
  text-shadow: 0 0 8px rgba(255, 26, 20, 0.9), 0 0 32px rgba(255, 26, 20, 0.6), 0 0 80px rgba(255, 26, 20, 0.35);
  animation: glow 4s ease-in-out infinite;
}
@keyframes glow {
  0%, 100% { text-shadow: 0 0 8px rgba(255, 26, 20, 0.9), 0 0 32px rgba(255, 26, 20, 0.6), 0 0 80px rgba(255, 26, 20, 0.35); }
  50% { text-shadow: 0 0 4px rgba(255, 26, 20, 0.7), 0 0 16px rgba(255, 26, 20, 0.35), 0 0 40px rgba(255, 26, 20, 0.15); }
}
@media (prefers-reduced-motion: reduce) { .neon { animation: none; } }

.tagline { font-size: 21px; color: var(--text); margin: 16px auto 8px; max-width: 34em; }
.subtle { color: var(--text-dim); }

.app-store { display: inline-block; margin-top: 20px; line-height: 0; }
.app-store img { display: block; height: 50px; width: auto; }
.app-store:focus-visible { outline: 2px solid var(--red-soft); outline-offset: 4px; border-radius: 8px; }

/* Sections */
section { padding: 32px 0; }
h2 { font-size: 26px; margin: 0 0 16px; letter-spacing: 0.01em; }
h3 { font-size: 18px; margin: 0 0 6px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; padding: 0; margin: 0; list-style: none; }
.features li { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.features p { margin: 0; color: var(--text-dim); font-size: 15px; }

.steps { padding-left: 1.2em; }
.steps li { margin-bottom: 8px; }

.messages { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.messages li {
  padding: 6px 12px; border-radius: 8px; background: #000; border: 1px solid var(--line);
  font-weight: 800; letter-spacing: 0.04em; font-size: 14px; color: var(--red-soft);
}

/* Message tiles become buttons (via script) that drive the sign preview. */
.messages li:has(.msg-btn) { padding: 0; }
.msg-btn {
  padding: 6px 12px; border: 0; border-radius: 8px; background: none; cursor: pointer;
  font: inherit; letter-spacing: inherit; color: inherit;
}
.msg-btn:hover { color: #fff; }
.msg-btn:focus-visible { outline: 2px solid var(--red-soft); outline-offset: 2px; }
.messages li:has(.msg-btn[aria-pressed="true"]) { border-color: var(--red); box-shadow: 0 0 12px rgba(255, 26, 20, 0.45); }
.msg-btn[aria-pressed="true"] { color: #fff; }

/* A small sign, styled like the app, showing the chosen message. */
.sign-preview {
  display: flex; align-items: center; justify-content: center;
  height: 200px; margin: 16px 0 8px; padding: 0 24px;
  background-color: #000;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
}
.sign-text {
  margin: 0; text-align: center; font-weight: 900; line-height: 0.95; letter-spacing: -0.01em;
  color: var(--red);
  text-shadow: 0 0 6px rgba(255, 26, 20, 0.9), 0 0 24px rgba(255, 26, 20, 0.55);
}

.msg-group { margin: 24px 0 10px; color: var(--text-dim); font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; }

/* In use: desk photo beside a short explanation */
.in-use { display: grid; grid-template-columns: 360px 1fr; gap: 28px; align-items: center; }
.in-use .photo { margin: 0; }
.in-use .photo img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.in-use p { margin: 0 0 12px; }
@media (max-width: 700px) { .in-use { grid-template-columns: 1fr; gap: 20px; } }

/* Screenshots */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0; }
.shots figure { margin: 0; }
.shots img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: #000; }
.shots figcaption { margin-top: 8px; color: var(--text-dim); font-size: 13px; }
.shot-btn { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; cursor: zoom-in; border-radius: 14px; }
.shot-btn:focus-visible { outline: 2px solid var(--red-soft); outline-offset: 3px; }
.shot-btn:hover img { border-color: rgba(255, 255, 255, 0.25); }

/* Lightbox */
.lightbox { max-width: 96vw; max-height: 96vh; padding: 0; border: 0; background: transparent; color: var(--text); text-align: center; overflow: visible; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.88); }
.lightbox img { display: block; max-width: 94vw; max-height: 82vh; width: auto; height: auto; margin: 0 auto; border-radius: 14px; border: 1px solid var(--line); cursor: zoom-out; }
.lightbox-caption { margin: 12px 0 0; color: var(--text-dim); font-size: 14px; }
.lightbox-close { position: absolute; top: -14px; right: -6px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }
.lightbox-close:focus-visible { outline: 2px solid var(--red-soft); outline-offset: 2px; }
@media (max-width: 700px) { .shots { grid-template-columns: 1fr; } }

/* Privacy page */
.legal { padding-top: 24px; }
.legal h1 { font-size: 36px; margin: 8px 0 4px; }
.legal h2 { font-size: 21px; margin-top: 32px; }
.summary { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 10px; padding: 16px 18px; }

/* Button link */
.button {
  display: inline-block; padding: 10px 20px; border-radius: 999px;
  background: var(--red); color: #000; font-weight: 700; text-decoration: none;
}
.button:hover { background: #fff; color: #000; }
.button:focus-visible { outline: 2px solid var(--red-soft); outline-offset: 3px; }

/* Footer */
.site-footer { margin-top: 48px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--text-dim); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; margin-right: 16px; }
@media (max-width: 560px) { .site-footer .wrap { flex-direction: column; align-items: center; text-align: center; } .site-footer nav { justify-content: center; } .site-footer nav a { margin: 0 8px; } }

/* Four audience cards read best as a 2×2 grid. */
.features.audience { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 520px) { .features.audience { grid-template-columns: 1fr; } }

/* Cross-promotion card for other iPhone Duo apps */
.promo {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  margin: 24px 0 8px; padding: 28px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
}
.promo-icon { width: 96px; height: 96px; border-radius: 22px; }
.promo h2 { font-size: 24px; margin: 0 0 8px; }
.promo p { margin: 0; color: var(--text-dim); }
.promo-cta {
  display: flex; flex-direction: column; align-items: center; padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 10px;
  color: var(--text); text-decoration: none; line-height: 1.2; white-space: nowrap;
}
.promo-cta small { font-size: 11px; color: var(--text-dim); }
.promo-cta span { font-size: 17px; font-weight: 600; }
.promo-cta:hover { border-color: #fff; color: #fff; }
@media (max-width: 640px) {
  .promo { grid-template-columns: auto 1fr; padding: 20px; gap: 16px; }
  .promo-icon { width: 72px; height: 72px; border-radius: 16px; }
  .promo-cta { grid-column: 1 / -1; justify-self: start; }
}

/* Text for screen readers and crawlers only */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 404 page */
.not-found { padding: 80px 0 48px; }
.home-link { display: inline-block; margin-top: 24px; padding: 12px 22px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; }
.home-link:hover { border-color: var(--red); }
.home-link:focus-visible { outline: 2px solid var(--red-soft); outline-offset: 4px; }
