/* IA Apps — brand site. One stylesheet for every page. */

:root {
  --green-900: #063d24;
  --green-700: #0b6b3e;
  --green-600: #0e7a47;
  --green-100: #e3f2e8;
  --lime: #8cc63f;
  --lime-soft: #eef7e1;

  --bg: #f6f8f5;
  --surface: #ffffff;
  --surface-alt: #eef2ec;
  --text: #0f1a14;
  --text-muted: #55625a;
  --border: #dde5df;
  --accent: var(--green-600);
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgba(15, 26, 20, 0.06), 0 8px 24px rgba(15, 26, 20, 0.06);
  --shadow-lg: 0 2px 6px rgba(15, 26, 20, 0.08), 0 20px 48px rgba(15, 26, 20, 0.12);

  --radius: 20px;
  --radius-sm: 12px;
  --max: 1120px;
  --gutter: 20px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', sans-serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b120e;
    --surface: #121c16;
    --surface-alt: #18241d;
    --text: #e8efe9;
    --text-muted: #9aa89f;
    --border: #233229;
    --accent: #3fbf7a;
    --accent-ink: #062414;
    --green-100: #12301f;
    --lime-soft: #1c2a12;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.5), 0 20px 48px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #0b120e;
  --surface: #121c16;
  --surface-alt: #18241d;
  --text: #e8efe9;
  --text-muted: #9aa89f;
  --border: #233229;
  --accent: #3fbf7a;
  --accent-ink: #062414;
  --green-100: #12301f;
  --lime-soft: #1c2a12;
  color-scheme: dark;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
  border-radius: 8px;
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus {
  left: 8px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--green-600), var(--green-900));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: inset 0 -3px 0 var(--lime);
}

.nav {
  display: flex;
  gap: 4px;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 999px;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-alt);
}

@media (max-width: 640px) {
  .nav a.optional {
    display: none;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  cursor: pointer;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow);
}

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

.btn-play {
  background: var(--text);
  color: var(--bg);
  min-height: 44px;
  padding: 0 16px 0 14px;
  font-size: 14px;
}

.btn-play svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-play small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  opacity: 0.75;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-play span {
  display: block;
  line-height: 1.15;
  text-align: left;
}

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

.hero {
  padding: 72px 0 56px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -120px 0 auto 0;
  height: 520px;
  background: radial-gradient(
      60% 60% at 80% 20%,
      color-mix(in srgb, var(--lime) 22%, transparent),
      transparent 70%
    ),
    radial-gradient(
      50% 50% at 10% 0%,
      color-mix(in srgb, var(--green-600) 16%, transparent),
      transparent 70%
    );
  pointer-events: none;
  z-index: -1;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--green-100);
  padding: 6px 12px;
  border-radius: 999px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

.hero h1 {
  font-size: clamp(36px, 5.4vw, 60px);
  font-weight: 800;
  margin: 18px 0 18px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent), var(--lime));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-muted);
  max-width: 34em;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
}

.facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.facts li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
}

/* Icon cluster */
.cluster {
  position: relative;
  aspect-ratio: 1;
  max-width: 420px;
  width: 100%;
  margin-left: auto;
}

.cluster img {
  position: absolute;
  width: 30%;
  border-radius: 22%;
  box-shadow: var(--shadow-lg);
  animation: float 7s ease-in-out infinite;
}

.cluster img:nth-child(1) { left: 35%; top: 34%; width: 34%; animation-delay: 0s; }
.cluster img:nth-child(2) { left: 4%; top: 10%; animation-delay: -1s; }
.cluster img:nth-child(3) { left: 66%; top: 4%; width: 26%; animation-delay: -2s; }
.cluster img:nth-child(4) { left: 72%; top: 46%; width: 24%; animation-delay: -3s; }
.cluster img:nth-child(5) { left: 8%; top: 56%; width: 26%; animation-delay: -4s; }
.cluster img:nth-child(6) { left: 40%; top: 74%; width: 22%; animation-delay: -5s; }
.cluster img:nth-child(7) { left: 36%; top: 0%; width: 20%; animation-delay: -6s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 860px) {
  .hero {
    padding-top: 40px;
  }
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .cluster {
    max-width: 320px;
    margin: 0 auto;
  }
}

/* --- Sections --------------------------------------------------------------- */

section {
  padding: 64px 0;
}

.section-head {
  max-width: 40em;
  margin-bottom: 32px;
}

.section-head h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 800;
  margin: 12px 0 10px;
}

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

/* Featured app */
.featured {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: start;
  background: linear-gradient(160deg, var(--surface), var(--surface-alt));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.featured > *,
.app-top > div {
  min-width: 0;
}

.featured p,
.app p,
.ticks li {
  overflow-wrap: anywhere;
}

.featured img {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.featured h3 {
  font-size: 28px;
  font-weight: 800;
}

.featured .tag {
  margin-left: 8px;
  vertical-align: middle;
}

.featured p {
  color: var(--text-muted);
  margin: 8px 0 16px;
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
}

.ticks li {
  position: relative;
  padding-left: 30px;
  font-weight: 600;
  font-size: 15px;
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--green-100)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%230e7a47' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 16px no-repeat;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.card-actions a.link {
  font-weight: 600;
  font-size: 15px;
}

@media (max-width: 720px) {
  .featured {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .featured img {
    width: 88px;
    height: 88px;
    border-radius: 22px;
  }
  .ticks {
    grid-template-columns: 1fr;
  }
}

/* App grid */
.apps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

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

@media (max-width: 600px) {
  .apps {
    grid-template-columns: 1fr;
  }
}

.app {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.app-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  flex: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.app h3 {
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-alt);
  border-radius: 999px;
  padding: 3px 9px;
  margin-top: 4px;
}

.app p {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0;
  flex: 1;
}

.app .btn-play {
  align-self: flex-start;
}

/* Principles */
.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

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

@media (max-width: 560px) {
  .principles {
    grid-template-columns: 1fr;
  }
}

.principle {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.principle .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--lime-soft);
  color: var(--accent);
  margin-bottom: 14px;
}

.principle .icon svg {
  width: 22px;
  height: 22px;
}

.principle h3 {
  font-size: 18px;
  font-weight: 750;
  margin-bottom: 6px;
}

.principle p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* Contact band */
.band {
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: #fff;
  border-radius: calc(var(--radius) + 8px);
  padding: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
}

.band::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 198, 63, 0.45), transparent 70%);
}

.band h2 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  margin-bottom: 6px;
}

.band p {
  margin: 0;
  opacity: 0.85;
}

.band .btn {
  background: #fff;
  color: var(--green-900);
  position: relative;
  z-index: 1;
}

@media (max-width: 600px) {
  .band {
    padding: 32px 24px;
  }
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 40px;
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

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

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

/* --- Plain document pages (account deletion, 404) ---------------------------- */

.doc {
  max-width: 760px;
  padding: 48px var(--gutter) 24px;
  margin: 0 auto;
}

.doc h1 {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
  margin: 14px 0 16px;
}

.doc h2 {
  font-size: 22px;
  font-weight: 750;
  margin: 36px 0 10px;
}

.doc p,
.doc li {
  color: var(--text-muted);
}

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

.doc ol,
.doc ul {
  padding-left: 1.3em;
}

.doc li {
  margin: 6px 0;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 20px 0;
}

.callout p {
  margin: 0;
}

.path {
  font-weight: 700;
  color: var(--text);
}
