/* ============================================================
   Relay — Landing Page Styles
   EN: Relay — Landing Page Styles
   ============================================================ */

/* ── Custom properties ───────────────────────────────────── */
:root {
  --navy:    #0F1B2D;
  --blue:    #2563EB;
  --orange:  #E0531F;
  --light:   #F2F6FC;
  --white:   #FFFFFF;
  --text:    #1A2840;
  --muted:   #5A6A80;
  --border:  #D1DAEA;

  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --radius: 8px;
  --max-w:  760px;
  --section-pad: clamp(3.5rem, 8vw, 6rem);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Utility ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ── NAV ─────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: rgba(15, 27, 45, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding-inline: 1.25rem;
  max-width: 1100px;
  margin-inline: auto;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.nav__logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
}
/* ── Nav right cluster ───────────────────────────────────── */
.nav__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ── Language switcher ───────────────────────────────────── */
.lang-switcher {
  position: relative;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px;
  color: rgba(255,255,255,0.75);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.lang-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }
.lang-btn svg { flex-shrink: 0; opacity: 0.6; }

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--navy);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  list-style: none;
  padding: 0.35rem;
  min-width: 140px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  /* two-column grid for the long list */
  display: none;
  grid-template-columns: 1fr 1fr;
}
.lang-dropdown.open {
  display: grid;
}
.lang-dropdown li { display: contents; }
.lang-option {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: rgba(255,255,255,0.62);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  padding: 0.45rem 0.65rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
  white-space: nowrap;
}
.lang-option:hover  { background: rgba(255,255,255,0.08); color: #fff; }
.lang-option.active { color: #fff; font-weight: 600; }

/* ── Nav CTA ─────────────────────────────────────────────── */
.nav__cta {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--white);
  background: var(--orange);
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  transition: background 0.18s;
}
/* hide CTA on very small screens to save space */
@media (max-width: 400px) { .nav__cta { display: none; } }
.nav__cta:hover { background: #c44516; }

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  background: var(--navy);
  padding-top: calc(56px + clamp(3.5rem, 9vw, 5.5rem));
  padding-bottom: var(--section-pad);
  position: relative;
  overflow: hidden;
}
.hero__bg-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.18;
}
.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
}
.hero__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.18;
  color: var(--white);
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: normal;
  color: var(--orange);
}
.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: rgba(255,255,255,0.72);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.hero__form-wrap {
  max-width: 520px;
  margin-inline: auto;
}

/* ── FORM (shared) ───────────────────────────────────────── */
.signup-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.signup-form__row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.signup-form input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.07);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
}
.signup-form input[type="email"]::placeholder { color: rgba(255,255,255,0.38); }
.signup-form input[type="email"]:focus {
  border-color: var(--blue);
  background: rgba(255,255,255,0.12);
}
.signup-form input[type="email"].error { border-color: var(--orange); }

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0.75rem 1.5rem;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
}
.btn-cta:hover { background: #c44516; }
.btn-cta:active { transform: scale(0.97); }
.btn-cta:disabled { opacity: 0.55; cursor: not-allowed; }

.signup-form textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.78);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  resize: vertical;
  min-height: 72px;
  outline: none;
  transition: border-color 0.18s;
}
.signup-form textarea::placeholder { color: rgba(255,255,255,0.3); }
.signup-form textarea:focus { border-color: var(--blue); }

.form-gdpr {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.42);
  line-height: 1.5;
  text-align: left;
}
.form-gdpr a { text-decoration: underline; color: rgba(255,255,255,0.55); }
.form-gdpr a:hover { color: var(--white); }

.form-success {
  display: none;
  text-align: center;
  padding: 1.25rem 1.5rem;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 1rem;
  line-height: 1.55;
}
.form-success strong { display: block; margin-bottom: 0.3rem; font-size: 1.05rem; }

.field-error {
  font-size: 0.75rem;
  color: #ff8a6a;
  margin-top: -0.25rem;
  display: none;
}
.field-error.visible { display: block; }

/* ── SECTION SHARED ──────────────────────────────────────── */
section { padding-block: var(--section-pad); }
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.85rem;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  line-height: 1.22;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.section-body {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 560px;
}

/* ── PROBLEM SECTION ─────────────────────────────────────── */
.problem { background: var(--light); }
.problem__intro { margin-bottom: 2.75rem; }
.problem__grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .problem__grid { grid-template-columns: repeat(3, 1fr); }
}
.problem-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.375rem;
  position: relative;
  overflow: hidden;
}
.problem-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--orange);
  border-radius: 12px 12px 0 0;
}
.problem-card__icon {
  font-size: 1.5rem;
  margin-bottom: 0.875rem;
  line-height: 1;
}
.problem-card__title {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}
.problem-card__body {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── FOR WHOM SECTION ────────────────────────────────────── */
.forwhom { background: var(--white); }
.forwhom__intro { margin-bottom: 2.5rem; }
.persona-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 640px) {
  .persona-list { flex-direction: row; gap: 1.5rem; }
}
.persona-item {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--light);
}
.persona-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.persona-info strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.2rem;
}
.persona-info span {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ── SECOND CTA ──────────────────────────────────────────── */
.cta2 {
  background: var(--navy);
  position: relative;
  overflow: hidden;
}
.cta2__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.12;
}
.cta2__content {
  position: relative;
  z-index: 1;
  text-align: center;
}
.cta2 .section-label { color: rgba(255,255,255,0.5); }
.cta2 .section-title { color: var(--white); max-width: 560px; margin-inline: auto; margin-bottom: 0.75rem; }
.cta2 .section-body { color: rgba(255,255,255,0.6); margin-inline: auto; margin-bottom: 2rem; }
.cta2 .signup-form { max-width: 480px; margin-inline: auto; }

/* Second form light variant overrides */
.cta2 .signup-form input[type="email"] {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
}

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
  background: #0a1220;
  padding-block: 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}
@media (min-width: 540px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
.footer__brand {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
}
.footer__brand span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  vertical-align: middle;
  margin-right: 0.3rem;
  margin-bottom: 1px;
}
.footer__links {
  display: flex;
  gap: 1.25rem;
}
.footer__links a {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.38);
  transition: color 0.16s;
}
.footer__links a:hover { color: rgba(255,255,255,0.72); }

/* ── SCROLL REVEAL animation (subtle) ───────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Responsive fine-tuning ──────────────────────────────── */
@media (max-width: 480px) {
  .signup-form__row { flex-direction: column; }
  .signup-form__row .btn-cta { width: 100%; }
  .signup-form input[type="email"] { flex-basis: 100%; }
}
