/* ==========================================================================
   Givlia — one-page site
   Brand: Givlia blue #003C8C and arch gray #505050, taken from the logo.
   ========================================================================== */

:root {
  --blue: #003C8C;
  --blue-deep: #0A2350;
  --blue-soft: #DDE6F3;
  --gray: #505050;
  --paper: #F4F6FA;
  --white: #FFFFFF;
  --text: #283040;
  --text-muted: #5B6475;
  --line: #D5DCE7;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
  --radius-lg: 20px;
  --radius-md: 12px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3 {
  margin: 0 0 0.5em;
  font-family: var(--serif);
  font-weight: 600;
  color: var(--blue-deep);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 1.6rem + 3.8vw, 4.5rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.04; }
h2 { font-size: clamp(1.875rem, 1.4rem + 2vw, 3rem); }
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: 0; }

a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--blue-deep); }

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

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  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: 1rem; top: -100px; z-index: 100;
  background: var(--blue); color: var(--white);
  padding: 0.6rem 1rem; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--white); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-small { min-height: 42px; padding: 0.55rem 1.15rem; font-size: 0.9375rem; }

.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-deep); color: var(--white); }

.btn-quiet { color: var(--blue); border-color: var(--line); background: var(--white); }
.btn-quiet:hover { border-color: var(--blue); color: var(--blue); }

.btn-light { background: var(--white); color: var(--blue); }
.btn-light:hover { background: var(--blue-soft); color: var(--blue-deep); }

.btn-outline-light { color: var(--white); border-color: rgba(255,255,255,.5); }
.btn-outline-light:hover { border-color: var(--white); color: var(--white); background: rgba(255,255,255,.08); }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.actions-center { justify-content: center; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.brand img { width: auto; height: 40px; }

.site-nav ul { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.25rem); }
.site-nav a:not(.btn) {
  position: relative;
  color: var(--text);
  font-weight: 500;
  font-size: 0.9875rem;
  text-decoration: none;
  padding: 0.5rem 0;
}
.site-nav a:not(.btn)::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0.15rem;
  height: 2px; background: var(--blue);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.site-nav a:not(.btn):hover { color: var(--blue); }
.site-nav a.is-active { color: var(--blue); }
.site-nav a.is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0; border-radius: 10px;
  background: transparent; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block; width: 22px; height: 2px;
  background: var(--blue-deep); border-radius: 2px;
  transition: transform .25s ease, background-color .2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

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

.hero {
  background: linear-gradient(180deg, var(--paper) 0%, var(--white) 100%);
  padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.lede {
  max-width: 36rem;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: var(--text-muted);
}
.hero-note {
  margin-top: 1.75rem;
  max-width: 30rem;
  padding-left: 1rem;
  border-left: 3px solid var(--blue-soft);
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 55% 50%;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -30px rgba(10, 35, 80, .45);
}

/* Features: shared ------------------------------------------------------- */

.feature { padding: var(--section-y) 0; }
.feature p { max-width: 38rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.split-reverse > :first-child { order: 2; }

/* Simple: the A→B paths -------------------------------------------------- */

.feature-simple { padding-top: clamp(2rem, 4vw, 3rem); }

.simple-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  grid-template-areas:
    "copy figure"
    "channels channels";
  gap: clamp(2rem, 5vw, 4rem) clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.simple-copy { grid-area: copy; }
.path-figure { grid-area: figure; }
.channels { grid-area: channels; }

.path-figure {
  background: var(--blue);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2.5rem);
}
.paths { width: 100%; overflow: visible; }
.path-row + .path-row { margin-top: clamp(1.5rem, 4vw, 2.5rem); }
.path-label { margin: 0 0 0.75rem; font-size: 0.9375rem; font-weight: 600; color: var(--white); }
.path-label-muted { color: rgba(255,255,255,.7); font-weight: 500; }
.node { fill: var(--white); }
.node-muted, .arrow-muted { fill: rgba(255,255,255,.55); }
.arrow { fill: var(--white); }
.line {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.line-straight { stroke: var(--white); }
.line-tangled { stroke: rgba(255,255,255,.55); stroke-width: 5; }

/* Drawing animation: runs once, when the figure scrolls into view. */
.js .line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .arrow { opacity: 0; transition: opacity .3s ease; }
.js .path-figure.is-drawn .line-straight { animation: draw .7s ease-out .2s forwards; }
.js .path-figure.is-drawn .line-tangled  { animation: draw 2.6s ease-in-out .2s forwards; }
.js .path-figure.is-drawn .arrow:not(.arrow-muted) { opacity: 1; transition-delay: .85s; }
.js .path-figure.is-drawn .arrow-muted { opacity: 1; transition-delay: 2.75s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}
.channels li { display: flex; gap: 1rem; align-items: flex-start; }
.channels h3 { margin-bottom: 0.3rem; }
.channels p { font-size: 0.9875rem; color: var(--text-muted); }
.icon {
  flex: none;
  width: 44px; height: 44px; padding: 10px;
  border-radius: 12px;
  background: var(--blue-soft);
  fill: none; stroke: var(--blue); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Recurring: belief vs. reality bars ------------------------------------- */

.feature-recurring { background: var(--paper); }

.gap-chart {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: 0 1px 0 var(--line);
}
.bar-row + .bar-row { margin-top: 1.75rem; }
.bar-label { display: block; margin-bottom: 0.6rem; font-size: 0.9375rem; color: var(--text-muted); }
.bar {
  width: var(--w);
  min-width: 7rem;
  height: 3.5rem;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 1.1rem;
  border-radius: 10px;
  font: 700 1.5rem/1 var(--serif);
}
.bar-believed {
  border: 2px dashed var(--blue);
  color: var(--blue);
  background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(0,60,140,.05) 10px 20px);
}
.bar-actual { background: var(--blue); color: var(--white); }
.gap-chart figcaption {
  margin-top: 1.75rem; padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem; color: var(--text);
}

/* Administration ---------------------------------------------------------- */

.checklist { display: grid; gap: 0.25rem; }
.checklist li {
  position: relative;
  padding: 1.1rem 0 1.1rem 3rem;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
}
.checklist li:last-child { border-bottom: 0; }
.checklist strong { color: var(--blue-deep); font-weight: 600; }
.checklist li::before {
  content: "";
  position: absolute; left: 0; top: 1.05rem;
  width: 1.9rem; height: 1.9rem;
  border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 60% no-repeat;
}

/* Testimonials ----------------------------------------------------------- */

.stories {
  background: var(--blue-deep);
  color: var(--white);
  padding: var(--section-y) 0;
}
.stories-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.stories h2 { color: var(--white); }
.stories-intro p { color: rgba(255,255,255,.72); max-width: 20rem; }

.carousel { display: flex; flex-direction: column; }
.carousel-viewport { min-height: 14rem; }
.slide blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.375rem, 1.05rem + 1.4vw, 2.125rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--white);
  text-wrap: pretty;
}
.slide blockquote::before { content: "\201C"; }
.slide blockquote::after { content: "\201D"; }
.slide figcaption {
  margin-top: 1.5rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
}
.slide figcaption::before { content: ""; display: inline-block; width: 2rem; height: 2px; margin-right: 0.75rem; vertical-align: middle; background: rgba(255,255,255,.5); }
.js .slide.is-entering { animation: slide-in .45s ease both; }
@keyframes slide-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

.carousel-controls { display: flex; align-items: center; gap: 1rem; margin-top: 2.5rem; }
.carousel-btn {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.35); border-radius: 50%;
  background: transparent; cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.carousel-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--white); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.carousel-btn:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.carousel-btn:focus-visible { outline-color: var(--white); }
.carousel-count { margin: 0; min-width: 4.5rem; text-align: center; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.75); font-size: 0.9375rem; }

/* About ------------------------------------------------------------------ */

.about { padding: var(--section-y) 0; background: var(--paper); }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.about-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 40% 50%;
  border-radius: var(--radius-lg);
}
.about-copy p { max-width: 36rem; }
.mission {
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  line-height: 1.4;
  color: var(--blue);
}
.quiet-quote {
  margin: 2.25rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  max-width: 34rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.quiet-quote p { margin-bottom: 0.4rem; font-style: italic; }
.quiet-quote cite { font-style: normal; font-weight: 600; color: var(--gray); }

/* Call to action --------------------------------------------------------- */

.cta {
  background: var(--blue);
  color: var(--white);
  padding: var(--section-y) 0;
  text-align: center;
}
.cta-inner { max-width: 48rem; }
.cta-arch { width: min(240px, 60%); margin: 0 auto 1.5rem; fill: none; stroke: rgba(255,255,255,.45); stroke-width: 6; stroke-linecap: round; }
.cta h2 { color: var(--white); }
.cta p { color: rgba(255,255,255,.82); font-size: 1.125rem; max-width: 34rem; margin-inline: auto; }
.cta .cta-note { margin-top: 1.25rem; font-size: 0.9375rem; color: rgba(255,255,255,.72); }
.cta-note a { color: var(--white); }
.cta-note a:hover { color: var(--blue-soft); }

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

.site-footer { padding: 3rem 0; border-top: 1px solid var(--line); }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.5rem 2rem;
}
.footer-logo { width: auto; height: 34px; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; }
.site-footer a { color: var(--text); text-decoration: none; font-size: 0.9375rem; }
.site-footer a:hover { color: var(--blue); text-decoration: underline; }
.copyright { margin: 0; width: 100%; font-size: 0.875rem; color: var(--text-muted); }

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

@media (min-width: 1600px) {
  :root { --wrap: 1280px; }
}

@media (max-width: 960px) {
  .channels { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .brand img { height: 34px; }

  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -20px rgba(10,35,80,.25);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gutter) 1.25rem; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav li:last-child { border-bottom: 0; padding-top: 1rem; }
  .site-nav a:not(.btn) { display: block; padding: 0.95rem 0; font-size: 1.0625rem; }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav .btn { width: 100%; min-height: 48px; }

  .hero-grid,
  .split,
  .stories-grid,
  .about-grid { grid-template-columns: 1fr; }
  .stories-grid { gap: 1.5rem; }
  .simple-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "figure" "channels";
  }
  .split-reverse > :first-child { order: 0; }
  .hero-media { order: -1; }
  .hero-media img { aspect-ratio: 16 / 10; }
  .about-media img { aspect-ratio: 16 / 10; }
}

@media (max-width: 520px) {
  .actions .btn { flex: 1 1 100%; }
  .bar { height: 3rem; font-size: 1.25rem; }
  .path-label { font-size: 19px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js .line { stroke-dashoffset: 0; }
  .js .arrow { opacity: 1; }
}

@media print {
  .site-header, .carousel-controls, .cta .actions { display: none; }
  .slide[hidden] { display: block !important; margin-bottom: 1.5rem; }
  .stories, .cta { background: none; color: var(--text); }
  .slide blockquote, .cta h2, .cta p { color: var(--text); }
}
