:root {
  --bg: #eef3f1;
  --bg-deep: #e2ebe7;
  --ink: #10231f;
  --ink-soft: #4a5c57;
  --accent: #0f766e;
  --accent-dark: #0b5a54;
  --line: rgba(16, 35, 31, 0.12);
  --max: 1120px;
  --font-display: "Syne", "Avenir Next", sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 8% -8%, #cfe8e2 0%, transparent 55%),
    radial-gradient(900px 480px at 100% 0%, #d9e2f0 0%, transparent 48%),
    var(--bg);
  line-height: 1.6;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem max(0.75rem, env(safe-area-inset-right, 0.75rem)) 1rem max(0.75rem, env(safe-area-inset-left, 0.75rem));
  background: rgba(238, 243, 241, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

.hero-branding {
  min-height: auto;
}

.hero-branding .hero-copy {
  max-width: var(--max);
  padding-top: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: clamp(1rem, 3vw, 2rem);
}

.app-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 0.5rem;
}

.app-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin: 0 0 1.25rem;
}

.section-purpose {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.section-purpose h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  min-height: min(100vh, 860px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.25rem, 4vw, 2.5rem);
  max-width: 640px;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
  line-height: 1;
  opacity: 0;
  animation: rise 0.8s ease forwards;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.65rem, 4.2vw, 2.55rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  opacity: 0;
  animation: rise 0.8s ease 0.12s forwards;
}

.lede {
  margin: 0 0 1.75rem;
  color: var(--ink-soft);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  max-width: 36ch;
  opacity: 0;
  animation: rise 0.8s ease 0.24s forwards;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  opacity: 0;
  animation: rise 0.8s ease 0.36s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

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

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

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.hero-visual {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  background: #1a2b28;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: settle 1.4s ease forwards;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 20, 16, 0.35), transparent 45%);
  pointer-events: none;
}

.section {
  padding: clamp(3rem, 8vw, 5.5rem) clamp(1.25rem, 4vw, 2.5rem);
  max-width: var(--max);
  margin: 0 auto;
}

.section-alt {
  max-width: none;
  background: var(--bg-deep);
  border-block: 1px solid var(--line);
}

.section-alt > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.section p,
.section li {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.section strong {
  color: var(--ink);
  font-weight: 700;
}

.steps {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.25rem;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 1.25rem 1.25rem 1.25rem 4rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 6px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1.1rem;
  top: 1.2rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
}

.feature-list,
.scope-list {
  margin: 1.25rem 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.85rem;
}

.scope-list code {
  font-size: 0.82rem;
  background: rgba(26, 20, 16, 0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  word-break: break-all;
}

.note {
  margin-top: 1.25rem;
}

.site-footer {
  padding: 2rem max(0.75rem, env(safe-area-inset-right, 0.75rem)) 2.5rem max(0.75rem, env(safe-area-inset-left, 0.75rem));
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.legal {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding-block: clamp(1.5rem, 4vw, 2.5rem) 2.5rem;
  padding-inline: max(0.75rem, env(safe-area-inset-left, 0.75rem));
  overflow: visible;
}

.legal h1 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.legal .meta {
  color: var(--ink-soft);
  margin: 0 0 1.75rem;
}

.legal h2 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.125rem;
  margin: 1.75rem 0 0.65rem;
  line-height: 1.5;
  letter-spacing: 0;
}

.legal h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  margin: 1.25rem 0 0.5rem;
  line-height: 1.5;
  color: var(--ink);
}

.legal p,
.legal li {
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

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

.legal-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.legal-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.legal-table th,
.legal-table td {
  border: 1px solid var(--line);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
  color: var(--ink-soft);
}

.legal-table th {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-weight: 700;
}

.legal-table td strong {
  color: var(--ink);
}

.legal .note-box {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.95rem;
}

.legal .back {
  margin-top: 2.5rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes settle {
  to {
    transform: scale(1);
  }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: stretch;
  }

  .hero-visual {
    min-height: 100%;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps li {
    min-height: 100%;
  }
}

@media (max-width: 560px) {
  .nav {
    font-size: 0.85rem;
  }
}
