/* SudoZen — Calm, minimalist single-page styles */

:root {
  --bg: #f8f6f1;
  --bg-alt: #f1eee6;
  --surface: #ffffff;
  --surface-subtle: #f5f3ec;
  --text: #1c1e21;
  --text-muted: #585e66;
  --border: #e3dfd5;
  --accent: #2e6f5e;
  --accent-hover: #24594b;
  --accent-soft: #e6f1ed;
  --accent-ink: #1e4d41;
  --shadow-sm: 0 1px 2px rgba(20, 24, 22, 0.05);
  --shadow-md: 0 12px 32px rgba(24, 34, 30, 0.08);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --header-h: 68px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "New York", "Iowan Old Style", Georgia, Cambria, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121517;
    --bg-alt: #171b1e;
    --surface: #1d2226;
    --surface-subtle: #242a2f;
    --text: #edebe6;
    --text-muted: #a4acb4;
    --border: #2c3339;
    --accent: #5cb39b;
    --accent-hover: #70c3ac;
    --accent-soft: rgba(92, 179, 155, 0.14);
    --accent-ink: #8cd5c0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 16px 36px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme="dark"] {
  --bg: #121517;
  --bg-alt: #171b1e;
  --surface: #1d2226;
  --surface-subtle: #242a2f;
  --text: #edebe6;
  --text-muted: #a4acb4;
  --border: #2c3339;
  --accent: #5cb39b;
  --accent-hover: #70c3ac;
  --accent-soft: rgba(92, 179, 155, 0.14);
  --accent-ink: #8cd5c0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 16px 36px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface-subtle);
  padding: 0.12em 0.4em;
  border-radius: 5px;
  border: 1px solid var(--border);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  border-radius: 8px;
}

.container {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  display: inline-flex;
  color: var(--accent);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-text small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
  background: var(--accent-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.icon-btn:hover {
  border-color: var(--accent);
}

.nav-toggle {
  display: none;
}

.icon-sun {
  display: none;
}

:root[data-theme="dark"] .icon-sun {
  display: block;
}

:root[data-theme="dark"] .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun {
    display: block;
  }
  :root:not([data-theme="light"]) .icon-moon {
    display: none;
  }
}

/* Hero */
.hero {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 4.75rem);
}

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

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0 0 1.1rem;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
}

.lead {
  margin: 0 0 1rem;
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 56ch;
}

.lead-sub {
  margin-bottom: 1.8rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.3rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.btn:active {
  transform: translateY(1px);
}

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

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

:root[data-theme="dark"] .btn-primary {
  color: #0e1714;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary {
    color: #0e1714;
  }
}

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

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

/* Image Placeholders & Drop-in Screenshots */
.image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  text-align: center;
  padding: 2rem 1.25rem;
  background: var(--surface-subtle);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

.image-placeholder svg {
  color: var(--accent);
  opacity: 0.75;
}

.image-placeholder strong {
  color: var(--text);
  font-size: 0.98rem;
}

.image-placeholder span {
  font-size: 0.84rem;
}

.image-placeholder-hero {
  aspect-ratio: 4 / 5;
  max-width: 360px;
  margin-inline: auto;
}

.image-placeholder-phone {
  aspect-ratio: 9 / 19.5;
  width: 100%;
}

.screenshot-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.hero-screenshot {
  max-width: 380px;
  margin-inline: auto;
}

/* Sections */
.section {
  padding: clamp(3.25rem, 6vw, 5rem) 0;
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  max-width: 660px;
  margin-bottom: 2.25rem;
}

.section-header h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
}

/* Key Feature Highlights (3-Column Grid) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
}

.feature-card-wide {
  grid-column: span 2;
}

.feature-card h3 {
  margin: 0 0 0.85rem;
  font-size: 1.12rem;
  line-height: 1.3;
}

.feature-intro {
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.feature-list {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.94rem;
  color: var(--text-muted);
}

.feature-list strong {
  color: var(--text);
}

.feature-list-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1.5rem;
}

/* Screenshots Grid */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.shot-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.shot-card figcaption {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text);
}

/* Liam McMullan’s Promise (3-Column Grid) */
.promise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.promise-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
}

.promise-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.06rem;
}

.promise-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Support Section */
.support-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.5rem;
  align-items: start;
}

.support-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.support-card h3,
.faq-list h3 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
}

.support-card p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.support-meta {
  font-size: 0.88rem;
  margin-bottom: 0 !important;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.faq-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.15rem;
}

.faq-list summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.faq-list summary::after {
  content: "+";
  font-size: 1.2rem;
  line-height: 1;
  color: var(--accent);
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  margin: 0.7rem 0 0;
  font-size: 0.93rem;
  color: var(--text-muted);
}

/* Legal Sections (#privacy, #terms) */
.legal-container {
  max-width: 820px;
}

.legal-section:target .legal-header {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
}

.legal-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legal-summary {
  background: var(--accent-soft);
  color: var(--text);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
}

.legal-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(1.4rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-sm);
}

.legal-body h3 {
  margin: 1.6rem 0 0.5rem;
  font-size: 1.05rem;
  color: var(--text);
}

.legal-body h3:first-child {
  margin-top: 0;
}

.legal-body p,
.legal-body li {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.legal-body ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0 1rem;
}

.legal-body li + li {
  margin-top: 0.45rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.footer-callout h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text);
}

.footer-callout p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-muted);
  max-width: 72ch;
}

.footer-brand strong {
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

.footer-brand p {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-about {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .features-grid,
  .promise-grid,
  .screenshots-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card-wide {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    display: none;
    box-shadow: var(--shadow-md);
  }

  .site-nav.is-open {
    display: flex;
  }

  .features-grid,
  .promise-grid,
  .screenshots-grid,
  .feature-list-2col {
    grid-template-columns: 1fr;
  }

  .feature-card-wide {
    grid-column: span 1;
  }
}

@media print {
  .site-header,
  .hero-visual,
  .hero-cta,
  #screenshots,
  .support-actions {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .legal-body {
    border: none;
    box-shadow: none;
    padding: 0;
  }
}
