/* ==========================================================================
   Luminhood — design system
   Single stylesheet, no dependencies, no webfonts. Light + dark.
   ========================================================================== */

:root {
  /* Palette — warm paper and ink, with a low-saturation amber for light */
  --paper:        #FBF9F5;
  --paper-raised: #FFFFFF;
  --paper-sunk:   #F4F1EA;
  --ink:          #17140F;
  --ink-soft:     #5B5348;
  --ink-faint:    #8B8275;
  --line:         #E7E1D6;
  --line-strong:  #D6CEC0;
  --accent:       #9C6222;
  --accent-hover: #7E4E19;
  --accent-wash:  #F3E9DB;
  --glow:         rgba(206, 152, 82, 0.26);
  --shadow:       0 1px 2px rgba(35, 26, 12, 0.04), 0 8px 24px -12px rgba(35, 26, 12, 0.12);

  /* Type */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Rhythm */
  --measure: 34rem;
  --wrap: 68rem;
  --radius: 14px;
  --radius-sm: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:        #100F0D;
    --paper-raised: #171512;
    --paper-sunk:   #0B0A09;
    --ink:          #F2EEE6;
    --ink-soft:     #A8A092;
    --ink-faint:    #7A7264;
    --line:         #2A2621;
    --line-strong:  #3A342C;
    --accent:       #E0A468;
    --accent-hover: #EFBB86;
    --accent-wash:  #241C13;
    --glow:         rgba(224, 164, 96, 0.16);
    --shadow:       0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.004em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.018em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.16s ease;
}
a:hover { color: var(--accent-hover); text-decoration: underline; }

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

img, svg { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1em 0.36em;
}

::selection { background: var(--accent-wash); color: var(--ink); }

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section + .section { padding-top: 0; }
.section--edged { border-top: 1px solid var(--line); padding-top: clamp(3.5rem, 8vw, 6.5rem); }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1rem;
  font-family: var(--font-sans);
}

.lede {
  font-size: clamp(1.06rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--paper); }
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand__mark { width: 1.35rem; height: 1.35rem; color: var(--accent); flex: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2.4vw, 1.9rem);
}
.site-nav a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.002em;
}
.site-nav a:hover { color: var(--ink); text-decoration: none; }

@media (max-width: 34rem) {
  .site-nav a { font-size: 0.84rem; }
  .brand__label { display: none; }
}

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

.hero {
  position: relative;
  padding-block: clamp(4rem, 11vw, 8.5rem) clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
}

/* The "light under a shelter" motif — soft, off-center, never a gradient wash */
.hero::before {
  content: "";
  position: absolute;
  top: -26rem;              /* anchored to the hero, not the viewport, so the
                               glow sits in the same place at any window height */
  left: 50%;
  width: min(72rem, 145vw);
  aspect-ratio: 1;
  transform: translateX(-52%);
  background: radial-gradient(circle at center, var(--glow) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.hero > * { position: relative; z-index: 1; }

.hero__title {
  font-size: clamp(2.35rem, 6.2vw, 4.1rem);
  max-width: 20ch;
  margin-bottom: 1.5rem;
}

.hero__sub {
  font-size: clamp(1.06rem, 1.85vw, 1.28rem);
  line-height: 1.58;
  color: var(--ink-soft);
  max-width: 42rem;
  margin-bottom: 2.25rem;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 550;
  padding: 0.68rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) {
  .btn--primary:hover { color: #17140F; }
}

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

/* --------------------------------------------------------------------------
   Cards & grids
   -------------------------------------------------------------------------- */

.section__head { max-width: var(--measure); margin-bottom: clamp(2rem, 4vw, 2.75rem); }
.section__title { font-size: clamp(1.6rem, 3.2vw, 2.15rem); margin-bottom: 0.85rem; }

.grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.card {
  background: var(--paper);
  padding: clamp(1.5rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card__index {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.card__title { font-size: 1.28rem; }
.card__summary { color: var(--ink); font-weight: 500; margin: 0; }
.card__body { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* Products */
.products {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.6rem;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.product-card:hover { border-color: var(--line-strong); transform: translateY(-2px); text-decoration: none; }
.product-card__name { font-size: 1.2rem; color: var(--ink); }
.product-card__tagline { color: var(--ink-soft); font-size: 0.95rem; margin: 0; flex: 1; }
.product-card__more { color: var(--accent); font-size: 0.9rem; font-weight: 550; }

.tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-wash);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

/* Principles — a numbered editorial list, not another card grid */
.principles { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.principle {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 0 1rem;
  padding-block: 1.6rem;
  border-top: 1px solid var(--line);
}
.principle:last-child { border-bottom: 1px solid var(--line); }
.principle__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
  padding-top: 0.42rem;
}
.principle__title { font-size: 1.15rem; margin-bottom: 0.4rem; }
.principle__body { color: var(--ink-soft); font-size: 0.97rem; max-width: 44rem; margin: 0; }

@media (max-width: 32rem) {
  .principle { grid-template-columns: 1fr; gap: 0.35rem; }
  .principle__num { padding-top: 0; }
}

/* Callout */
.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--paper-raised);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.35rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Prose (long-form pages: about, privacy, terms)
   -------------------------------------------------------------------------- */

.page-header { padding-block: clamp(3rem, 8vw, 5rem) 0; }
.page-header__title { font-size: clamp(2rem, 4.6vw, 3rem); margin-bottom: 0.9rem; }
.page-header__meta { color: var(--ink-faint); font-size: 0.9rem; }

.prose {
  max-width: 40rem;
  padding-block: clamp(2rem, 5vw, 3rem) clamp(3.5rem, 8vw, 6rem);
  color: var(--ink-soft);
}
.prose h2 {
  font-size: 1.45rem;
  color: var(--ink);
  margin-top: 2.6rem;
  margin-bottom: 0.85rem;
}
.prose h3 {
  font-size: 1.12rem;
  color: var(--ink);
  margin-top: 1.9rem;
  margin-bottom: 0.6rem;
}
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.3rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--ink-faint); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose blockquote {
  margin: 1.5rem 0;
  padding-left: 1.1rem;
  border-left: 2px solid var(--line-strong);
  color: var(--ink-faint);
}
.prose table { width: 100%; border-collapse: collapse; font-size: 0.94rem; margin-bottom: 1.5rem; }
.prose th, .prose td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); }
.prose th { color: var(--ink); font-weight: 600; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* --------------------------------------------------------------------------
   Product detail
   -------------------------------------------------------------------------- */

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 4rem);
  padding-block: clamp(2rem, 5vw, 3rem) clamp(3.5rem, 8vw, 6rem);
}
@media (max-width: 48rem) {
  .detail-grid { grid-template-columns: 1fr; }
}

.spec {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  padding: 1.4rem 1.5rem;
  align-self: start;
  position: sticky;
  top: 6rem;
}
@media (max-width: 48rem) { .spec { position: static; } }

.spec dl { margin: 0; display: grid; gap: 0.9rem; }
.spec dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.15rem;
}
.spec dd { margin: 0; font-size: 0.95rem; color: var(--ink); }

.feature-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.7rem; }
.feature-list li {
  display: grid;
  grid-template-columns: 6px 1fr;
  gap: 0.8rem;
  align-items: start;
  color: var(--ink-soft);
}
.feature-list li::before {
  content: "";
  width: 6px; height: 6px;
  margin-top: 0.62rem;
  border-radius: 50%;
  background: var(--accent);
}

.back-link {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}
.back-link:hover { color: var(--ink); text-decoration: none; }

/* --------------------------------------------------------------------------
   Contact / CTA band
   -------------------------------------------------------------------------- */

.band {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  padding: clamp(2rem, 5vw, 3.25rem);
  box-shadow: var(--shadow);
}
.band__title { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.75rem; }
.band__body { color: var(--ink-soft); max-width: var(--measure); margin-bottom: 1.75rem; }

.mail-link {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}
.mail-link:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 3rem;
  margin-top: auto;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  align-items: baseline;
  justify-content: space-between;
}
.site-footer__legal { color: var(--ink-faint); font-size: 0.87rem; }
.site-footer__legal p { margin: 0 0 0.3rem; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.site-footer__links a { color: var(--ink-soft); font-size: 0.87rem; }
.site-footer__links a:hover { color: var(--ink); text-decoration: none; }

/* Sticky footer. Kept out of the base `body` rule so the scroll container
   stays on the document — never on <body>. */
body { display: flex; flex-direction: column; min-height: 100vh; }
@supports (min-height: 100dvh) { body { min-height: 100dvh; } }
main { flex: 1 0 auto; }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.notfound { padding-block: clamp(5rem, 14vw, 9rem); text-align: center; }
.notfound__code { font-family: var(--font-mono); color: var(--ink-faint); font-size: 0.85rem; letter-spacing: 0.1em; }
.notfound h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin: 0.75rem 0 1rem; }
.notfound p { color: var(--ink-soft); max-width: 30rem; margin-inline: auto; margin-bottom: 2rem; }

@media print {
  .site-header, .site-footer, .actions { display: none; }
  body { background: #fff; color: #000; }
}
