/* ==========================================================================
   Glowyr Inc. — site styles
   Single stylesheet, no build step. Light and dark themes.
   ========================================================================== */

:root {
  --bg:            #ffffff;
  --bg-alt:        #f5f8f8;
  --bg-invert:     #0d1520;
  --ink:           #0d1520;
  --ink-soft:      #33414f;
  --muted:         #5d6d7c;
  --line:          #e1e8ec;
  --line-strong:   #cdd8de;
  --accent:        #0e7a63;
  --accent-deep:   #0a5a49;
  --accent-soft:   #e6f2ee;
  --on-invert:     #eef3f4;
  --on-invert-mut: #9fb0b6;

  --wrap: 1140px;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(13, 21, 32, .06), 0 1px 1px rgba(13, 21, 32, .04);
  --shadow-md: 0 12px 30px -18px rgba(13, 21, 32, .45), 0 2px 6px -3px rgba(13, 21, 32, .08);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0b1117;
    --bg-alt:        #111a21;
    --bg-invert:     #060b0f;
    --ink:           #e9eff2;
    --ink-soft:      #c4d0d7;
    --muted:         #93a3ad;
    --line:          #1f2b34;
    --line-strong:   #2c3b46;
    --accent:        #3fb79b;
    --accent-deep:   #6bd0b8;
    --accent-soft:   #10261f;
    --on-invert:     #e9eff2;
    --on-invert-mut: #93a3ad;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-md: 0 14px 34px -20px rgba(0, 0, 0, .9), 0 2px 6px -3px rgba(0, 0, 0, .5);
  }
}

/* --------------------------------------------------------------- base ---- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 .6em;
}

h1 { font-size: clamp(2.15rem, 1.4rem + 2.9vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.15rem); letter-spacing: -0.015em; }
h3 { font-size: 1.24rem; letter-spacing: -0.01em; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.15rem; }
a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
code { font-family: var(--mono); font-size: .9em; background: var(--bg-alt); padding: .1em .35em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

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

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: .7rem 1.1rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

.eyebrow {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

.lede {
  font-size: clamp(1.08rem, 1rem + .45vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 58ch;
}

/* ------------------------------------------------------------- buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1;
  padding: .78rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: var(--bg);
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }

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

.btn--sm { padding: .55rem .95rem; font-size: .88rem; }

.btn--ghost { background: transparent; border-color: transparent; padding-left: 0; padding-right: 0; color: var(--accent-deep); }
.btn--ghost:hover { transform: none; color: var(--accent); text-decoration: underline; }

/* -------------------------------------------------------------- header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.brand:hover { color: var(--ink); }
.logomark { width: 26px; height: 26px; color: var(--accent); flex: none; }
.brand__name { white-space: nowrap; }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

@media (max-width: 860px) {
  .site-header__inner { flex-wrap: wrap; padding-top: .7rem; padding-bottom: .7rem; row-gap: .55rem; min-height: 0; }
  .site-nav { width: 100%; }
  .site-nav ul { width: 100%; justify-content: space-between; gap: .75rem; }
  .site-nav a { font-size: .85rem; white-space: nowrap; }
  .site-nav .btn { display: none; }
}

@media (max-width: 380px) {
  .site-nav a { font-size: .8rem; }
}

/* ---------------------------------------------------------------- hero --- */

.hero {
  padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60rem 26rem at 12% -12%, var(--accent-soft), transparent 65%),
    var(--bg);
}
.hero h1 { max-width: 17ch; margin-bottom: 1.4rem; }
.hero .lede { margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 3rem 4rem;
  align-items: center;
}

.hero__panel {
  padding: 1.9rem 2rem .4rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.hero__panel-title {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .4rem;
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero h1 { max-width: 20ch; }
}

/* --------------------------------------------------------------- facts --- */

.facts { margin: 0; }
.facts__item { padding: 1.15rem 0; border-top: 1px solid var(--line); }
.facts__item:first-child { border-top: 0; padding-top: .6rem; }
.facts dt {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 .25rem;
  letter-spacing: -0.01em;
}
.facts dd { margin: 0; font-size: .92rem; color: var(--muted); line-height: 1.5; }

/* --------------------------------------------------------------- proof --- */

.proof {
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}
.proof__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.proof__item {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1.45rem 2rem 1.45rem 0;
}
.proof__item + .proof__item {
  border-left: 1px solid var(--line);
  padding-left: 2rem;
}
.proof__item strong {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
}
.proof__item span {
  font-size: .86rem;
  line-height: 1.45;
  color: var(--muted);
}

@media (max-width: 760px) {
  .proof__grid { grid-template-columns: 1fr; padding-top: .35rem; padding-bottom: .35rem; }
  .proof__item { padding: 1rem 0; }
  .proof__item + .proof__item { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
}

/* -------------------------------------------------------------- bands ---- */

.band { padding: clamp(3.5rem, 6vw, 5.5rem) 0; }
.band--alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.band__head { max-width: 62ch; margin-bottom: 3rem; }
.band__head p { color: var(--muted); margin-bottom: 0; }

/* ------------------------------------------------------------ pillars ---- */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 1.75rem;
}

.pillar {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.pillar:hover { box-shadow: var(--shadow-md); border-color: var(--line-strong); transform: translateY(-2px); }
.pillar__icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.pillar__icon svg { width: 22px; height: 22px; }
.pillar h3 { font-size: 1.35rem; margin-bottom: .7rem; }
.pillar p { color: var(--ink-soft); font-size: 1rem; }
.pillar__list {
  list-style: none;
  margin: .4rem 0 1.5rem;
  padding: 0;
  border-top: 1px solid var(--line);
}
.pillar__list li {
  position: relative;
  padding: .55rem 0 .55rem 1.4rem;
  font-size: .95rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.pillar__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.15em;
  width: .42rem; height: .42rem;
  border-radius: 50%;
  background: var(--accent);
}
.pillar .btn--ghost { margin-top: auto; align-self: flex-start; }

/* --------------------------------------------------------- principles ---- */

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2.5rem 3rem;
  counter-reset: principle;
}
.principle { border-top: 2px solid var(--ink); padding-top: 1.1rem; }
.principle h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.principle p { color: var(--muted); font-size: .97rem; margin: 0; }

/* ---------------------------------------------------------------- team --- */

.team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
  margin: 2.5rem 0 0;
}
.team-member {
  display: flex;
  gap: 1.5rem;
  padding: 1.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}
.team-avatar {
  width: 92px; height: 92px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
.team-avatar--initials {
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--accent);
  background: var(--accent-soft);
  border-color: transparent;
}
.team-member h3 { margin: 0 0 .15rem; font-size: 1.2rem; }
.team-role {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .8rem;
}
.team-member p:last-child { margin-bottom: 0; }
.team-info p { font-size: .97rem; color: var(--ink-soft); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .9rem 0 0; padding: 0; list-style: none; }
.tags li {
  font-size: .78rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  padding: .2rem .65rem;
}

@media (max-width: 520px) {
  .team-member { flex-direction: column; }
}

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

.contact {
  background: var(--bg-invert);
  color: var(--on-invert);
  border-top: 1px solid var(--line);
  padding: clamp(3.5rem, 6vw, 5.5rem) 0;
}
.contact h2 { color: var(--on-invert); max-width: 18ch; }
.contact p { color: var(--on-invert-mut); max-width: 52ch; }
.contact__inner {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 3rem;
  align-items: center;
}
.contact__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.contact .btn { background: transparent; border-color: rgba(255,255,255,.28); color: var(--on-invert); }
.contact .btn:hover { border-color: #fff; color: #fff; }
.contact .btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.contact .btn--primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.contact__note { font-size: .9rem; color: var(--on-invert-mut); margin: 0; }

@media (max-width: 820px) {
  .contact__inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* ----------------------------------------------------------- page head --- */

.page-head {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 3vw, 2.75rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(50rem 20rem at 8% -20%, var(--accent-soft), transparent 62%),
    var(--bg);
}
.page-head h1 { max-width: 22ch; margin-bottom: 1rem; }
.page-head .lede { margin-bottom: 0; }

/* --------------------------------------------------------------- prose --- */

.prose {
  max-width: 70ch;
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 5vw, 4.5rem);
}
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.prose h2:first-of-type { margin-top: 1rem; }
.prose h3 { margin-top: 2rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul, .prose ol { padding-left: 1.15rem; margin: 0 0 1.3rem; }
.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--accent); }
.prose blockquote {
  margin: 2rem 0;
  padding: .3rem 0 .3rem 1.4rem;
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.5;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.page-body-wide { padding: clamp(2rem, 4vw, 3rem) 0 clamp(3rem, 5vw, 4.5rem); }
.page-body-wide > :first-child { margin-top: 0; }

/* ----------------------------------------------------------------- toc --- */

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: 4rem;
  align-items: start;
}
.page-grid .prose { max-width: 68ch; }

.toc {
  position: sticky;
  top: 6rem;
  padding: clamp(2.5rem, 5vw, 4rem) 0 0;
}
.toc__title {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .85rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--line);
}
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin-bottom: .6rem; }
.toc a {
  display: block;
  font-size: .88rem;
  line-height: 1.35;
  color: var(--muted);
  text-decoration: none;
}
.toc a:hover { color: var(--accent); }

@media (max-width: 940px) {
  .page-grid { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
}

/* ------------------------------------------------------------ cta band --- */

.band--cta {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding: clamp(2.5rem, 4vw, 3.5rem) 0;
}
.band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}
.band--cta h2 { font-size: 1.5rem; margin-bottom: .35rem; }
.band--cta p { margin: 0; color: var(--muted); }

/* -------------------------------------------------------------- footer --- */

.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding-top: 3.25rem;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}
.site-footer__brand p {
  color: var(--muted);
  font-size: .95rem;
  max-width: 40ch;
  margin: 1rem 0 0;
}
.brand--footer { font-size: 1.1rem; }
.site-footer__col h2 {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .9rem;
}
.site-footer__col ul { list-style: none; margin: 0; padding: 0; }
.site-footer__col li { margin-bottom: .5rem; }
.site-footer__col a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; }
.site-footer__col a:hover { color: var(--accent); text-decoration: underline; }

.site-footer__legal { border-top: 1px solid var(--line); padding-top: 1.25rem; padding-bottom: 1.5rem; }
.site-footer__legal p { margin: 0; font-size: .85rem; color: var(--muted); }

@media (max-width: 720px) {
  .site-footer__inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------------------------------------------------------------- misc --- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
