/* FinCoach marketing site — shared styles
 * Brand tokens kept in sync with the Flutter app (lib/core/theme).
 */

:root {
  --primary: #6750a4;
  --primary-dark: #3d2866;
  --primary-soft: #ede7f6;
  --primary-light: #b39ddb;
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-alt: #f3f0f7;
  --text: #1c1b1f;
  --text-secondary: #49454f;
  --text-hint: #79747e;
  --line: #e6e1e5;
  --good: #16a34a;
  --good-soft: #dcfce7;
  --bad: #dc2626;
  --bad-soft: #fee2e2;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hero: 0 20px 60px rgba(103, 80, 164, 0.18);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow {
  max-width: 720px;
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.3px;
  color: var(--text);
}
.brand:hover {
  text-decoration: none;
}
.brand__logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(103, 80, 164, 0.35);
}
.lang-switch {
  display: flex;
  gap: 4px;
  background: var(--surface-alt);
  border-radius: 999px;
  padding: 4px;
}
.lang-switch a {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.lang-switch a:hover {
  text-decoration: none;
  color: var(--text);
}
.lang-switch a.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Hero */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(180deg, var(--primary-soft) 0%, transparent 100%);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
@media (min-width: 768px) {
  .hero__grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
  }
}
.hero__title {
  font-size: 40px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1.2px;
  margin: 0 0 20px;
  color: var(--text);
}
@media (min-width: 768px) {
  .hero__title {
    font-size: 56px;
  }
}
.hero__sub {
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 32px;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero__phone {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  border-radius: 36px;
  box-shadow: var(--shadow-hero);
  overflow: hidden;
  background: #fafafa;
  aspect-ratio: 360 / 800;
  border: 10px solid #1c1b1f;
  position: relative;
}
.hero__phone img,
.hero__phone svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Notch (subtle, decorative) */
.hero__phone::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 18px;
  background: #1c1b1f;
  border-radius: 12px;
  z-index: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.btn--primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(103, 80, 164, 0.35);
}
.btn--primary:hover {
  background: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn--secondary {
  background: white;
  color: var(--text);
  border: 1.5px solid var(--line);
}
.btn--secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
.btn--disabled {
  background: var(--surface-alt);
  color: var(--text-hint);
  cursor: not-allowed;
}

/* Sections */
.section {
  padding: 80px 0;
}
.section__title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin: 0 0 12px;
  text-align: center;
}
.section__sub {
  font-size: 16px;
  color: var(--text-secondary);
  text-align: center;
  margin: 0 0 48px;
}

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 600px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}
.feature {
  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.feature__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: var(--primary);
}
.feature__title {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.2px;
}
.feature__desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Trust section */
.trust {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 48px;
  margin: 0 24px;
}
.trust__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 768px) {
  .trust__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.trust__item {
  text-align: center;
}
.trust__emoji {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  color: var(--primary);
}
.trust__emoji svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trust__title {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 8px;
}
.trust__desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 60px 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 60px 24px;
}
.cta-banner h2 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.6px;
}
.cta-banner p {
  font-size: 16px;
  opacity: 0.9;
  margin: 0 0 28px;
}
.cta-banner .btn--primary {
  background: white;
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.cta-banner .btn--primary:hover {
  background: var(--primary-soft);
}

/* Document pages (privacy, terms, data-safety) */
.doc {
  padding: 60px 0 80px;
}
.doc__meta {
  font-size: 13px;
  color: var(--text-hint);
  margin-bottom: 32px;
}
.doc h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin: 0 0 12px;
  line-height: 1.2;
}
.doc h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 40px 0 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.doc h2:first-of-type {
  border-top: none;
  padding-top: 0;
}
.doc h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 24px 0 10px;
}
.doc p,
.doc li {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
}
.doc ul,
.doc ol {
  padding-left: 24px;
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.doc th,
.doc td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.doc th {
  background: var(--surface-alt);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
}
.doc strong {
  font-weight: 700;
  color: var(--text);
}
.doc code {
  background: var(--surface-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 13px;
}

/* Translation notice (KK pages with machine translation) */
.mt-notice {
  background: var(--warn-soft);
  border: 1px solid var(--warn);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 32px;
  font-size: 14px;
  color: #8b6914;
}
.mt-notice strong {
  color: #7c2d12;
}

/* Contact */
.contact-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.contact-card h3 {
  margin-top: 0;
}
/* `.doc p` sets 15px; we need higher specificity to win on contact page. */
.doc p.contact-email,
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  margin: 8px 0 16px;
}
.doc p.contact-email a,
.contact-email a {
  font-size: inherit;
  font-weight: inherit;
}
.requisites {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}
.requisites strong {
  color: var(--text);
  font-weight: 700;
}

/* Footer */
.footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.85);
  padding: 60px 0 40px;
  margin-top: 80px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}
.footer h4,
.footer h3.footer__heading {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin: 0 0 16px;
  color: white;
}
.footer__brand {
  font-weight: 800;
  font-size: 20px;
  color: white;
  margin: 0 0 12px;
}
.footer__about {
  font-size: 13px;
  line-height: 1.7;
  opacity: 0.7;
  max-width: 360px;
}
.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer li {
  margin-bottom: 10px;
}
.footer a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}
.footer a:hover {
  color: white;
  text-decoration: none;
}
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding-top: 24px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

/* 404 */
.error-page {
  display: grid;
  place-items: center;
  min-height: 60vh;
  text-align: center;
  padding: 40px 24px;
}
.error-page h1 {
  font-size: 96px;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
