/* ==========================================================================
   Flow Money Manager — public site
   --------------------------------------------------------------------------
   Design direction: "the ledger". A bookkeeping product for people who will be
   filing to HMRC has to read like a professional practice, not a consumer app.
   So: warm paper rather than stark white, deep ink rather than SaaS blue, an
   editorial serif set large and light for headlines, and a precise grotesque
   with tabular figures for anything numeric. Ruled hairlines throughout echo
   ledger paper without tipping into skeuomorphism.

   Fonts are self-hosted. The CSP is "font-src 'self'", so a font CDN would be
   blocked outright — and for a UK finance product, not shipping visitor IPs to
   a third party on every page load is the better default anyway. Both families
   are SIL OFL licensed; see fonts/OFL-NOTICE.txt.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Newsreader';
  src: url('/marketing/fonts/newsreader-var-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Plex Sans VF';
  src: url('/marketing/fonts/ibm-plex-sans-var-latin.woff2') format('woff2');
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Ink — the dominant colour, for type and the dark sections */
  --ink-900: #0A1A26;
  --ink-800: #102836;
  --ink-700: #1B3A4B;
  --ink-600: #2E5468;
  --ink-500: #4A6B7C;
  --ink-400: #6E8896;
  --ink-300: #9AAEB8;

  /* Paper — warm grounds. Stark white reads cheap under a serif this large. */
  --paper: #FBF9F5;
  --paper-2: #F4F0E8;
  --paper-3: #EBE5D9;
  --line: #DED7C8;
  --line-soft: #EDE8DD;

  /* Accent — deep ledger green. Distinct from the sea of fintech blue, and it
     carries the "money, checked and signed off" association we want. */
  --accent: #0F5C48;
  --accent-hover: #0A4635;
  --accent-soft: #E4EDE9;
  --accent-line: #B9CFC7;

  /* Used sparingly: eyebrow rules, the odd marker. Never for large areas. */
  --brass: #A8792F;

  --danger: #A32B24;
  --danger-soft: #F8E9E7;

  /* Legacy aliases — existing markup still references these names. */
  --marketing-primary: var(--accent);
  --marketing-primary-hover: var(--accent-hover);
  --marketing-primary-light: var(--accent-soft);
  --marketing-secondary: var(--accent);
  --marketing-secondary-hover: var(--accent-hover);
  --marketing-teal: var(--accent);
  --marketing-teal-hover: var(--accent-hover);
  --marketing-bg-white: var(--paper);
  --marketing-bg-light: var(--paper-2);
  --marketing-bg-dark: var(--ink-900);
  --marketing-text-heading: var(--ink-900);
  --marketing-text-body: var(--ink-500);
  --marketing-text-muted: var(--ink-400);
  --marketing-text-white: #FFFFFF;
  --marketing-border: var(--line);
  --marketing-border-light: var(--line-soft);

  /* Type */
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Plex Sans VF', 'IBM Plex Sans', ui-sans-serif, sans-serif;
  --marketing-font: var(--font-body);
  --marketing-font-serif: var(--font-display);

  /* Space */
  --container: 1140px;
  --container-narrow: 780px;
  --marketing-container-padding: 32px;
  --section-y: clamp(72px, 9vw, 128px);

  --radius: 4px;
  --radius-lg: 8px;

  /* Shadows stay shallow — this is a paper-and-ink surface, not floating glass */
  --shadow-sm: 0 1px 2px rgba(10, 26, 38, 0.06);
  --shadow: 0 12px 32px -18px rgba(10, 26, 38, 0.35);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-700);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* Headlines: large, light, tightly tracked. The tracking earns its keep — a
   serif at this size with default spacing looks slack. */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-900);
  font-weight: 300;
  letter-spacing: -0.022em;
  line-height: 1.08;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5.4vw, 4.4rem); }
h2 { font-size: clamp(1.95rem, 3.6vw, 2.95rem); }
h3 {
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
h4 { font-size: 1.0625rem; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

/* Anything numeric lines up in columns. This is a bookkeeping product; figures
   that jitter between rows undercut the whole proposition. */
.tabular,
.marketing-pricing-price,
.stat-figure,
.figures-value,
.figures-period { font-variant-numeric: tabular-nums; }

::selection { background: var(--accent); color: #fff; }

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

.marketing-container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--marketing-container-padding);
}

/* Small uppercase section labels. Sets the register immediately: this is a
   document with sections, not a landing page with slogans. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-400);
  font-family: var(--font-body);
}

.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--brass);
  flex: none;
}

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

.marketing-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 249, 245, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.marketing-nav {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--marketing-container-padding);
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.marketing-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  text-decoration: none;
  margin-right: auto;
}

.marketing-logo:hover { color: var(--ink-900); }

.marketing-logo-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink-900);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
}

.marketing-nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.marketing-nav-links > a:not(.btn) {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink-600);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
}

.marketing-nav-links > a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--ink-900);
  transition: right 0.28s var(--ease);
}

.marketing-nav-links > a:not(.btn):hover { color: var(--ink-900); }
.marketing-nav-links > a:not(.btn):hover::after { right: 0; }

.marketing-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 9px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.marketing-nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--ink-800);
  border-radius: 2px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

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

.btn-primary,
.btn-teal {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover,
.btn-teal:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

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

.btn-secondary:hover {
  border-color: var(--ink-700);
  color: var(--ink-900);
}

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

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

.marketing-hero {
  position: relative;
  padding: clamp(60px, 7.5vw, 100px) 0 clamp(52px, 6.5vw, 84px);
  overflow: hidden;
}

/* Ruled paper, very faint — texture rather than decoration. */
.marketing-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 43px,
    var(--line-soft) 43px,
    var(--line-soft) 44px
  );
  opacity: 0.5;
  pointer-events: none;
}

.marketing-hero > * { position: relative; }

/* Asymmetric hero: the statement on the left, the evidence on the right. */
.marketing-hero-content {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--marketing-container-padding);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

/* The previous markup gave this a fixed width, which is what clipped the
   headline mid-word. Width now comes from the grid track, and min-width:0
   stops the grid item refusing to shrink below its content. */
.marketing-hero-text {
  min-width: 0;
  max-width: 100%;
}

.marketing-hero h1 { margin-bottom: 22px; }

.marketing-hero-subtitle {
  font-size: 1.14rem;
  line-height: 1.62;
  color: var(--ink-500);
  max-width: 52ch;
  margin-bottom: 30px;
}

.marketing-hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.hero-note {
  margin: 18px 0 0;
  font-size: 0.87rem;
  color: var(--ink-400);
}

/* The stock photograph is retired; this keeps old markup harmless. */
.marketing-hero-bg { display: none; }

/* Single-column heroes (pricing, features, about, contact) centre themselves.
   Those pages wrap their hero copy in .marketing-container rather than
   .marketing-hero-content, so both selectors are needed. */
.marketing-hero:not(.marketing-hero-image) .marketing-hero-content,
.marketing-hero:not(.marketing-hero-image) .marketing-container {
  display: block;
  text-align: center;
}

.marketing-hero:not(.marketing-hero-image) .marketing-hero-subtitle {
  margin-left: auto;
  margin-right: auto;
  max-width: 60ch;
}

.marketing-hero:not(.marketing-hero-image) .eyebrow { justify-content: center; }

/* --------------------------------------------------------------------------
   Figures panel — the hero's right-hand column.
   Illustrative figures, labelled as such. It shows what the product actually
   produces, which is more persuasive than a photograph of someone smiling.
   -------------------------------------------------------------------------- */

.figures-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
}

.figures-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 22px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.figures-title {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-600);
}

.figures-period {
  font-size: 0.79rem;
  color: var(--ink-400);
}

.figures-rows { padding: 5px 0; }

.figures-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 22px;
  font-size: 0.92rem;
}

.figures-row + .figures-row { border-top: 1px solid var(--line-soft); }

.figures-label { color: var(--ink-600); min-width: 0; }

.figures-value {
  font-weight: 500;
  color: var(--ink-900);
  white-space: nowrap;
}

.figures-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 22px;
  border-top: 2px solid var(--ink-900);
  background: var(--paper);
}

.figures-total .figures-label {
  font-weight: 600;
  color: var(--ink-900);
}

.figures-total .figures-value { font-size: 1.12rem; font-weight: 600; }

.figures-foot {
  padding: 12px 22px 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.77rem;
  line-height: 1.5;
  color: var(--ink-400);
}

.figures-foot strong { color: var(--ink-600); font-weight: 600; }

/* --------------------------------------------------------------------------
   Fact strip
   -------------------------------------------------------------------------- */

.fact-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

.fact-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--marketing-container-padding);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fact {
  padding: 28px 26px 28px 0;
  border-right: 1px solid var(--line);
}

.fact:last-child { border-right: 0; padding-right: 0; }
.fact:not(:first-child) { padding-left: 26px; }

.stat-figure {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink-900);
  margin-bottom: 8px;
}

.fact-label {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--ink-500);
}

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

.marketing-features,
.marketing-about-content,
.marketing-pricing,
.marketing-contact-section,
.marketing-auth-section {
  padding: var(--section-y) 0;
}

.marketing-features-header {
  max-width: var(--container-narrow);
  margin-bottom: clamp(38px, 5vw, 60px);
}

.marketing-features-header h2 { margin-bottom: 16px; }

.marketing-features-header p {
  font-size: 1.12rem;
  color: var(--ink-500);
  max-width: 60ch;
  margin: 0;
}

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

.section-ink {
  background: var(--ink-900);
  color: rgba(251, 249, 245, 0.76);
}

.section-ink h1,
.section-ink h2,
.section-ink h3 { color: var(--paper); }

.section-ink .eyebrow { color: rgba(251, 249, 245, 0.55); }
.section-ink a:not(.btn) { color: var(--paper); }

.section-ink .marketing-features-header p { color: rgba(251, 249, 245, 0.7); }

/* --------------------------------------------------------------------------
   Feature cards — ruled rather than boxed
   -------------------------------------------------------------------------- */

.marketing-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.section-ink .marketing-features-grid { border-top-color: rgba(255, 255, 255, 0.14); }

.marketing-feature-card {
  padding: 32px 30px 36px 0;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: none;
  transition: background-color 0.25s var(--ease);
}

.section-ink .marketing-feature-card {
  border-bottom-color: rgba(255, 255, 255, 0.14);
  border-right-color: rgba(255, 255, 255, 0.14);
}

.marketing-feature-card:hover { background: rgba(255, 255, 255, 0.55); }
.section-ink .marketing-feature-card:hover { background: rgba(255, 255, 255, 0.035); }

.marketing-features-grid > .marketing-feature-card { padding-left: 30px; }
.marketing-features-grid > .marketing-feature-card:first-child { padding-left: 0; }

.marketing-feature-icon {
  font-size: 1.02rem;
  line-height: 1;
  margin-bottom: 18px;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}

.section-ink .marketing-feature-icon {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}

.marketing-feature-card h3 { margin-bottom: 10px; }

.marketing-feature-card p {
  font-size: 0.96rem;
  line-height: 1.62;
  color: var(--ink-500);
  margin: 0;
}

.section-ink .marketing-feature-card p { color: rgba(251, 249, 245, 0.66); }

/* --------------------------------------------------------------------------
   Statement block — the one place the serif runs really large
   -------------------------------------------------------------------------- */

.statement { max-width: var(--container-narrow); }

.statement p:not(.eyebrow):not(.statement-quote) {
  font-size: 1.08rem;
  max-width: 62ch;
}

/* Section that follows another directly and should not double up on padding. */
.section-tight { padding-top: 0; }

.btn-block { width: 100%; }

.statement-quote {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  line-height: 1.24;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin: 0 0 24px;
  text-wrap: balance;
}

.section-ink .statement-quote { color: var(--paper); }

.checklist {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.checklist li {
  position: relative;
  padding-left: 28px;
  font-size: 1rem;
  line-height: 1.55;
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 12px;
  height: 1px;
  background: var(--brass);
}

/* --------------------------------------------------------------------------
   Scope note — the honesty panel
   -------------------------------------------------------------------------- */

.scope-note {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 28px 32px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--brass);
  border-radius: var(--radius);
}

.scope-note h3 { font-size: 1.1rem; margin-bottom: 10px; }

.scope-note p {
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--ink-500);
  margin: 0;
}

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

.marketing-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 400px));
  gap: 26px;
  justify-content: center;
  align-items: start;
}

.marketing-pricing-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 32px 32px;
  box-shadow: var(--shadow-sm);
}

.marketing-pricing-card.featured {
  border-color: var(--ink-900);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.marketing-pricing-card.featured::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--ink-900);
}

.marketing-pricing-card h3 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 16px;
}

.marketing-pricing-price {
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 5vw, 3.6rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink-900);
  margin-bottom: 24px;
}

.marketing-pricing-price span {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-400);
  margin-left: 6px;
}

.marketing-pricing-features {
  list-style: none;
  margin: 0 0 28px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 13px;
}

.marketing-pricing-features li {
  position: relative;
  padding-left: 27px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-600);
}

.marketing-pricing-features li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.42em;
  width: 11px;
  height: 6px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

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

.marketing-cta {
  background: var(--ink-900);
  color: rgba(251, 249, 245, 0.76);
  padding: var(--section-y) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.marketing-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 120% at 50% 0%,
    rgba(15, 92, 72, 0.34),
    transparent 70%
  );
  pointer-events: none;
}

.marketing-cta > * { position: relative; }

.marketing-cta h2 { color: var(--paper); margin-bottom: 16px; }

.marketing-cta p {
  font-size: 1.08rem;
  color: rgba(251, 249, 245, 0.72);
  max-width: 56ch;
  margin: 0 auto 28px;
}

.marketing-cta .btn-primary,
.marketing-cta .btn-teal {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink-900);
}

.marketing-cta .btn-primary:hover,
.marketing-cta .btn-teal:hover {
  background: #fff;
  border-color: #fff;
  color: var(--ink-900);
}

/* --------------------------------------------------------------------------
   About / long-form
   -------------------------------------------------------------------------- */

.marketing-about-section {
  max-width: var(--container-narrow);
  margin: 0 auto clamp(42px, 5vw, 64px);
}

.marketing-about-section:last-child { margin-bottom: 0; }
.marketing-about-section h2 { margin-bottom: 18px; }

.marketing-about-section p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-500);
}

.marketing-about-section .marketing-features-grid { margin-top: 28px; }

.marketing-values-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.marketing-values-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-500);
}

.marketing-values-list strong { color: var(--ink-900); font-weight: 600; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.marketing-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.marketing-contact-info h2 { margin-bottom: 16px; }

.marketing-contact-method {
  display: flex;
  gap: 15px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}

.marketing-contact-method:first-of-type { border-top: 1px solid var(--line-soft); }

.marketing-contact-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  font-size: 0.95rem;
}

.marketing-contact-form-wrapper {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 3.5vw, 38px);
  box-shadow: var(--shadow-sm);
}

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

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-700);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink-900);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease),
              background-color 0.18s var(--ease);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--ink-300); }

.form-group textarea { min-height: 132px; resize: vertical; }

.form-actions { margin-top: 22px; }
.form-actions .btn { width: 100%; }

.form-error,
.form-success {
  display: none;
  padding: 11px 15px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.form-error {
  background: var(--danger-soft);
  border: 1px solid #E8C9C5;
  color: var(--danger);
}

.form-success {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
}

.form-error.show,
.form-success.show { display: block; }

.form-links {
  margin-top: 15px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-500);
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--ink-300);
  font-size: 0.82rem;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* --------------------------------------------------------------------------
   Auth pages
   -------------------------------------------------------------------------- */

.marketing-auth-section {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  background: var(--paper-2);
}

.marketing-auth-card {
  width: 100%;
  max-width: 448px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(30px, 4vw, 42px);
  box-shadow: var(--shadow);
}

.marketing-auth-header { text-align: center; margin-bottom: 26px; }

.marketing-auth-header h1 {
  font-size: clamp(1.8rem, 3vw, 2.15rem);
  margin-bottom: 10px;
}

.marketing-auth-header p { color: var(--ink-500); font-size: 0.97rem; margin: 0; }

.marketing-auth-message { margin-bottom: 18px; }

.marketing-auth-terms {
  margin-top: 20px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink-400);
  text-align: center;
}

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

.marketing-footer {
  background: var(--ink-900);
  color: rgba(251, 249, 245, 0.6);
  padding: 42px 0;
}

.marketing-footer-content {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--marketing-container-padding);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.87rem;
}

.marketing-footer-content p { margin: 0; }

.marketing-footer-links { display: flex; flex-wrap: wrap; gap: 26px; }

.marketing-footer-links a {
  color: rgba(251, 249, 245, 0.72);
  text-decoration: none;
}

.marketing-footer-links a:hover {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 26, 38, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  padding: 22px;
  overflow-y: auto;
}

.modal-overlay.active { display: grid; place-items: center; }

.modal-content {
  position: relative;
  width: 100%;
  max-width: 448px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 40px);
  box-shadow: 0 32px 70px -28px rgba(10, 26, 38, 0.6);
  animation: modal-in 0.3s var(--ease) both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink-400);
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.modal-close:hover { color: var(--ink-900); border-color: var(--line); }
.modal-close svg { width: 17px; height: 17px; }

.modal-header { text-align: center; margin-bottom: 24px; }
.modal-header h2 { font-size: 1.7rem; margin-bottom: 8px; }
.modal-header p { color: var(--ink-500); font-size: 0.95rem; margin: 0; }

/* --------------------------------------------------------------------------
   Entrance motion — one orchestrated reveal, then it gets out of the way
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: reveal 0.7s var(--ease) both; }

  .reveal-1 { animation-delay: 0.05s; }
  .reveal-2 { animation-delay: 0.14s; }
  .reveal-3 { animation-delay: 0.23s; }
  .reveal-4 { animation-delay: 0.32s; }

  @keyframes reveal {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .marketing-hero-content { grid-template-columns: minmax(0, 1fr); gap: 42px; }
  .marketing-hero-subtitle { max-width: 60ch; }
  .marketing-contact-grid { grid-template-columns: minmax(0, 1fr); }

  .fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(2) { border-right: 0; padding-right: 0; }
  .fact:nth-child(3) { padding-left: 0; }
  .fact:nth-child(3),
  .fact:nth-child(4) { border-top: 1px solid var(--line); padding-top: 26px; }
}

@media (max-width: 768px) {
  :root { --marketing-container-padding: 20px; }

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

  .marketing-nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 18px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }

  .marketing-nav-links.active { display: flex; }

  .marketing-nav-links > a:not(.btn) {
    padding: 13px 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .marketing-nav-links > a:not(.btn)::after { display: none; }
  .marketing-nav-links .btn { margin-top: 14px; }

  .marketing-features-grid {
    grid-template-columns: minmax(0, 1fr);
    border-top: 0;
  }

  .marketing-feature-card,
  .marketing-features-grid > .marketing-feature-card {
    padding: 26px 0;
    border-right: 0;
    padding-left: 0;
  }

  .marketing-feature-card:first-child { border-top: 1px solid var(--line); }
  .section-ink .marketing-feature-card:first-child { border-top-color: rgba(255, 255, 255, 0.14); }

  .marketing-hero-cta { flex-direction: column; align-items: stretch; }
  .marketing-hero-cta .btn { width: 100%; }

  .figures-row,
  .figures-total,
  .figures-head,
  .figures-foot { padding-left: 17px; padding-right: 17px; }

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

@media (max-width: 520px) {
  .fact-grid { grid-template-columns: minmax(0, 1fr); }

  .fact,
  .fact:not(:first-child) {
    padding: 20px 0;
    border-right: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
  }

  .fact:first-child { border-top: 0; }
  .scope-note { padding: 24px 22px; }
}
