/* ==========================================================================
   FlexCycle Solutions — Base
   Reset, base typography, layout primitives.
   ========================================================================== */

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-300);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

/* A standing atmosphere behind the whole page: patina drawn toward the top,
   a trace of copper at the foot. Gives the flat field depth so the section
   veils read as light on a surface rather than as painted panels.
   position:fixed keeps it a single composited layer — it never repaints on
   scroll, unlike background-attachment:fixed. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(94, 162, 152, 0.07), transparent 70%),
    radial-gradient(ellipse 75% 45% at 50% 108%, rgba(199, 111, 61, 0.05), transparent 70%);
}

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

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-tight);
  font-weight: 600;
  margin: 0 0 var(--space-4);
  color: var(--text);
}

h1 { font-size: var(--fs-900); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-700); }
h3 { font-size: var(--fs-600); }
h4 { font-size: var(--fs-500); }

p { margin: 0 0 var(--space-4); max-width: 62ch; }
p.lead { font-size: var(--fs-400); color: var(--text-soft); }

ul, ol { padding-left: 1.2em; }

a {
  color: var(--structure);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover { color: var(--accent); }
/* The contact address is long; let it wrap on narrow phones instead of overflowing. */
a[href^="mailto:"] { overflow-wrap: anywhere; }

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

::selection { background: var(--copper); color: var(--paper); }

button, input, textarea, select { font: inherit; color: inherit; }

/* ---- Utilities ---- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-100);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 1.5em;
  height: 1px;
  margin-right: var(--space-2);
  vertical-align: 0.3em;
  background: currentColor;
}

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

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100%;
  background: var(--dark-900);
  color: var(--paper);
  padding: var(--space-3) var(--space-5);
  z-index: 1000;
  border-radius: var(--radius-md);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--space-4); }

/* The section blooms below are wider than the viewport on phones (130 %);
   clip sideways only, so they still bleed up into the previous section. */
main { overflow-x: clip; }

section { padding-block: var(--space-9); }
@media (max-width: 640px) {
  section { padding-block: var(--space-7); }
}

/* --------------------------------------------------------------------------
   Section transitions

   Both modifiers used to paint a flat block (--bg-alt, and a light sage
   island for .section-contrast). Two opaque blocks meeting produces a hard
   horizontal seam, and a stack of those seams is exactly what makes a page
   look assembled from a template kit.

   The tonal shift now rides on a gradient that is fully transparent at 0%
   and 100%, so it grows out of the page and dissolves back into it. Nothing
   changes abruptly, so there is no line to see.
   -------------------------------------------------------------------------- */
.section-alt,
.section-contrast {
  position: relative;
  isolation: isolate;
}

.section-alt {
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--surface-veil) 22%,
    var(--surface-veil) 78%,
    transparent 100%
  );
}

.section-contrast {
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--surface-veil-strong) 20%,
    var(--surface-veil-strong) 80%,
    transparent 100%
  );
}

/* Where a section begins, a wide soft bloom rather than an edge: the entry
   is marked by light falling off in every direction, which cannot band. */
.section-alt::before,
.section-contrast::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  left: 50%;
  transform: translate(-50%, -45%);
  width: min(1240px, 130%);
  height: clamp(220px, 30vw, 400px);
  background: radial-gradient(ellipse at center, var(--seam-bloom), transparent 68%);
  pointer-events: none;
}

/* No type overrides here any more: the section sits on the same dark ground
   as everything else, so headings, body copy and links keep the page-wide
   treatment. Only the background distinguishes it. */

hr.rule {
  border: 0;
  height: 2px;
  background: var(--gradient-patina);
  margin-block: var(--space-8);
}

.grid { display: grid; gap: var(--space-6); }

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