/* felnottadhd.net
 *
 * Dark throughout: many readers come to this page at night, and a light theme
 * is physically unpleasant for them. The hero replicates the site's long-running
 * "Split" layout — full-height portrait beside a vertically centred column — and
 * keeps that layout's geometry and type. Two deliberate departures, agreed with
 * the owner: the typefaces are self-hosted rather than fetched from Google, and
 * the text is brightened to at least 7:1 (WCAG AAA), because the audience is
 * disproportionately neurodivergent.
 */

/* ---------- typefaces (self-hosted, subset: latin + latin-ext for ő ű) ---------- */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/montserrat-400-latin.e66bcd2761ab.woff2') format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/montserrat-400-latin-ext.30f166cea089.woff2') format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/montserrat-600-latin.d857325c360f.woff2') format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/montserrat-600-latin-ext.1d8a4af6a50c.woff2') format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/lora-400-latin.ac079950fd98.woff2') format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/lora-400-latin-ext.525551030c50.woff2') format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- tokens ---------- */

:root {
  --deep: #061c30;   /* the brand navy — the split screen's backdrop */
  --page: #0c2439;   /* content sections, one step lighter */
  --well: #0a2033;   /* recessed panels, deliberately darker than --page */
  --line: rgb(255 255 255 / 10%);

  --ink: #dce6ee;    /* body text: 12.5:1 on --page, 13.6:1 on --deep (AAA) */
  --dim: #b6c6d4;    /* tagline, contacts, credit: 9.5:1 on --deep (AAA) */
  --accent: #47bec7; /* the brand teal — the name, links and rules */
  --accent-bright: #6fd3da;
  --rose: #ca486d;   /* the link hover carried over from the old stylesheet */

  --measure: 34rem;  /* ~68 characters, the readable line length inside a column */
  --content-max: 1200px; /* how wide the sections and the in-page nav get on a large screen */
  --gap: clamp(1.5rem, 4vw, 3rem);
  --menu-h: 50px; /* the sticky top bar's height; the hero shrinks by this so bar and hero together fill the first screen */

  --font-ui: "Montserrat", system-ui, sans-serif;
  --font-body: "Lora", Georgia, serif;

  color-scheme: dark;
}

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

html {
  background: var(--deep);
  scroll-behavior: smooth;
}

/* The base font is the split screen's own: 21px Montserrat at a 33px line, so
 * the hero and everything it inherits (including the language switch's height)
 * match the live page's rhythm. */
body {
  margin: 0;
  background: var(--deep);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 21px;
  line-height: 33px;
  letter-spacing: -0.2px;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); }
a:hover, a:focus { color: var(--accent-bright); }

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  padding: 0.75rem 1rem;
  background: var(--well);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
  z-index: 10;
}

.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- hero: the split screen ----------
 *
 * The geometry mirrors the Split stylesheet the live site has shipped for
 * years, so the cut-over changes nothing a visitor sees. Two deliberate
 * departures, agreed with the owner: the typefaces are self-hosted, and the
 * reading text is brightened to AAA — but the visual hierarchy (teal name, dim
 * tagline, dim contacts) is kept, so the page keeps its depth.
 */

.fs-split {
  width: 100%;
  height: calc(100vh - var(--menu-h));
  display: flex;
}

/* The portrait is an <img> with object-fit: cover, so it fills its half and
 * crops exactly as the live page's background image does, while keeping a real
 * alt and needing no CSP exception. */
.split-image {
  width: 50%;
  height: calc(100vh - var(--menu-h));
  object-fit: cover;
  /* centre on the face, as the live page's background-position does */
  object-position: center 30%;
  display: block;
}

.split-content {
  width: 50%;
  min-height: calc(100vh - var(--menu-h));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

/* content-box, as on the live page: the 640px is the *content* width and the
 * 80px padding sits outside it, so the column reads wider than a border-box
 * 640px would. */
.split-content-vertically-center {
  box-sizing: content-box;
  padding: 80px;
  max-width: 640px;
  margin-top: auto;
  margin-bottom: auto;
}

/* ---------- language switch (in the sticky top bar) ---------- */

.languages { margin: 0 0 0 auto; }

.lang-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  white-space: nowrap;
  /* inherits the body's 33px line-height, giving the row its height */
}

.lang-list li { display: inline-block; padding: 0 0.5em; }

.lang-list a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.5s;
}

.lang-list a:hover { color: var(--rose); transition-duration: 0.1s; }

.lang-list a.current { border-bottom: 2px solid var(--dim); }
.lang-list a.current:hover { border-bottom-color: var(--rose); }

/* ---------- hero: name, tagline, bio ---------- */

.split-intro {
  font-weight: 600;
  font-size: 48px;
  line-height: 48px;
  letter-spacing: -2px;
}

.split-intro h1 {
  font-weight: 400;
  text-transform: uppercase;
  font-size: 32px;
  line-height: 32px;
  margin-bottom: 40px;
  letter-spacing: 0.4px;
  color: var(--accent);
}

/* The tagline is the large grey line under the name. It is an h2 in the prose
 * but is styled here, scoped to the intro, so the section h2 rules never touch
 * it. */
.split-intro .tagline {
  font-weight: 600;
  font-size: 48px;
  line-height: 48px;
  letter-spacing: -2px;
  color: var(--dim);
}

.split-bio {
  padding: 40px 0 20px;
  font-family: var(--font-body);
}

.split-bio p { color: var(--ink); margin-bottom: 20px; line-height: inherit; }

.split-bio a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dotted var(--dim);
  transition: color 0.5s;
}

.split-bio a:hover { color: var(--rose); border-bottom-color: var(--rose); transition-duration: 0.1s; }

/* ---------- hero: contact list ---------- */

.split-list h3 {
  font-weight: 400;
  text-transform: uppercase;
  font-size: 14px;
  line-height: 14px;
  margin-bottom: 31px;
  color: var(--dim);
  letter-spacing: 2px;
  opacity: 0.7;
}

.contact-list { margin: 0; padding: 0; list-style: none; }

.contact-list li {
  font-size: 16px;
  line-height: 16px;
  margin-bottom: 12px;
}

.contact-list svg {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 0.4em;
}

.contact-list a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.5s;
}

.contact-list a:hover { color: var(--rose); transition-duration: 0.1s; }

/* ---------- hero: credit ---------- */

.split-credit { opacity: 0.6; }

.split-credit p {
  font-size: 12px;
  line-height: 14px;
  color: var(--dim);
}

.split-credit a { color: var(--dim); }

/* ---------- in-page navigation (only present once sections are) ---------- */

/* The sticky top bar sits at the very top of the page, before the hero, and
 * holds the section menu on the left and the language switch on the right, so
 * both stay reachable however far down the page a visitor has scrolled. The
 * hero below is shortened by --menu-h so bar and hero together fill the first
 * screen. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--menu-h);
  background: var(--deep);
  border-bottom: 1px solid var(--line);
  padding: 0.5rem var(--gap);
}

.contents { flex: 1 1 auto; min-width: 0; }

.contents ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
}

.contents a { text-decoration: none; color: var(--dim); }
.contents a:hover, .contents a:focus { color: var(--accent-bright); }

/* ---------- sections ---------- */

.section {
  border-bottom: 1px solid var(--line);
  background: var(--page);
}

.section:nth-of-type(even) { background: var(--deep); }

/* A text-only section is a padded, centred column at the content width, its
 * prose flowing into two columns on a large screen so no line runs the full
 * measure. */
.section-inner { max-width: var(--content-max); margin-inline: auto; }

.section:not(.section-image-left, .section-image-right) {
  padding: clamp(3rem, 8vw, 5.5rem) var(--gap);
}

.section:not(.section-image-left, .section-image-right) .section-inner {
  max-width: var(--measure);
}

@media (min-width: 55rem) {
  .section:not(.section-image-left, .section-image-right) .section-inner {
    max-width: var(--content-max);
  }

  .section:not(.section-image-left, .section-image-right) .prose {
    columns: 2;
    column-gap: clamp(2rem, 5vw, 4rem);
  }
}

/* An illustrated section is a full-bleed split like the hero: the picture fills
 * its half edge to edge and crops to fit, the text centres in the other half.
 * Which side the picture takes is decided when the page is built (alternating,
 * or pinned with coverSide), so a text-only section in between does not put two
 * pictures on the same edge. */
.section-image-left .section-inner,
.section-image-right .section-inner {
  display: flex;
  flex-direction: column;
  max-width: none;
}

.section-image {
  display: block;
  width: 100%;
  object-fit: cover;
  object-position: center;
}

.section-image-left .section-text,
.section-image-right .section-text {
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gap);
}

@media (min-width: 55rem) {
  .section-image-left .section-inner,
  .section-image-right .section-inner {
    flex-direction: row;
    align-items: stretch;
    position: relative;
    /* The floor keeps a short section tall enough for the cover not to be
     * cropped to a sliver, but it is never allowed past the screen itself:
     * beyond that the text half would stretch to fill the excess and read as
     * oversized padding around too little content. */
    min-height: min(32rem, calc(100vh - var(--menu-h)));
  }

  .section-image-left .section-image,
  .section-image-right .section-image {
    width: 50%;
    /* Fill the row rather than letting the image's own aspect ratio set the
     * row's height: absolutely positioned against the inner, it covers
     * whatever height the text (and the floor above) produce. Short content
     * therefore stays compact instead of being stretched to the image's
     * natural height. */
    position: absolute;
    top: 0;
    bottom: 0;
    height: 100%;
  }

  .section-image-left .section-image { left: 0; }
  .section-image-right .section-image { right: 0; order: 2; }

  .section-image-left .section-text,
  .section-image-right .section-text {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(4rem, 8vw, 6.5rem) clamp(2.5rem, 6vw, 5rem);
  }

  /* The text column sits on the side the image is not. */
  .section-image-left .section-text { margin-left: 50%; }
  .section-image-right .section-text { margin-right: 50%; }
}

.section-text { min-width: 0; }

.section h2 {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  font-weight: 600;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  margin-bottom: 1.2em;
}

.section .prose {
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* A withheld section rendered only in development gets an unmistakable marker
 * so it cannot be mistaken for published copy. It never ships: production does
 * not set the flag that produces it. */
.draft-badge {
  font-family: var(--font-ui);
  font-size: 0.55em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 0.6em;
  padding: 0.15em 0.6em;
  border: 1px solid var(--rose);
  border-radius: 999px;
  color: var(--rose);
}

.prose h3 { font-size: 1.1rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4em; }

/* Pictures the author places inside the prose stay where they were written. */
.prose img { display: block; border-radius: 4px; margin: 1.5rem 0; }

/* A quotation block is how the crisis details are set apart. */
.prose blockquote {
  margin: 1.6em 0;
  padding: 1rem 1.25rem;
  background: var(--well);
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
}

/* ---------- error page ---------- */

.page-notfound main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 6rem var(--gap);
}

/* The short message stays at the readable measure inside the wider frame. */
.page-notfound main > * { max-width: var(--measure); }

/* ---------- reduced motion ---------- */

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

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

/* ---------- narrower viewports (live's breakpoints) ---------- */

@media (max-width: 1200px) {
  .split-content-vertically-center { padding: 60px; }
  .split-bio { padding: 30px 0 10px; }
}

@media (max-width: 800px) {
  .fs-split { height: auto; flex-wrap: wrap; }

  .split-image { height: 60vh; width: 100%; min-height: 0; }

  .split-content { width: 100%; height: auto; min-height: 0; }

  .split-content-vertically-center { padding: 40px; }

  .split-bio { padding: 20px 0 0; }
}

/* Below roughly 1520px the section menu wraps to a second line, so the sticky
 * bar grows taller; the hero must shrink by the larger height for bar and hero
 * together to fill the first screen. */
@media (max-width: 1520px) {
  :root { --menu-h: 91px; }
}

/* ---------- standalone pages (contact outcomes, privacy notice) ---------- */

/* These pages share the sections' content width rather than the narrow prose
 * measure, so they do not feel cramped next to the rest of the page. Long
 * prose (the privacy notice) still wraps at the readable measure inside that
 * width. */
.page-standalone .standalone {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: calc(var(--menu-h) + 3rem) var(--gap) 4rem;
}

.page-standalone h1 { color: var(--accent); margin-bottom: 1rem; }

/* The prose is a single column spanning the content container's width, like a
 * text-only section's frame — not the narrow measure, and not split into two
 * columns. */
.page-standalone .prose {
  font-family: var(--font-body);
  line-height: 1.7;
}

.standalone-back { margin-top: 2.5rem; }

/* ---------- contact form ---------- */

.section-contact .section-inner { justify-content: center; }

.contact-form-wrap {
  max-width: 60rem;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) 1.5rem;
}

.contact-form-wrap h2 { color: var(--accent); }

.form-intro {
  color: var(--dim);
  font-family: var(--font-body);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.contact-form { display: grid; gap: 1.5rem; }

/* The short fields sit in a 2×2 grid on a wide screen — name beside phone,
 * email beside the meeting format — while the free-text summary, the consent
 * control and the button span the full width below, so the writing space is
 * never squeezed into a column. On a narrow screen everything stacks in
 * source order. */
.form-grid { display: grid; gap: 1.5rem; }

@media (min-width: 55rem) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
  }

  /* Keep each cell's contents together and top-aligned. */
  .form-grid > .form-field { align-content: start; }
}

.form-field { display: grid; gap: 0.4rem; border: 0; margin: 0; padding: 0; }

.form-field label, .form-format legend {
  font-weight: 600;
  color: var(--ink);
}

.form-field .optional { color: var(--dim); font-weight: 400; font-size: 0.9em; }

.field-guidance {
  color: var(--dim);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  font: inherit;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.7rem 0.85rem;
  width: 100%;
  box-sizing: border-box;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.contact-form [aria-invalid="true"] { border-color: var(--rose); }

.form-format { display: grid; gap: 0.5rem; }
.form-format label { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; }

.form-consent { grid-template-columns: auto 1fr; align-items: start; gap: 0.6rem; }
.form-consent label { font-weight: 400; line-height: 1.5; }

/* Text first, colour second: an error is a message, not just a red edge. */
.field-error {
  color: var(--rose);
  font-size: 0.92rem;
  margin: 0;
}

/* The honeypot lives off-screen rather than display:none, which some
 * automation checks for. It is also out of the tab order and autofill. */
.form-decoy {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-submit {
  font: inherit;
  font-weight: 600;
  color: var(--deep);
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  justify-self: start;
}

.form-submit:hover, .form-submit:focus-visible { background: var(--accent-bright); }
