/* Persea corporate site — hand-written, dependency-free CSS.
   Palette mirrors app/globals.css so the marketing site and the product
   dashboard feel like the same brand. */

:root {
  --brand-black: #263238;
  --brand-d-grey: #4d4d4d;
  --brand-grey: #717171;
  --brand-l-grey: #89939e;
  --brand-grey-blue: #abbed1;
  --brand-silver: #f5f7fa;
  --brand-white: #ffffff;

  --brand-primary: #28cb8b;
  --brand-info: #2194f3;

  --shade-1: #43a046;
  --shade-2: #388e3b;
  --shade-3: #237d31;
  --shade-4: #1b5e1f;
  --shade-5: #103e13;

  --tint-1: #66bb69;
  --tint-2: #81c784;
  --tint-3: #a5d6a7;
  --tint-4: #c8e6c9;
  --tint-5: #e8f5e9;

  --warning: #fbc02d;
  --error: #e53835;

  --bg: var(--brand-white);
  --bg-alt: var(--brand-silver);
  --bg-inverse: var(--brand-black);
  --text: var(--brand-black);
  --text-muted: var(--brand-grey);
  --text-on-inverse: var(--brand-white);
  --border: #e3e8ee;
  --header-bg: rgba(255, 255, 255, 0.82);
  --card-bg: var(--brand-white);
  --shadow: 0 1px 2px rgba(38, 50, 56, 0.06), 0 8px 24px rgba(38, 50, 56, 0.06);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10161a;
    --bg-alt: #171f24;
    --bg-inverse: #0b0f11;
    --text: #eef2f0;
    --text-muted: #a7b3ba;
    --border: #263238;
    --header-bg: rgba(16, 22, 26, 0.82);
    --card-bg: #171f24;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--shade-2);
  background: var(--tint-5);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

@media (prefers-color-scheme: dark) {
  .eyebrow {
    background: rgba(40, 203, 139, 0.14);
    color: var(--tint-2);
  }
}

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 0;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--brand-info);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--brand-primary);
  color: #08281a;
}

.btn-primary:hover {
  background: var(--tint-1);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(40, 203, 139, 0.35);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--brand-l-grey);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  padding: 10px 14px;
}

.btn-ghost:hover {
  color: var(--shade-2);
}

.btn-lg {
  padding: 15px 30px;
  font-size: 1rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  flex-shrink: 0;
}

.brand img {
  height: 32px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 8px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lang-switch {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 700;
}

.lang-switch a {
  padding: 7px 10px;
  text-decoration: none;
  color: var(--text-muted);
}

.lang-switch a[aria-current="true"] {
  background: var(--brand-black);
  color: var(--brand-white);
}

@media (prefers-color-scheme: dark) {
  .lang-switch a[aria-current="true"] {
    background: var(--tint-2);
    color: #08281a;
  }
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span::before {
  position: absolute;
  top: -6px;
}

.nav-toggle span::after {
  position: absolute;
  top: 6px;
}

/* Hero */

.hero {
  position: relative;
  padding: 140px 0 150px;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(16, 22, 26, 0.55) 0%,
    rgba(16, 22, 26, 0.72) 100%
  );
}

.hero .container {
  max-width: 680px;
}

.hero .eyebrow {
  background: rgba(16, 22, 26, 0.45);
  color: #fff;
}

.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  color: #fff;
}

.hero-lead {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.86);
  max-width: 46ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 22px;
}

.hero .btn-outline {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.hero .btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.hero-trust {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.86);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-trust svg {
  flex-shrink: 0;
  color: var(--tint-1);
}

/* Image placeholder (swap for the real asset later) */

.img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  min-height: 260px;
  padding: 32px;
  border: 2px dashed var(--border);
  border-radius: 20px;
  background: var(--bg-alt);
  color: var(--text-muted);
}

.img-placeholder svg {
  color: var(--brand-l-grey);
  flex-shrink: 0;
}

.img-placeholder strong {
  color: var(--text);
  font-size: 0.95rem;
  max-width: 34ch;
}

.img-placeholder p {
  font-size: 0.82rem;
  font-style: italic;
  margin: 0;
  max-width: 38ch;
}

.img-frame {
  border-radius: 20px;
  overflow: hidden;
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Feature grid */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--tint-5);
  color: var(--shade-3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

@media (prefers-color-scheme: dark) {
  .feature-icon {
    background: rgba(40, 203, 139, 0.14);
    color: var(--tint-2);
  }
}

.feature-card h3 {
  font-size: 1.08rem;
}

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

/* Use cases */

.usecase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.usecase-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
}

.usecase-card h3 {
  font-size: 1rem;
  color: var(--shade-3);
}

@media (prefers-color-scheme: dark) {
  .usecase-card h3 {
    color: var(--tint-2);
  }
}

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

/* Trust section */

.trust-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.trust-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.trust-list li:last-child {
  border-bottom: none;
}

.trust-list svg {
  flex-shrink: 0;
  color: var(--brand-primary);
  margin-top: 3px;
}

.trust-list strong {
  display: block;
  margin-bottom: 2px;
}

.trust-list span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* CTA banner */

.cta-banner {
  background: linear-gradient(135deg, var(--shade-4), var(--shade-2) 60%, var(--brand-primary));
  color: var(--brand-white);
  border-radius: 24px;
  padding: 64px 48px;
  text-align: center;
  margin: 0 24px;
}

.cta-banner h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--brand-white);
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 52ch;
  margin: 0 auto 28px;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.cta-banner .btn-outline {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--brand-white);
}

.cta-banner .btn-outline:hover {
  border-color: var(--brand-white);
  background: rgba(255, 255, 255, 0.08);
}

.cta-banner .btn-primary {
  background: var(--brand-white);
  color: var(--shade-4);
}

.cta-banner .btn-primary:hover {
  background: var(--brand-white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Footer */

.site-footer {
  background: var(--bg-inverse);
  color: #c7d0d4;
  padding: 64px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--brand-white);
  margin-bottom: 12px;
}

.footer-brand img {
  height: 28px;
}

.footer-col h4 {
  color: var(--brand-white);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #c7d0d4;
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: var(--brand-white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.84rem;
  color: #8b979d;
}

.footer-bottom .lang-switch {
  border-color: rgba(255, 255, 255, 0.15);
}

.footer-bottom .lang-switch a {
  color: #c7d0d4;
}

.footer-bottom .lang-switch a[aria-current="true"] {
  background: var(--brand-primary);
  color: #08281a;
}

.placeholder-note {
  color: #8b979d;
}

/* Reveal-on-scroll */

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

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

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

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

/* Legal pages */

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

.legal-page .container {
  max-width: 780px;
}

.legal-page h1 {
  font-size: 2rem;
}

.legal-page .updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 1.2rem;
  margin-top: 2em;
}

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

.legal-page li {
  margin-bottom: 8px;
  padding-left: 4px;
}

.legal-page ul {
  list-style: disc;
  padding-left: 22px;
  margin-bottom: 1em;
}

.legal-notice {
  background: var(--tint-5);
  border: 1px solid var(--tint-3);
  color: var(--shade-4);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 0.92rem;
  margin-bottom: 32px;
}

@media (prefers-color-scheme: dark) {
  .legal-notice {
    background: rgba(40, 203, 139, 0.1);
    border-color: rgba(40, 203, 139, 0.3);
    color: var(--tint-1);
  }
}

/* Mobile nav */

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    inset: 76px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 24px;
    gap: 4px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    overflow-y: auto;
  }

  .main-nav a {
    padding: 14px 6px;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  body.nav-open .main-nav {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav-toggle {
    display: inline-flex;
  }

  body.nav-open .nav-toggle span {
    background: transparent;
  }

  body.nav-open .nav-toggle span::before {
    top: 0;
    transform: rotate(45deg);
  }

  body.nav-open .nav-toggle span::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .header-actions .btn-outline {
    display: none;
  }

  .hero {
    padding: 100px 0 96px;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .usecase-grid {
    grid-template-columns: 1fr 1fr;
  }

  .trust-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cta-banner {
    padding: 48px 28px;
    margin: 0 16px;
  }
}

@media (max-width: 560px) {
  .section {
    padding: 64px 0;
  }

  .features-grid,
  .usecase-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
