/* ==========================================================================
   styles.css — SELF-CONTAINED build (base.css + theme.css + site palette)
   --------------------------------------------------------------------------
   AUTO-ASSEMBLED. Do not hand-edit structure here — edit the canonical
   sources in /shared/styles/ then re-assemble (see README "Editing styles").
   This single file ships with the site so the Cloudflare Pages folder is
   fully self-contained.
   ========================================================================== */

/* ==========================================================================
   base.css — Shared structural styles for lengyel.uk professional sites
   --------------------------------------------------------------------------
   Purpose: accent-agnostic layout, typography rhythm, and component skeletons.
   Colour values live in theme.css; each site sets its own --accent palette.
   This is the CANONICAL source. The per-site public/styles.css files are
   self-contained copies (base + theme + palette) so each Cloudflare Pages
   project can deploy its folder in isolation. Edit here first, then re-sync.
   ========================================================================== */

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

* { margin: 0; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "calt";
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

a { color: inherit; text-decoration: none; }

button { font: inherit; cursor: pointer; }

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

/* ----- Typography ---------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
  text-wrap: balance;
}

p { text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}

.eyebrow::before {
  content: "";
  width: 1.8rem;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.lede {
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 54ch;
}

/* ----- Layout primitives --------------------------------------------------- */
.wrap {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.section {
  padding-block: clamp(3.5rem, 9vw, 7.5rem);
}

.section--tight { padding-block: clamp(2.5rem, 6vw, 5rem); }

.section-head {
  max-width: 60ch;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}

.section-head h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  margin-top: 0.9rem;
}

.grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
}

@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
}

/* ----- Header / nav -------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  color: var(--ink-strong);
}

.brand .monogram { width: 40px; height: 40px; flex: none; }

.brand small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  list-style: none;
  padding: 0;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding-block: 0.3rem;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover { color: var(--ink-strong); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

.theme-toggle {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover { color: var(--ink-strong); border-color: var(--accent); }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink-strong);
  place-items: center;
}

/* ----- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.25s ease,
    background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

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

.btn--primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 40%, transparent);
}

.btn--primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}

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

.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ----- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3.5rem, 9vw, 7rem);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 880px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.6rem);
  margin-top: 1.1rem;
}

.hero .lede { margin-top: 1.4rem; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.25rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.hero-meta div { min-width: 0; }
.hero-meta dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.hero-meta dd {
  margin-top: 0.3rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink-strong);
}

/* Hero visual card with embedded crest */
.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 120% at 80% 10%, var(--accent-wash) 0%, transparent 55%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  padding: 2rem;
}

.hero-visual .crest { width: min(62%, 240px); height: auto; }

.hero-visual figcaption {
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  right: 1.5rem;
  font-size: 0.82rem;
  color: var(--ink-faint);
  font-style: italic;
}

/* ----- Cards --------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: clamp(1.4rem, 3vw, 2rem);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.card .card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-wash);
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.card h3 { font-size: 1.3rem; }
.card p { margin-top: 0.6rem; color: var(--ink-soft); font-size: 0.97rem; }

/* Numbered approach steps */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 3.6rem; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.1rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ----- About split --------------------------------------------------------- */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
@media (min-width: 820px) {
  .split { grid-template-columns: 0.9fr 1.1fr; }
}

.portrait {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, var(--accent-wash), transparent 70%),
    var(--surface);
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-size: 0.85rem;
  text-align: center;
  padding: 1.5rem;
}

.prose p + p { margin-top: 1.1rem; }
.prose p { color: var(--ink-soft); }

.fact-list { list-style: none; padding: 0; margin-top: 1.5rem; }
.fact-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.fact-list dt, .fact-list .k { color: var(--ink-faint); }
.fact-list .v { color: var(--ink-strong); font-weight: 500; text-align: right; }

/* ----- FAQ ----------------------------------------------------------------- */
.faq { max-width: 70ch; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0.4rem 0;
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 0;
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--ink-strong);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev {
  flex: none;
  transition: transform 0.25s ease;
  color: var(--accent);
}
.faq details[open] summary .chev { transform: rotate(45deg); }
.faq details p {
  padding: 0 0 1.2rem;
  color: var(--ink-soft);
  max-width: 64ch;
}

/* ----- Contact / form ------------------------------------------------------ */
.contact-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
@media (min-width: 860px) {
  .contact-grid { grid-template-columns: 0.95fr 1.05fr; }
}

.contact-list { list-style: none; padding: 0; display: grid; gap: 1.1rem; }
.contact-list li { display: flex; gap: 0.9rem; align-items: flex-start; }
.contact-list .ci {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--accent-wash); color: var(--accent);
}
.contact-list .k {
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-faint);
}
.contact-list .v { font-size: 1.02rem; color: var(--ink-strong); }

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-soft);
}

.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-strong);
  margin-bottom: 0.45rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.field-row { display: grid; gap: 1.1rem; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }

.consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-block: 0.4rem 1.2rem;
}
.consent input { margin-top: 0.2rem; }

.form-note {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-status {
  display: none;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent-wash);
  color: var(--accent-strong);
  font-size: 0.9rem;
}
.form-status.is-visible { display: block; }

/* ----- Compliance ---------------------------------------------------------- */
.compliance {
  background: var(--surface-sunken);
}
.compliance-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
@media (min-width: 680px) { .compliance-grid { grid-template-columns: repeat(2, 1fr); } }
.compliance-item { background: var(--surface); padding: 1.4rem 1.5rem; }
.compliance-item .k {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-faint);
}
.compliance-item .v { margin-top: 0.4rem; font-size: 1.02rem; color: var(--ink-strong); }
.placeholder {
  color: var(--accent-strong);
  background: var(--accent-wash);
  padding: 0.1rem 0.45rem;
  border-radius: 5px;
  font-size: 0.92em;
  font-weight: 600;
}

/* ----- Footer -------------------------------------------------------------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding-block: clamp(3rem, 7vw, 4.5rem) 2rem;
}
.footer-top {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 760px) {
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; }
}
.site-footer .brand { color: var(--footer-ink); }
.site-footer .brand small { color: color-mix(in srgb, var(--footer-ink) 60%, transparent); }
.footer-blurb { margin-top: 1rem; max-width: 36ch; color: color-mix(in srgb, var(--footer-ink) 72%, transparent); font-size: 0.92rem; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.13em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--footer-ink) 60%, transparent);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 0.65rem; }
.footer-col a { color: color-mix(in srgb, var(--footer-ink) 85%, transparent); font-size: 0.93rem; }
.footer-col a:hover { color: var(--footer-ink); }
.footer-bottom {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid color-mix(in srgb, var(--footer-ink) 18%, transparent);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.83rem;
  color: color-mix(in srgb, var(--footer-ink) 62%, transparent);
}
.footer-bottom a { text-decoration: underline; text-underline-offset: 2px; }

/* ----- Reveal-on-load / scroll motion -------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* ----- Mobile nav ---------------------------------------------------------- */
@media (max-width: 760px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1.5rem;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-soft);
  }
  .nav[data-open="true"] .nav-links { transform: translateY(0); }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border-bottom: 0; }
  .nav-links a { display: block; width: 100%; padding: 0.95rem 0; }
  .nav-links a::after { display: none; }
}

/* ==========================================================================
   theme.css — Shared colour + token system (light / dark)
   --------------------------------------------------------------------------
   Purpose: defines the neutral palette, surfaces, lines, shadows, radii,
   type scale and font stacks shared by both sites. Accent colours are NOT
   set here — each site declares its own --accent / --accent-* in styles.css
   so the two profiles stay visually related but distinct.

   Theme is controlled by the [data-theme="light|dark"] attribute on <html>,
   set by theme-toggle.js (honouring system preference + saved choice).
   Canonical source — mirrored into each site's public/styles.css.
   ========================================================================== */

:root {
  /* Type scale (fluid) */
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --text-lg: clamp(1.15rem, 1.05rem + 0.45vw, 1.3rem);

  /* Spacing / shape */
  --container: 1140px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  /* Font stacks set per-site; sensible fallbacks here */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  color-scheme: light;
}

/* ----- Light theme (default) ---------------------------------------------- */
:root,
[data-theme="light"] {
  --bg: #f6f1e9;
  --surface: #fffdf9;
  --surface-sunken: #f1eadf;
  --ink-strong: #211d17;
  --ink: #38332b;
  --ink-soft: #5c554a;
  --ink-faint: #8a8175;
  --line: #e3dccf;
  --line-strong: #d2c8b6;
  --shadow-soft: 0 24px 60px -34px rgba(40, 33, 20, 0.45);

  --footer-bg: #211d17;
  --footer-ink: #f6f1e9;
}

/* ----- Dark theme ---------------------------------------------------------- */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16140f;
  --surface: #1f1c16;
  --surface-sunken: #110f0b;
  --ink-strong: #f4efe6;
  --ink: #ddd6ca;
  --ink-soft: #b3aa9a;
  --ink-faint: #8a8174;
  --line: #322d24;
  --line-strong: #423b30;
  --shadow-soft: 0 28px 70px -34px rgba(0, 0, 0, 0.7);

  --footer-bg: #0f0d09;
  --footer-ink: #f1ece2;
}

/* ==========================================================================
   PALETTE — Dr Alexandra Lengyel (deep evergreen accent, warm neutrals)
   Appended after base + theme. Defines this site's distinct accent + fonts.
   ========================================================================== */
:root {
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
}

:root,
[data-theme="light"] {
  --accent: #1f4d43;
  --accent-strong: #163a32;
  --accent-contrast: #f6f1e9;
  --accent-wash: #e7efe9;
}

[data-theme="dark"] {
  --accent: #6fae9d;
  --accent-strong: #8cc4b4;
  --accent-contrast: #10211c;
  --accent-wash: rgba(111, 174, 157, 0.14);
}

/* Fraunces is an optical serif — let it breathe at display sizes. */
h1, h2, h3, h4 { font-optical-sizing: auto; }
.hero h1 { font-weight: 400; }

/* ==========================================================================
   Intake form styles (appended — mirrors shared/styles/base.css additions)
   ========================================================================== */
.field-set {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.25rem 1rem;
  margin-bottom: 1.25rem;
  min-width: 0;
}
.field-set legend {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0 0.5rem;
  color: var(--ink-strong);
}
.req { color: var(--accent); font-weight: 700; }

.consent-set { display: grid; gap: 0.9rem; }
.consent-set .consent { margin: 0; }
.consent-divider { margin: 0.3rem 0; opacity: 0.7; }
.consent--optional { color: var(--ink-faint); }
.consent strong { color: var(--ink-strong); font-weight: 600; }
.consent-tag {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.cf-turnstile { margin: 0.25rem 0 1.1rem; min-height: 65px; }

.intake-submit { width: 100%; justify-content: center; }
.intake-spinner { display: none; animation: intake-spin 0.7s linear infinite; }
.is-submitting .intake-submit { opacity: 0.85; cursor: progress; }
.is-submitting .intake-spinner { display: inline-block; }
@keyframes intake-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .intake-spinner { animation: none; } }

.form-status.is-pending { background: var(--surface-sunken); color: var(--ink-soft); }
.form-status.is-success { background: var(--accent-wash); color: var(--accent-strong); }
.form-status.is-error {
  background: color-mix(in srgb, #b3261e 12%, var(--surface));
  color: #b3261e;
}
[data-theme="dark"] .form-status.is-error {
  background: color-mix(in srgb, #ff6b6b 16%, var(--surface));
  color: #ff8a80;
}
