/* RiseMark — The Baseline (Light Theme) */
:root {
  --limestone: #F4F0E8;
  --graphite: #16181D;
  --spruce: #0F3B34;
  --chartreuse: #CDF04A;
  --clay: #C4573B;
  --stone: #7C7A72;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --max-width: 72rem;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--graphite);
  background: var(--limestone);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--spruce);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--clay); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin-top: 0;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.625rem); }

.label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.surface-limestone { background: var(--limestone); color: var(--graphite); }
.surface-spruce { background: var(--spruce); color: var(--limestone); }
.surface-graphite { background: var(--graphite); color: var(--limestone); }
.surface-chartreuse { background: var(--chartreuse); color: var(--graphite); }

.surface-spruce a:not(.btn),
.surface-graphite a:not(.btn) { color: var(--chartreuse); }

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: var(--chartreuse);
  color: var(--graphite);
  z-index: 9999;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.skip-link:focus { top: var(--space-sm); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--limestone);
  border-bottom: 1px solid rgba(22, 24, 29, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  gap: var(--space-md);
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--graphite);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span { color: var(--spruce); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--graphite);
  padding: 0.4rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--graphite);
}

.main-nav ul {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.main-nav a {
  color: var(--graphite);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--spruce);
  text-decoration: underline;
}

.main-nav a.btn,
.main-nav a.btn:hover {
  text-decoration: none;
}

.main-nav a.btn-primary {
  color: var(--limestone);
}

.main-nav a.btn-primary:hover {
  color: var(--limestone);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--spruce);
  color: var(--limestone);
  border-color: var(--spruce);
}

.btn-primary:hover {
  background: var(--graphite);
  border-color: var(--graphite);
  color: var(--limestone);
}

.btn-secondary {
  background: transparent;
  color: var(--spruce);
  border-color: var(--spruce);
}

.btn-secondary:hover {
  background: var(--spruce);
  color: var(--limestone);
}

.btn-chartreuse {
  background: var(--chartreuse);
  color: var(--graphite);
  border-color: var(--chartreuse);
}

.btn-chartreuse:hover {
  background: var(--graphite);
  color: var(--chartreuse);
  border-color: var(--graphite);
}

.btn-clay {
  background: var(--clay);
  color: var(--limestone);
  border-color: var(--clay);
}

.btn-clay:hover {
  background: var(--graphite);
  border-color: var(--graphite);
  color: var(--limestone);
}

/* Hero — THE MARK */
.hero-mark {
  position: relative;
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background: var(--limestone);
}

.hero-mark-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 85vh;
  width: 100%;
}

.hero-mark-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg) var(--space-xl) max(1rem, calc((100vw - var(--max-width)) / 2 + 1rem));
  position: relative;
  z-index: 2;
}

.hero-mark-visual {
  position: relative;
  overflow: hidden;
}

.hero-mark-visual img {
  width: 120%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  margin-left: -10%;
  min-height: 85vh;
}

.baseline-motif {
  position: absolute;
  bottom: 15%;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--spruce);
  z-index: 3;
}

.baseline-motif::before,
.baseline-motif::after {
  content: '';
  position: absolute;
  top: -6px;
  width: 2px;
  height: 15px;
  background: var(--spruce);
}

.baseline-motif::before { left: 0; }
.baseline-motif::after { right: 20%; }

.baseline-ticks {
  position: absolute;
  bottom: calc(15% - 4px);
  left: 5%;
  right: 25%;
  display: flex;
  justify-content: space-between;
  z-index: 4;
  pointer-events: none;
}

.baseline-ticks span {
  width: 1px;
  height: 8px;
  background: var(--stone);
  display: block;
}

.hero-the-mark {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.15em;
  color: var(--stone);
  margin-bottom: var(--space-sm);
}

.hero-mark h1 { max-width: 14ch; margin-bottom: var(--space-md); }

.hero-mark .lead {
  font-size: 1.1875rem;
  max-width: 38ch;
  color: var(--stone);
  margin-bottom: var(--space-lg);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* Sections */
.section { padding: var(--space-2xl) 0; }

.section-header {
  margin-bottom: var(--space-xl);
  max-width: 42rem;
}

.section-header .label { color: var(--stone); margin-bottom: var(--space-xs); display: block; }

/* One Number Band */
.one-number-band {
  padding: var(--space-xl) 0;
  text-align: center;
}

.one-number-band .number-display {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--chartreuse);
  margin: var(--space-sm) 0;
}

.one-number-band p { max-width: 50ch; margin-inline: auto; opacity: 0.9; }

/* Illustrative Trio */
.trio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.trio-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  margin-bottom: var(--space-md);
}

.trio-card h3 { margin-bottom: var(--space-xs); }

/* Capability Rows */
.capability-rows { display: flex; flex-direction: column; gap: 0; }

.capability-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid rgba(22, 24, 29, 0.1);
  align-items: start;
}

.capability-row:first-child { border-top: 1px solid rgba(22, 24, 29, 0.1); }

.capability-row .label { color: var(--spruce); }

.capability-row h3 { margin-bottom: var(--space-xs); }

/* Method Steps */
.method-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  counter-reset: method;
}

.method-step {
  counter-increment: method;
  position: relative;
  padding-top: var(--space-md);
}

.method-step::before {
  content: counter(method, decimal-leading-zero);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--clay);
  display: block;
  margin-bottom: var(--space-sm);
}

/* Work Teaser */
.work-teaser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.work-teaser-card {
  position: relative;
  overflow: hidden;
}

.work-teaser-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.work-teaser-card figcaption {
  padding: var(--space-md) 0;
}

/* Mini FAQ */
.mini-faq details {
  border-bottom: 1px solid rgba(22, 24, 29, 0.1);
  padding: var(--space-md) 0;
}

.mini-faq summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mini-faq summary::-webkit-details-marker { display: none; }

.mini-faq summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--spruce);
}

.mini-faq details[open] summary::after { content: '−'; }

.mini-faq p { margin: var(--space-sm) 0 0; color: var(--stone); }

/* CTA Band */
.cta-band {
  padding: var(--space-2xl) 0;
  text-align: center;
}

.cta-band h2 { margin-bottom: var(--space-sm); }

.cta-band p {
  max-width: 45ch;
  margin: 0 auto var(--space-lg);
  opacity: 0.85;
}

.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--space-sm); }

/* Page Hero (inner pages) */
.page-hero {
  padding: var(--space-xl) 0 var(--space-lg);
}

.page-hero .label { color: var(--stone); margin-bottom: var(--space-xs); display: block; }

.page-hero h1 { margin-bottom: var(--space-sm); }

.page-hero .lead {
  font-size: 1.125rem;
  color: var(--stone);
  max-width: 55ch;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.service-block img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  margin-bottom: var(--space-md);
}

/* Work Grid */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.work-item img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  margin-bottom: var(--space-md);
}

.work-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--stone);
  margin-bottom: var(--space-xs);
}

/* About Layout */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.about-split img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.about-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.value-card {
  padding: var(--space-md);
  border: 1px solid rgba(22, 24, 29, 0.1);
}

.value-card h3 { font-size: 1.125rem; }

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.contact-info address {
  font-style: normal;
  line-height: 1.8;
}

.contact-info dl {
  margin: var(--space-lg) 0 0;
}

.contact-info dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--stone);
  margin-top: var(--space-md);
}

.contact-info dd { margin: 0.25rem 0 0; }

.contact-form-wrap img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  margin-bottom: var(--space-lg);
}

/* Forms */
.form-group { margin-bottom: var(--space-md); }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9375rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid rgba(22, 24, 29, 0.2);
  background: var(--limestone);
  color: var(--graphite);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: 2px solid var(--spruce);
  outline-offset: 2px;
}

.form-group textarea { min-height: 8rem; resize: vertical; }

.form-check {
  display: flex;
  gap: var(--space-xs);
  align-items: flex-start;
  font-size: 0.9375rem;
}

.form-check input { width: auto; margin-top: 0.3rem; }

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.form-message {
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  border: 1px solid;
}

.form-message.success {
  background: rgba(15, 59, 52, 0.08);
  border-color: var(--spruce);
  color: var(--spruce);
}

.form-message.error {
  background: rgba(196, 87, 59, 0.08);
  border-color: var(--clay);
  color: var(--clay);
}

/* FAQ Page */
.faq-list { max-width: 48rem; }

.faq-item {
  border-bottom: 1px solid rgba(22, 24, 29, 0.1);
  padding: var(--space-lg) 0;
}

.faq-item h2 {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.faq-team {
  margin-top: var(--space-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.faq-team img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

/* Legal / Prose */
.prose {
  max-width: 48rem;
  line-height: 1.75;
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.prose h3 {
  font-size: 1.1875rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.prose ul, .prose ol {
  padding-left: 1.5rem;
  margin: var(--space-md) 0;
}

.prose li { margin-bottom: 0.5rem; }

.prose p { margin: var(--space-md) 0; }

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(22, 24, 29, 0.1);
}

.legal-nav a {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(22, 24, 29, 0.15);
}

.legal-nav a[aria-current="page"] {
  background: var(--spruce);
  color: var(--limestone);
  border-color: var(--spruce);
}

/* 404 */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  text-align: center;
  padding: var(--space-2xl) 0;
}

.error-page h1 { margin-bottom: var(--space-md); }

.error-page p {
  color: var(--stone);
  max-width: 40ch;
  margin: 0 auto var(--space-lg);
}

/* Footer */
.site-footer {
  padding: var(--space-xl) 0 var(--space-lg);
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-brand .logo {
  display: inline-block;
  margin-bottom: var(--space-sm);
  color: var(--limestone);
}

.footer-brand .logo span { color: var(--chartreuse); }

.footer-brand p { color: var(--stone); font-size: 0.875rem; }

.footer-nav h3,
.footer-contact h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
  font-weight: 500;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li { margin-bottom: 0.5rem; }

.footer-nav a { text-decoration: none; color: inherit; }
.footer-nav a:hover { color: var(--chartreuse); }

.footer-contact address {
  font-style: normal;
  line-height: 1.7;
  font-size: 0.875rem;
}

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(244, 240, 232, 0.15);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-md);
  font-size: 0.8125rem;
  opacity: 0.75;
}

.footer-disclaimer {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: rgba(244, 240, 232, 0.06);
  font-size: 0.8125rem;
  line-height: 1.6;
  opacity: 0.85;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--graphite);
  color: var(--limestone);
  padding: var(--space-md);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}

.cookie-banner.visible,
.cookie-banner.is-visible { transform: translateY(0); }

.cookie-inner {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.cookie-text {
  flex: 1 1 20rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.cookie-text a { color: var(--chartreuse); }

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.cookie-actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.cookie-banner .btn-secondary {
  color: var(--limestone);
  border-color: rgba(244, 240, 232, 0.65);
  background: transparent;
}

.cookie-banner .btn-secondary:hover {
  background: rgba(244, 240, 232, 0.12);
  color: var(--limestone);
  border-color: var(--limestone);
}

.surface-spruce .btn-secondary,
.surface-graphite .btn-secondary {
  color: var(--limestone);
  border-color: rgba(244, 240, 232, 0.75);
}

.surface-spruce .btn-secondary:hover,
.surface-graphite .btn-secondary:hover {
  background: var(--limestone);
  color: var(--graphite);
  border-color: var(--limestone);
}

.surface-spruce .btn-chartreuse,
.surface-graphite .btn-chartreuse {
  color: var(--graphite);
}

.cookie-modal {
  position: fixed;
  inset: 0;
  background: rgba(22, 24, 29, 0.6);
  z-index: 1001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.cookie-modal.visible { display: flex; }

.cookie-modal-panel {
  background: var(--limestone);
  color: var(--graphite);
  padding: var(--space-lg);
  max-width: 28rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-modal-panel h2 {
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
}

.cookie-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(22, 24, 29, 0.1);
}

.cookie-option label { font-weight: 600; }

.cookie-option input[type="checkbox"]:disabled {
  opacity: 0.6;
}

.cookie-modal-actions {
  margin-top: var(--space-md);
  display: flex;
  gap: var(--space-sm);
}

/* Reveal animations */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-mark-inner,
  .trio-grid,
  .method-steps,
  .work-teaser-grid,
  .services-grid,
  .work-grid,
  .about-split,
  .about-values,
  .contact-layout,
  .faq-team,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-mark-visual img {
    min-height: 50vh;
    width: 100%;
    margin-left: 0;
  }

  .hero-mark-inner { min-height: auto; }
  .hero-mark { min-height: auto; }

  .capability-row { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--limestone);
    border-bottom: 1px solid rgba(22, 24, 29, 0.08);
    display: none;
    padding: var(--space-md);
  }

  .main-nav.open { display: block; }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .method-steps { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html { scroll-behavior: auto; }
}
