/* OneWay: Deficit — site theme (matches AppTheme.swift day palette) */

:root {
  --bg-top: #0d6a75;
  --bg-mid: #3f7285;
  --bg-bottom: #03445f;
  --card: rgba(18, 52, 66, 0.92);
  --card-border: rgba(255, 255, 255, 0.1);
  --mint: #b8d8be;
  --steel: #4a7c94;
  --text: rgba(255, 255, 255, 0.94);
  --text-muted: rgba(255, 255, 255, 0.78);
  --text-soft: rgba(255, 255, 255, 0.62);
  --deficit-green: #34a866;
  --logged-mint: #b8d8be;
  --burned-blue: #6aafc8;
  --smart-orange: #ff6b35;
  --smart-red: #e63845;
  --smart-purple: #9b5ce6;
  --smart-glow: rgba(230, 89, 51, 0.45);
  --max-width: 44rem;
  --site-width: 68rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 42%, var(--bg-bottom) 100%);
  background-attachment: fixed;
}

a {
  color: var(--mint);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: #d4ead8;
}

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

/* Layout */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(3, 68, 95, 0.72);
  border-bottom: 1px solid var(--card-border);
}

.site-header__inner,
.site-footer__inner,
.page-wrap,
.hero__inner {
  width: min(100% - 2rem, var(--site-width));
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: #fff;
}

.brand__logo {
  display: block;
  height: 2rem;
  width: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
}

/* Hero */

.hero {
  padding: 3.5rem 0 2.5rem;
}

.hero__inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero__inner {
    grid-template-columns: 1.15fr 0.85fr;
    padding-top: 1rem;
  }
}

.hero__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero__subtitle {
  margin: 1rem 0 0;
  max-width: 34ch;
  font-size: 1.15rem;
  color: var(--text-muted);
}

.hero__publisher {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  color: var(--text-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--mint);
  color: #0a3340;
}

.btn--primary:hover {
  background: #d4ead8;
  color: #082830;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.btn--smart {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(135deg, var(--smart-orange) 0%, var(--smart-red) 48%, var(--smart-purple) 100%);
  color: #fff;
  cursor: default;
  pointer-events: none;
  padding: 0.7rem 1.4rem;
  animation: smart-pulse 1.4s ease-in-out infinite;
}

.btn--smart::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 18%,
    rgba(255, 255, 255, 0.42) 50%,
    transparent 82%
  );
  transform: translateX(-120%);
  animation: smart-shine 2.5s linear infinite;
  pointer-events: none;
}

.btn__content {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  line-height: 1.15;
  text-align: center;
}

.btn--smart .btn__badge {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.92;
  font-weight: 700;
}

@keyframes smart-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 3px 10px rgba(230, 56, 69, 0.35);
  }

  50% {
    transform: scale(1.02);
    box-shadow: 0 6px 18px var(--smart-glow);
  }
}

@keyframes smart-shine {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(120%);
  }
}

.btn--disabled,
.btn--disabled:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text-soft);
  cursor: default;
  pointer-events: none;
}

.btn__badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Equation card */

.equation-card {
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.equation-card__label {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.equation-card__formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin: 0;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.95em;
}

.pill--burned {
  background: rgba(106, 175, 200, 0.22);
  color: var(--burned-blue);
}

.pill--logged {
  background: rgba(184, 216, 190, 0.18);
  color: var(--logged-mint);
}

.pill--deficit {
  background: rgba(52, 168, 102, 0.22);
  color: #7fd9a4;
}

.equation-card__body {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* Sections */

.section {
  padding: 2.25rem 0;
}

.section__inner {
  width: min(100% - 2rem, var(--site-width));
  margin-inline: auto;
}

.section__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  letter-spacing: -0.02em;
}

.section__lead {
  margin: 0 0 1.5rem;
  max-width: 52ch;
  color: var(--text-muted);
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  padding: 1.25rem 1.35rem;
  border-radius: 1rem;
  background: var(--card);
  border: 1px solid var(--card-border);
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

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

.card p + p {
  margin-top: 0.65rem;
}

.list-check {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-check li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.65rem;
  color: var(--text-muted);
}

.list-check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--mint);
  font-weight: 700;
}

.disclaimer {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  font-size: 0.92rem;
}

.disclaimer-inline {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.card--contact {
  max-width: 36rem;
}

.card--contact .section__title {
  margin-bottom: 0.75rem;
}

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

.contact-email {
  font-size: 1.15rem;
  font-weight: 600;
}

.card--contact .btn {
  margin-top: 0.5rem;
}

.card strong,
.content-card strong,
.list-check strong {
  color: var(--text);
}

/* Inner pages */

.section--page-head {
  padding-top: 2.5rem;
  padding-bottom: 0.25rem;
}

.section__title--page {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-bottom: 0.5rem;
}

.content-card {
  padding: 1.5rem 1.35rem;
  border-radius: 1rem;
  background: var(--card);
  border: 1px solid var(--card-border);
}

.content-card h2 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.05rem;
  color: var(--text);
}

.content-card p,
.content-card li {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.content-card p + p {
  margin-top: 0.65rem;
}

.content-card ul {
  margin: 0;
  padding-left: 1.2rem;
}

.content-card ul li + li {
  margin-top: 0.5rem;
}

.page-meta {
  margin: 0 0 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-soft);
  font-size: 0.95rem;
}

.page-meta strong {
  color: var(--text-muted);
}

/* Footer */

.site-footer {
  margin-top: 1rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--card-border);
  background: rgba(1, 26, 38, 0.35);
}

.site-footer__inner {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .site-footer__inner {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
}

.site-footer__company {
  margin: 0;
  font-weight: 650;
}

.site-footer__tagline {
  margin: 0.35rem 0 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.95rem;
}

.site-footer__links a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: #fff;
}

.site-footer__fine {
  grid-column: 1 / -1;
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--text-soft);
}
