/* ============================================================
   RAHME & ASSOCIATES — Design System
   ------------------------------------------------------------
   Aesthetic: editorial luxury × architectural confidence
   Type:      Instrument Serif (display) / DM Sans (UI) / 
              JetBrains Mono (labels)
   Palette:   warm ivory ground, deep charcoal ink, burnt sienna accent
   ============================================================ */

:root {
  /* Color — warm tonal palette */
  --bg:          oklch(0.965 0.008 85);   /* ivory */
  --bg-2:        oklch(0.935 0.012 82);   /* deeper sand */
  --bg-3:        oklch(0.895 0.014 82);   /* warm beige */
  --ink:         oklch(0.18 0.008 70);    /* near-black charcoal */
  --ink-2:       oklch(0.32 0.008 70);    /* secondary */
  --muted:       oklch(0.50 0.006 70);    /* muted body */
  --hairline:    oklch(0.82 0.010 75);    /* hairline divider */
  --hairline-2:  oklch(0.72 0.010 75);    /* stronger divider */
  --dark:        oklch(0.16 0.006 65);    /* dark sections */
  --dark-2:      oklch(0.22 0.006 65);
  --on-dark:     oklch(0.94 0.008 85);
  --on-dark-mu:  oklch(0.72 0.008 80);
  --accent:      oklch(0.52 0.14 145);    /* brand green — deeper */
  --accent-2:    oklch(0.68 0.16 145);    /* brand green — brighter (for dark bg) */

  /* Type */
  --serif:  "Instrument Serif", "Times New Roman", Times, serif;
  --sans:   "DM Sans", system-ui, -apple-system, sans-serif;
  --mono:   "JetBrains Mono", ui-monospace, monospace;

  /* Scale */
  --gutter: clamp(20px, 4vw, 56px);
  --maxw:   1440px;
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11";
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
hr { border: 0; border-top: 1px solid var(--hairline); margin: 0; }

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

/* Type primitives ------------------------------------------------ */
.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 0.96;
  font-feature-settings: "ss01";
}
.display em { font-style: italic; color: var(--accent); }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.eyebrow .num {
  color: var(--muted);
  margin-right: 10px;
}
.lead {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.45;
  color: var(--ink-2);
  font-weight: 400;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}

h1, h2, h3, h4 { margin: 0; font-weight: 400; }

/* Layout primitives --------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 1100px; }
.section { padding: clamp(64px, 9vw, 140px) 0; }
.section--tight { padding: clamp(48px, 6vw, 88px) 0; }
.divider { height: 1px; background: var(--hairline); }

/* Nav ----------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 var(--gutter);
  background: color-mix(in oklch, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid color-mix(in oklch, var(--hairline) 60%, transparent);
}
.nav__row {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav__brand {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
}
.nav__brand-mark {
  width: 32px; height: 32px;
  background: url("logo-transparent.png") center/contain no-repeat;
  flex-shrink: 0;
}
.nav__brand-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 1px solid var(--hairline);
  padding-left: 14px;
  margin-left: 4px;
}
.nav__links {
  display: flex; gap: 36px; align-items: center;
  list-style: none; margin: 0; padding: 0;
}
.nav__links a {
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
}
.nav__links a[aria-current="page"]::after,
.nav__links a:hover::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--ink);
}
.nav__actions {
  display: flex; align-items: center; gap: 20px;
}
.nav__login {
  font-size: 13px;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  white-space: nowrap;
  padding: 6px 0;
}
.nav__login:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.nav__cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  background: var(--ink); color: var(--bg);
  font-size: 13px; letter-spacing: -0.005em;
  border-radius: 999px;
  transition: background 0.25s ease;
}
.nav__cta:hover { background: var(--accent); }
.nav__cta svg { width: 12px; height: 12px; }
.nav__progress {
  position: absolute; left: 0; bottom: 0;
  height: 1px; background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
}

/* Buttons -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 24px;
  font-size: 14px; letter-spacing: -0.005em;
  border-radius: 999px;
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--accent); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--hairline-2); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--on-dark { background: var(--on-dark); color: var(--dark); }
.btn--on-dark:hover { background: var(--accent); color: var(--on-dark); }
.btn .arrow { width: 14px; height: 14px; }

/* Footer --------------------------------------------------------- */
.footer {
  background: var(--dark);
  color: var(--on-dark);
  padding: 80px var(--gutter) 32px;
}
.footer__inner { max-width: var(--maxw); margin: 0 auto; }
.footer__logo {
  width: 60px; height: 60px;
  background: url("logo-transparent.png") center/contain no-repeat;
  filter: brightness(1.45) saturate(1.05);
  margin-bottom: 20px;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid color-mix(in oklch, var(--on-dark) 12%, transparent);
}
.footer__mark {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.footer__mark em { font-style: italic; color: var(--accent-2); }
.footer__motto {
  font-size: 14px;
  color: var(--on-dark-mu);
  max-width: 320px;
  line-height: 1.55;
}
.footer__col h5 {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--on-dark-mu);
  margin: 0 0 20px;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer__col a { font-size: 15px; color: var(--on-dark); }
.footer__col a:hover { color: var(--accent-2); }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-mu);
}
.footer__bottom a:hover { color: var(--accent-2); }

/* Reveal animations ---------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s cubic-bezier(.22,.61,.36,1), transform 0.9s cubic-bezier(.22,.61,.36,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }

/* Image placeholders -------------------------------------------- */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(45deg,
      color-mix(in oklch, var(--ink) 6%, transparent),
      color-mix(in oklch, var(--ink) 6%, transparent) 1px,
      transparent 1px, transparent 9px),
    var(--bg-3);
  border: 1px solid var(--hairline);
  overflow: hidden;
  color: var(--ink-2);
}
.ph--dark {
  background:
    repeating-linear-gradient(45deg,
      color-mix(in oklch, var(--on-dark) 6%, transparent),
      color-mix(in oklch, var(--on-dark) 6%, transparent) 1px,
      transparent 1px, transparent 9px),
    var(--dark-2);
  border-color: color-mix(in oklch, var(--on-dark) 14%, transparent);
  color: var(--on-dark-mu);
}
.ph__label {
  position: absolute;
  inset: auto auto 12px 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--bg);
  color: var(--ink);
  padding: 4px 8px;
  border: 1px solid var(--hairline);
}
.ph--dark .ph__label {
  background: var(--dark);
  color: var(--on-dark);
  border-color: color-mix(in oklch, var(--on-dark) 18%, transparent);
}
.ph__corner {
  position: absolute; top: 12px; right: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

/* Form controls -------------------------------------------------- */
.field {
  display: block;
  position: relative;
  border-bottom: 1px solid var(--hairline-2);
  padding: 22px 0 14px;
  transition: border-color 0.2s ease;
}
.field:focus-within { border-color: var(--ink); }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 18px;
  color: var(--ink);
  padding: 4px 0;
  resize: vertical;
}
.field textarea { min-height: 80px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 0.6; }

.checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.chk {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.chk:hover { border-color: var(--ink); }
.chk input { display: none; }
.chk__dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid var(--hairline-2);
  display: inline-grid; place-items: center;
  flex-shrink: 0;
}
.chk__dot::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink); transform: scale(0); transition: transform 0.15s;
}
.chk input:checked ~ .chk__dot::after { transform: scale(1); }
.chk:has(input:checked) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chk:has(input:checked) .chk__dot { border-color: var(--bg); }
.chk:has(input:checked) .chk__dot::after { background: var(--bg); }

/* Range slider ------------------------------------------------- */
.range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 3px;
  background: var(--hairline-2);
  border-radius: 99px; outline: 0;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); cursor: pointer;
  border: 4px solid var(--bg);
  box-shadow: 0 0 0 1px var(--ink);
}
.range::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); cursor: pointer;
  border: 4px solid var(--bg);
}

/* Tag */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-2);
}
.tag::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

/* Image-backed hero ------------------------------------------- */
.hero-image {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--dark);
}
.hero-image__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-image__media image-slot {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-image__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      color-mix(in oklch, var(--dark) 65%, transparent) 0%,
      color-mix(in oklch, var(--dark) 35%, transparent) 35%,
      color-mix(in oklch, var(--dark) 78%, transparent) 100%),
    linear-gradient(90deg,
      color-mix(in oklch, var(--dark) 55%, transparent) 0%,
      transparent 55%);
}
.hero-image__noise {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  opacity: 0.35;
  background:
    repeating-linear-gradient(0deg,
      color-mix(in oklch, var(--on-dark) 3%, transparent) 0 1px,
      transparent 1px 3px);
  mix-blend-mode: overlay;
}
.hero-image > .wrap,
.hero-image > .pg-hero__inner,
.hero-image > .hero__inner,
.hero-image > .hero__meta,
.hero-image .hero-image__content {
  position: relative;
  z-index: 3;
}

/* Page-hero image variant ------------------------------------- */
.pg-hero.hero-image {
  background: var(--dark);
  color: var(--on-dark);
  padding-top: clamp(160px, 18vw, 220px);
  padding-bottom: clamp(64px, 8vw, 120px);
}
.pg-hero.hero-image .pg-hero__crumb { color: color-mix(in oklch, var(--on-dark) 55%, transparent); }
.pg-hero.hero-image .pg-hero__crumb a:hover { color: var(--on-dark); }
.pg-hero.hero-image .pg-hero__crumb span[data-current] { color: var(--on-dark); }
.pg-hero.hero-image h1 { color: var(--on-dark); }
.pg-hero.hero-image h1 em { color: var(--accent-2); }
.pg-hero.hero-image .pg-hero__sub { color: var(--on-dark-mu); }
.pg-hero.hero-image .pg-hero__bar { border-top-color: color-mix(in oklch, var(--on-dark) 22%, transparent); }
.pg-hero.hero-image .pg-hero__bar .k { color: color-mix(in oklch, var(--on-dark) 55%, transparent); }
.pg-hero.hero-image .pg-hero__bar .v { color: var(--on-dark); }
.pg-hero.hero-image .pg-hero__bar .v em { color: var(--accent-2); }
.pg-hero.hero-image .pg-hero__side { border-left-color: color-mix(in oklch, var(--on-dark) 18%, transparent); }
.pg-hero.hero-image .pg-hero__side h4 { color: color-mix(in oklch, var(--on-dark) 55%, transparent); }
.pg-hero.hero-image .pg-hero__side p { color: var(--on-dark-mu); }
.pg-hero.hero-image .pg-hero__side .quote { color: var(--on-dark); border-left-color: var(--accent-2); }
.pg-hero.hero-image .channels { border-color: color-mix(in oklch, var(--on-dark) 18%, transparent); }
.pg-hero.hero-image .channel { border-left-color: color-mix(in oklch, var(--on-dark) 18%, transparent); background: color-mix(in oklch, var(--dark) 35%, transparent); backdrop-filter: blur(8px); }
.pg-hero.hero-image .channel:hover { background: color-mix(in oklch, var(--dark) 55%, transparent); }
.pg-hero.hero-image .channel__label { color: color-mix(in oklch, var(--on-dark) 55%, transparent); }
.pg-hero.hero-image .channel__value { color: var(--on-dark); }
.pg-hero.hero-image .channel__sub { color: var(--on-dark-mu); }


  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--dark);
}
.hero-image__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-image__media image-slot {
  display: block;
  width: 100%;
  height: 100%;
  --is-bg: var(--dark-2);
}
.hero-image__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      color-mix(in oklch, var(--dark) 65%, transparent) 0%,
      color-mix(in oklch, var(--dark) 35%, transparent) 35%,
      color-mix(in oklch, var(--dark) 78%, transparent) 100%),
    linear-gradient(90deg,
      color-mix(in oklch, var(--dark) 55%, transparent) 0%,
      transparent 55%);
}
.hero-image__noise {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  opacity: 0.35;
  background:
    repeating-linear-gradient(0deg,
      color-mix(in oklch, var(--on-dark) 3%, transparent) 0 1px,
      transparent 1px 3px);
  mix-blend-mode: overlay;
}
.hero-image > .wrap,
.hero-image > .pg-hero__inner,
.hero-image > .hero__inner,
.hero-image > .hero__meta,
.hero-image .hero-image__content {
  position: relative;
  z-index: 3;
}

/* Responsive ---------------------------------------------------- */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 600px) {
  .nav__row { height: 60px; }
  .nav__brand-sub { display: none; }
  .footer__top { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}
