/* ==========================================================================
   Gallesis marketing site — one hand-crafted stylesheet, no framework.
   Tokens mirror the product palette (apps/web/src/index.css): brand orange
   scale + ink slate scale. Mobile-first, accessible contrast, reduced-motion
   respected, focus-visible everywhere.
   ========================================================================== */

:root {
  --brand-50: #fff7ed;
  --brand-100: #ffedd5;
  --brand-200: #fed7aa;
  --brand-300: #fdba74;
  --brand-400: #fb923c;
  --brand-500: #f97316;
  --brand-600: #ea580c;
  --brand-700: #c2410c;
  --brand-800: #9a3412;
  --brand-900: #7c2d12;

  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-300: #cbd5e1;
  --ink-200: #e2e8f0;
  --ink-100: #f1f5f9;
  --ink-50: #f8fafc;

  --font-sans:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif;

  --radius: 0.75rem;
  --radius-lg: 1.25rem;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.06), 0 1px 3px rgb(15 23 42 / 0.08);
  --shadow-lg: 0 12px 40px -12px rgb(15 23 42 / 0.25);
  --maxw: 72rem;
  --header-h: 4.25rem;
}

/* --- Base ---------------------------------------------------------------- */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 750;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--brand-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--brand-200);
}

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.container-narrow {
  max-width: 46rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  background: var(--ink-900);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
}

.skip-link:focus-visible {
  top: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid transparent;
  padding: 0.65rem 1.4rem;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

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

.btn-primary {
  background: var(--brand-600);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-700);
}

.btn-ghost {
  border-color: var(--ink-300);
  color: var(--ink-800);
  background: transparent;
}

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

.btn-light {
  background: #fff;
  color: var(--brand-800);
}

.btn-light:hover {
  background: var(--brand-50);
}

.btn-lg {
  padding: 0.85rem 1.8rem;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.92rem;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: wait;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-200);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
}

.brand img {
  height: 2.1rem;
  width: auto;
}

.nav-desktop {
  display: none;
  gap: 0.25rem;
  margin-inline-start: 0.5rem;
}

.nav-desktop a {
  color: var(--ink-700);
  text-decoration: none;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
}

.nav-desktop a:hover {
  background: var(--ink-100);
  color: var(--ink-900);
}

.nav-desktop a[aria-current="page"] {
  color: var(--brand-700);
  background: var(--brand-50);
}

.header-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  display: flex;
  gap: 0.15rem;
  border: 1px solid var(--ink-200);
  border-radius: 999px;
  padding: 0.15rem;
}

.lang-switch a {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-500);
  text-decoration: none;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.lang-switch a:hover {
  color: var(--ink-900);
}

.lang-switch a.is-current {
  background: var(--ink-900);
  color: #fff;
}

.nav-cta {
  display: none;
}

/* Mobile disclosure nav (CSS-only) */
.nav-mobile {
  position: relative;
}

.nav-mobile summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--ink-200);
  color: var(--ink-800);
  cursor: pointer;
}

.nav-mobile summary::-webkit-details-marker {
  display: none;
}

.nav-mobile[open] summary {
  background: var(--ink-100);
}

.nav-mobile-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 14rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem;
}

.nav-mobile-panel a {
  text-decoration: none;
  font-weight: 600;
  color: var(--ink-800);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
}

.nav-mobile-panel a:hover {
  background: var(--ink-100);
}

.nav-mobile-panel a[aria-current="page"] {
  color: var(--brand-700);
  background: var(--brand-50);
}

.nav-mobile-panel .btn {
  margin-top: 0.5rem;
  color: #fff;
}

@media (min-width: 56rem) {
  .nav-desktop {
    display: flex;
  }

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

  .nav-mobile {
    display: none;
  }
}

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

.hero {
  background:
    radial-gradient(60rem 30rem at 85% -10%, var(--brand-100), transparent 60%),
    radial-gradient(40rem 24rem at -10% 20%, var(--ink-100), transparent 55%), #ffffff;
  padding-block: clamp(3rem, 8vw, 6rem) clamp(2.5rem, 6vw, 5rem);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  color: var(--brand-700);
  font-weight: 750;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 0.9rem;
}

.lead,
.section-lead {
  font-size: 1.13rem;
  color: var(--ink-700);
  max-width: 38em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block: 1.6rem 1rem;
}

.hero-note {
  color: var(--ink-500);
  font-size: 0.95rem;
  max-width: 34em;
}

@media (min-width: 62rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 10fr) minmax(0, 11fr);
  }
}

/* --- Browser frame / phone frame ----------------------------------------- */

.frame {
  margin: 0;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.frame-bar {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  background: var(--ink-100);
  border-bottom: 1px solid var(--ink-200);
}

.frame-bar i {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--ink-300);
}

.frame-bar i:first-child {
  background: var(--brand-400);
}

.phone-frame {
  margin: 0 auto;
  max-width: 17rem;
  border: 6px solid var(--ink-900);
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.media-caption {
  text-align: center;
  color: var(--ink-500);
  font-size: 0.92rem;
  margin-top: 1rem;
}

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

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section-flush {
  padding-block-start: 0;
}

.section-tinted {
  background: var(--ink-50);
}

.page-head {
  background: radial-gradient(50rem 22rem at 85% -30%, var(--brand-100), transparent 60%), #ffffff;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

/* --- Facts strip ---------------------------------------------------------- */

.section-facts {
  padding-block: clamp(2rem, 4vw, 3rem);
  border-block: 1px solid var(--ink-100);
}

.grid-facts {
  display: grid;
  gap: 1.5rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.fact h3 {
  font-size: 1rem;
  color: var(--brand-700);
  margin-bottom: 0.35rem;
}

.fact p {
  color: var(--ink-700);
  font-size: 0.97rem;
  margin: 0;
}

/* --- Surfaces (zigzag) ---------------------------------------------------- */

.feature-row {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.feature-copy h3 {
  font-size: 1.45rem;
}

.feature-copy p {
  color: var(--ink-700);
  max-width: 34em;
}

@media (min-width: 56rem) {
  .feature-row {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }

  .feature-row.is-reversed .feature-copy {
    order: 2;
  }

  .feature-row.is-reversed .feature-media {
    order: 1;
  }
}

.online-banner {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: grid;
  gap: 1.25rem;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  background: linear-gradient(135deg, var(--brand-50), #fff 70%);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.online-icon {
  display: inline-flex;
  padding: 0.9rem;
  border-radius: var(--radius);
  background: var(--brand-600);
  color: #fff;
}

.online-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--brand-800);
  background: var(--brand-100);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  margin-bottom: 0.6rem;
}

.online-banner p:last-child {
  margin: 0;
  color: var(--ink-700);
  max-width: 50em;
}

/* --- Modules grid ---------------------------------------------------------- */

.modules-grid {
  margin-top: 2.25rem;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.module-card {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.module-icon {
  display: inline-flex;
  padding: 0.65rem;
  border-radius: var(--radius);
  background: var(--brand-50);
  color: var(--brand-700);
  margin-bottom: 0.9rem;
}

.module-card h3 {
  margin-bottom: 0.4rem;
}

.module-card p {
  margin: 0;
  color: var(--ink-700);
  font-size: 0.97rem;
}

/* --- How it works ----------------------------------------------------------- */

.how-grid {
  display: grid;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 62rem) {
  .how-grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

.steps {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--brand-600);
  color: #fff;
  font-weight: 750;
}

.step h3 {
  margin-bottom: 0.3rem;
}

.step p {
  margin: 0;
  color: var(--ink-700);
}

/* --- Plans teaser ------------------------------------------------------------ */

.plans-grid {
  margin-top: 2.25rem;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.plan-card {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.plan-card h3 {
  color: var(--brand-700);
}

.plan-card p {
  color: var(--ink-700);
  font-size: 0.97rem;
}

.plan-card .plan-price {
  margin-top: auto;
  font-weight: 750;
  color: var(--ink-900);
}

.plans-cta {
  margin-top: 2rem;
}

/* --- FAQ --------------------------------------------------------------------- */

.faq-list {
  margin-top: 2rem;
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  background: #fff;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-weight: 650;
  padding: 1rem 3rem 1rem 1.25rem;
  position: relative;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--brand-600);
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin: 0;
  padding: 0 1.25rem 1.1rem;
  color: var(--ink-700);
}

/* --- CTA band ----------------------------------------------------------------- */

.cta-band {
  background: linear-gradient(120deg, var(--brand-600), var(--brand-500));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 6vw, 3.5rem);
  text-align: center;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  color: var(--brand-50);
  max-width: 40em;
  margin-inline: auto;
  margin-bottom: 1.6rem;
}

/* --- Pricing matrix ------------------------------------------------------------ */

.matrix-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  background: #fff;
}

.matrix {
  border-collapse: collapse;
  width: 100%;
  min-width: 56rem;
  font-size: 0.95rem;
}

.matrix thead td,
.matrix thead th {
  vertical-align: top;
  padding: 1.25rem 1rem;
  border-bottom: 2px solid var(--ink-200);
  text-align: left;
  background: var(--ink-50);
}

.matrix thead th {
  min-width: 11.5rem;
}

.matrix .plan-name {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-700);
}

.matrix .plan-tag {
  display: block;
  font-weight: 450;
  color: var(--ink-700);
  margin-block: 0.35rem 0.5rem;
  font-size: 0.88rem;
  line-height: 1.4;
}

.matrix .plan-price {
  display: block;
  font-weight: 750;
  margin-bottom: 0.75rem;
}

.matrix tbody th {
  text-align: left;
  font-weight: 550;
  color: var(--ink-800);
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--ink-100);
}

.matrix tbody td {
  text-align: center;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--ink-100);
}

.matrix .group-row th {
  background: var(--brand-50);
  color: var(--brand-800);
  font-weight: 750;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-block: 0.8rem;
  border-top: 1px solid var(--brand-100);
}

.mark-yes {
  color: var(--brand-600);
  display: inline-block;
}

.mark-no {
  color: var(--ink-300);
  font-weight: 700;
}

.pricing-notes {
  margin: 2rem 0 0;
  padding-left: 1.25rem;
  color: var(--ink-700);
  max-width: 52em;
}

.pricing-notes li {
  margin-bottom: 0.5rem;
}

/* --- Forms ------------------------------------------------------------------------ */

.lead-form {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

.form-grid {
  display: grid;
  gap: 1.1rem 1.25rem;
}

@media (min-width: 40rem) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
}

.form-grid .form-field {
  margin-bottom: 0;
}

.form-grid + .form-field {
  margin-top: 1.1rem;
}

.form-field label {
  font-weight: 650;
  font-size: 0.95rem;
}

.label-opt {
  font-weight: 450;
  color: var(--ink-500);
}

.form-field input,
.form-field textarea {
  font: inherit;
  color: var(--ink-900);
  border: 1.5px solid var(--ink-300);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  background: #fff;
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  outline: 3px solid var(--brand-300);
  outline-offset: 0;
  border-color: var(--brand-600);
}

.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-result {
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.form-result h2 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.form-result p {
  margin: 0;
}

.form-result-ok {
  background: #dcfce7;
  border: 1px solid #16a34a;
}

.form-result-err {
  background: #fee2e2;
  border: 1px solid #dc2626;
}

.contact-mailto {
  margin-top: 2rem;
}

.contact-privacy {
  color: var(--ink-500);
  font-size: 0.92rem;
}

/* --- Legal pages --------------------------------------------------------------------- */

.prelaunch-notice {
  border-left: 4px solid var(--brand-500);
  background: var(--brand-50);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.9rem 1.2rem;
  color: var(--ink-800);
  max-width: 46em;
}

.legal-body h2 {
  font-size: 1.25rem;
  margin-top: 2rem;
}

.legal-body ul {
  padding-left: 1.25rem;
  color: var(--ink-700);
}

.legal-body li {
  margin-bottom: 0.5rem;
}

.legal-note {
  color: var(--ink-500);
  font-size: 0.95rem;
  margin-top: 2rem;
}

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

.site-footer {
  background: var(--ink-900);
  color: var(--ink-300);
  margin-top: clamp(2rem, 5vw, 4rem);
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-block: 3rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.footer-brand img {
  height: 1.9rem;
  width: auto;
}

.footer-brand p {
  margin-top: 1rem;
  max-width: 26em;
}

.footer-prelaunch {
  font-size: 0.88rem;
  color: var(--ink-500);
}

.site-footer nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.site-footer nav h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  margin-bottom: 0.4rem;
}

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

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--ink-800);
  padding-block: 1.25rem;
  font-size: 0.9rem;
}

.footer-bottom p {
  margin: 0;
}

/* --- Root language chooser ---------------------------------------------------------------- */

.chooser-body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(50rem 30rem at 80% -10%, var(--brand-100), transparent 60%), var(--ink-50);
}

.chooser {
  text-align: center;
  padding: 2rem;
}

.chooser > img {
  margin-inline: auto;
}

.chooser-sub {
  color: var(--ink-500);
  margin-top: 0.75rem;
  letter-spacing: 0.02em;
}

.chooser-ask {
  color: var(--ink-700);
  margin-block: 2rem 1.25rem;
}

.chooser-langs {
  display: grid;
  gap: 0.75rem;
  max-width: 20rem;
  margin-inline: auto;
}

.lang-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 0.9rem 1.25rem;
  font-weight: 650;
  color: var(--ink-900);
  text-decoration: none;
}

.lang-card:hover {
  border-color: var(--brand-500);
  color: var(--brand-700);
}

/* --- Motion ---------------------------------------------------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
