/* ============================================================
   Lethi landing — static stylesheet
   ============================================================ */

:root {
  /* Surfaces and text */
  --bg: #f2efeb;
  --surface: #ffffff;
  --surface-muted: #f7f5f2;
  --text: #1c1a17;
  --text-muted: #55504a;
  --border: #d8d2ca;
  --border-strong: #8e8880;
  --focus: #1b4f8a;

  /* Brand / action */
  --primary: #0f5c58;
  --primary-dark: #0a4441;
  --primary-subtle: #e3edec;

  /* Dark surfaces (hero / footer) */
  --dark: #0f2e2c;
  --dark-soft: #b9cdca;
  --dark-muted: #8fa9a6;

  /* Risk states */
  --safe: #1f6b3a;
  --safe-subtle: #e6f0e8;
  --attention: #8a5a00;
  --attention-subtle: #faf0dc;
  --danger: #a6371a;
  --danger-subtle: #fbe8e0;
  --critical: #8c1420;
  --critical-subtle: #f7e1e3;

  /* Brand tagline gradient: green -> soft yellow */
  --tagline-start: #1f6b3a;
  --tagline-end: #fde68a;

  --font-sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui,
    sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

/* ---------- Base ---------- */

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

button {
  font-family: inherit;
}

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

/* ---------- Layout ---------- */

.container {
  margin: 0 auto;
  width: 100%;
  max-width: 1152px;
  padding: 0 20px;
}

@media (min-width: 640px) {
  .container {
    padding: 0 32px;
  }
}

.container--narrow {
  max-width: 768px;
}

/* ---------- Header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(216, 210, 202, 0.7);
  background: rgba(242, 239, 235, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.header__inner {
  display: flex;
  height: 84px;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.header__logo img {
  width: 40px;
  height: 40px;
}

.header__name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.header__nav {
  display: none;
  gap: 36px;
}

@media (min-width: 768px) {
  .header__nav {
    display: flex;
  }
}

.header__nav a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.header__nav a:hover {
  color: var(--primary);
}

.header__cta {
  border-radius: 9999px;
  background: var(--primary);
  color: #fff;
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.header__cta:hover {
  background: var(--primary-dark);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 9999px;
  border: 0;
  background: none;
  font-family: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

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

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

.btn--dark {
  background: #fff;
  color: var(--primary-dark);
}

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

.btn--xl {
  padding: 18px 36px;
  font-size: 20px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  color: #fff;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(
    circle at 50% 140%,
    rgba(143, 233, 230, 0.1) 0,
    transparent 55%
  ),
  radial-gradient(circle at 85% -10%, rgba(185, 205, 202, 0.07) 0, transparent 45%);
}

.hero__dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 45%, #000 0%, transparent 72%);
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 56px;
  padding: 96px 0;
}

@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 136px 0;
  }
}

.hero__copy {
  order: 1;
}

.hero__media {
  order: 2;
  position: relative;
}

@media (max-width: 1023px) {
  .hero__copy {
    text-align: center;
  }

  .hero__sub {
    margin: 36px auto 0;
  }

  .hero__actions {
    justify-content: center;
  }
}

.hero h1 {
  font-size: 40px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

@media (min-width: 640px) {
  .hero h1 {
    font-size: 64px;
  }
}

@media (min-width: 1024px) {
  .hero h1 {
    font-size: 80px;
  }
}

.hero__lead {
  display: block;
  font-size: 0.45em;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--dark-soft);
}

.hero__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.32em;
  width: fit-content;
  margin-top: 6px;
  font-size: 1.1em;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #fde68a;
}

.hero__mark {
  width: 0.86em;
  height: 0.86em;
  flex: none;
  border-radius: 18%;
  opacity: 0;
  transform: translateY(28px);
  animation: heroLetter 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.3s;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.hero__letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  animation: heroLetter 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.3s + var(--i, 0) * 0.06s);
}

@keyframes heroLetter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__sub {
  margin-top: 36px;
  max-width: 576px;
  font-family: var(--font-mono);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--dark-soft);
}

@media (min-width: 640px) {
  .hero__sub {
    font-size: 17px;
  }
}

.hero__actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 480px) {
  .hero__grid {
    gap: 48px;
    padding: 64px 0;
  }

  .hero__sub {
    letter-spacing: 0.14em;
  }

  .hero__actions .btn,
  .cta__actions .btn {
    width: 100%;
  }
}

/* ---------- Phone mockup ---------- */

.phone {
  position: relative;
  width: 290px;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 44px;
  border: 1px solid rgba(185, 205, 202, 0.4);
  background: var(--dark);
  padding: 10px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.phone__inner {
  border-radius: 36px;
  background: var(--surface);
  padding: 20px;
}

.phone__head {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.phone__head img {
  width: 20px;
  height: 20px;
}

.phone__head-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

.phone__head-cap {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.phone__msgs {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  max-width: 85%;
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
}

.bubble--in {
  background: var(--surface-muted);
  border-top-left-radius: 4px;
}

.bubble--out {
  margin-left: auto;
  max-width: 75%;
  background: var(--primary-subtle);
  border-top-right-radius: 4px;
}

.phone__anal {
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.phone__alerts {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 12px;
}

.alert svg {
  margin-top: 2px;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.alert--danger {
  background: var(--danger-subtle);
  border-color: var(--danger-subtle);
  color: var(--danger);
}

.alert--safe {
  background: var(--safe-subtle);
  border-color: var(--safe-subtle);
  color: var(--safe);
}

.alert__title {
  font-size: 14px;
  font-weight: 600;
  color: inherit;
}

.alert__text {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Features ---------- */

.features {
  background: var(--bg);
  padding: 88px 0 120px;
}

.features__head {
  max-width: 672px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.features h2 {
  margin-top: 12px;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

@media (min-width: 640px) {
  .features h2 {
    font-size: 40px;
  }
}

.features__intro {
  margin-top: 16px;
  font-size: 19px;
  color: var(--text-muted);
}

.features__grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

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

.card {
  display: flex;
  gap: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 28px;
}

.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--primary-subtle);
}

.card__icon svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.card__title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.card__body {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.625;
  color: var(--text-muted);
}

/* ---------- Download CTA ---------- */

.cta {
  background: var(--dark);
  color: #fff;
  padding: 88px 0;
  text-align: center;
}

@media (min-width: 640px) {
  .cta {
    padding: 120px 0;
  }
}

.cta__inner {
  max-width: 672px;
  margin: 0 auto;
}

.cta h2 {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .cta h2 {
    font-size: 40px;
  }
}

.cta p {
  margin-top: 16px;
  font-size: 19px;
  color: var(--dark-muted);
}

.cta__actions {
  margin-top: 36px;
  display: flex;
  justify-content: center;
}

/* ---------- Footer ---------- */

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

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 40px 0;
  text-align: center;
}

@media (min-width: 640px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

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

.footer__brand img {
  width: 32px;
  height: 32px;
}

.footer__name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.footer__tag {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.footer__nav {
  display: flex;
  gap: 24px;
}

.footer__nav a {
  font-size: 15px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer__nav a:hover {
  color: var(--primary);
}

/* ---------- Legal pages ---------- */

.legal {
  padding: 64px 0 96px;
}

.legal__back {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.legal__back:hover {
  color: var(--primary-dark);
}

.legal__eyebrow {
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.legal h1 {
  margin-top: 12px;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

@media (min-width: 640px) {
  .legal h1 {
    font-size: 52px;
  }
}

.legal__updated {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.legal__intro {
  margin-top: 24px;
  font-size: 18px;
  line-height: 1.625;
  color: var(--text-muted);
}

.legal__sections {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.legal__section h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.legal h3 {
  margin-top: 28px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.legal__body {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 16px;
  line-height: 1.625;
  color: var(--text-muted);
}

.legal__body ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal__placeholder {
  margin-top: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--surface-muted);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- Animations ---------- */

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.5s ease forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: none;
  }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-reveal].in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .fade-up {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero__letter {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero__mark {
    animation: none;
    opacity: 1;
    transform: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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

.contact-dialog {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.contact-dialog.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.contact-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 22, 20, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.contact-dialog__panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 44px 32px 32px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(7, 22, 20, 0.35);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.25s ease;
}

.contact-dialog.is-open .contact-dialog__panel {
  transform: none;
}

.contact-dialog__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.contact-dialog__close:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.contact-dialog__close svg {
  width: 20px;
  height: 20px;
}

.contact-dialog__mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.contact-dialog__title {
  margin-top: 16px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.contact-dialog__intro {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.625;
  color: var(--text-muted);
}

.contact-dialog__email {
  margin: 24px auto 0;
  width: fit-content;
  max-width: 100%;
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--primary);
  background: var(--primary-subtle);
  border-radius: 12px;
  overflow-wrap: anywhere;
}

.contact-dialog__actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-dialog__actions .btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
}

.contact-dialog .btn.is-copied {
  background: var(--primary-dark);
}

.btn--outline {
  border: 1px solid var(--primary);
  color: var(--primary);
}

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

body.has-modal {
  overflow: hidden;
}