/* SunWave Resources — design system */

:root {
  /* sand / desert */
  --sand-50:  #FBF7F0;
  --sand-100: #F4ECDC;
  --sand-150: #EEE3CC;
  --sand-200: #E5D6B6;
  --sand-300: #C9B58A;

  /* ink */
  --ink:       #15110D;
  --ink-soft:  #3A332B;
  --ink-mute:  #6B6356;
  --ink-faint: #9A8F7E;

  /* brand */
  --sun:       #D6391E;  /* logo red */
  --sun-deep:  #A82A14;
  --clay:      #C97D4A;
  --amber:     #E89B3C;

  /* permian blue / water */
  --water:        #1E5F8C;
  --water-deep:   #0E2E4A;
  --water-darker: #081C2E;
  --water-light:  #BFD8E8;
  --water-mid:    #5B9BC4;
  --signal:       #34D399;
  --warn:         #F59E0B;
  --alarm:        #EF4444;

  --r-sm: 4px;
  --r:    8px;
  --r-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(21,17,13,0.06);
  --shadow:    0 4px 16px rgba(21,17,13,0.08);
  --shadow-lg: 0 12px 40px rgba(21,17,13,0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--sand-50);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* type */
.serif { font-family: 'Instrument Serif', 'Times New Roman', serif; font-weight: 400; letter-spacing: -0.01em; }
.mono  { font-family: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace; }

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; }
h1 { font-size: clamp(48px, 7.5vw, 110px); line-height: 0.95; }
h2 { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.02; }
h3 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.15; }

p { margin: 0; text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--sun);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: 1px;
}

/* layout */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) { .container { padding: 0 20px; } }

.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .section-sm { padding: 40px 0; }
}

.divider {
  height: 1px;
  background: var(--sand-200);
  width: 100%;
}

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 240, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sand-200);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.nav-logo img {
  height: 36px;
  width: auto;
  display: block;
}
.nav-logo .nav-tag {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-left: 12px;
  margin-left: 4px;
  border-left: 1px solid var(--sand-200);
  line-height: 1.3;
}
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-link {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 450;
  color: var(--ink-soft);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.nav-link:hover { background: var(--sand-100); color: var(--ink); }
.nav-link.active { color: var(--ink); }
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background: var(--sun);
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--ink);
  color: var(--sand-50);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-sm);
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--sun); }
.nav-cta .pulse {
  width: 7px; height: 7px;
  background: var(--signal);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--sand-200);
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--ink);
  font-size: 18px;
}
@media (max-width: 920px) {
  .nav-links { display: none; }
  .nav-cta   { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--sand-50);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--sand-200);
    box-shadow: var(--shadow);
  }
  .nav-links.open .nav-link { width: 100%; padding: 14px 16px; }
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  cursor: pointer;
  border: none;
  transition: transform 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.btn-primary {
  background: var(--ink);
  color: var(--sand-50);
}
.btn-primary:hover { background: var(--sun); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--sand-50); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 10px 0;
}
.btn-ghost:hover { color: var(--sun); }

.arrow {
  display: inline-block;
  transition: transform 0.2s;
}
.btn:hover .arrow,
a:hover .arrow { transform: translateX(3px); }

/* hero */
.hero {
  position: relative;
  padding: 80px 0 120px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: end;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
.hero h1 .italic {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--sun);
}
.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-stat .num {
  font-family: 'Instrument Serif', serif;
  font-size: 56px;
  line-height: 1;
  color: var(--water-deep);
}
.hero-stat .label {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 85% 20%, rgba(214, 57, 30, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(30, 95, 140, 0.06) 0%, transparent 40%);
}

/* sun arc decorative */
.sun-arc {
  position: absolute;
  right: -120px;
  top: -200px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--sun) 0%, var(--sun) 55%, transparent 60%);
  opacity: 0.08;
  pointer-events: none;
}

/* cards */
.card {
  background: #fff;
  border: 1px solid var(--sand-200);
  border-radius: var(--r);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.service-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  background: var(--sand-100);
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  padding: 32px 32px 28px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s;
}
.service-card:hover {
  background: #fff;
  border-color: var(--ink);
  transform: translateY(-3px);
}
.service-card .num {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.12em;
}
.service-card h3 {
  margin: 14px 0 8px;
  font-family: 'Instrument Serif', serif;
  font-size: 36px;
  font-weight: 400;
}
.service-card p {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 28px;
  max-width: 36ch;
}
.service-card .more {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sun);
  display: flex; align-items: center; gap: 8px;
}

/* feature list */
.feature-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--sand-200);
}
.feature-row:last-child { border-bottom: 1px solid var(--sand-200); }
.feature-row .k {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: 4px;
}
.feature-row h4 {
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  font-weight: 400;
  margin-bottom: 6px;
}
.feature-row p {
  color: var(--ink-soft);
  max-width: 60ch;
}
@media (max-width: 720px) {
  .feature-row { grid-template-columns: 1fr; gap: 8px; }
}

/* placeholder image */
.img-placeholder {
  position: relative;
  background: var(--sand-150);
  background-image:
    repeating-linear-gradient(135deg,
      transparent 0px,
      transparent 14px,
      rgba(21,17,13,0.04) 14px,
      rgba(21,17,13,0.04) 15px);
  border: 1px solid var(--sand-200);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}
.img-placeholder .ph-inner {
  padding: 12px 16px;
  background: rgba(251, 247, 240, 0.85);
  border-radius: var(--r-sm);
}

/* page intro (sub-pages) */
.page-intro {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--sand-200);
}
.page-intro .crumbs {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 24px;
}
.page-intro .crumbs a:hover { color: var(--sun); }
.page-intro h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 400;
  max-width: 14ch;
}
.page-intro .lead {
  margin-top: 24px;
  font-size: 20px;
  color: var(--ink-soft);
  max-width: 60ch;
  line-height: 1.5;
}

/* footer */
footer {
  background: var(--ink);
  color: var(--sand-150);
  padding: 80px 0 32px;
  margin-top: 0;
}
footer h4 {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
  font-weight: 500;
}
footer a, footer .f-line {
  color: var(--sand-150);
  display: block;
  padding: 4px 0;
  font-size: 15px;
}
footer a:hover { color: var(--sun); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
footer .f-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid #2C2620;
  display: flex;
  justify-content: space-between;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
@media (max-width: 720px) {
  footer .f-bottom { flex-direction: column; gap: 12px; }
}

/* metric strip */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--sand-200);
  border-bottom: 1px solid var(--sand-200);
}
@media (max-width: 720px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
}
.metric {
  padding: 32px 28px;
  border-right: 1px solid var(--sand-200);
}
.metric:last-child { border-right: none; }
@media (max-width: 720px) {
  .metric:nth-child(2) { border-right: none; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--sand-200); }
}
.metric .v {
  font-family: 'Instrument Serif', serif;
  font-size: 56px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.metric .v .u {
  font-family: 'Geist', sans-serif;
  font-size: 16px;
  color: var(--ink-mute);
  margin-left: 6px;
  font-weight: 400;
}
.metric .k {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 10px;
}

/* split sections */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 920px) {
  .split { grid-template-columns: 1fr; gap: 48px; }
}

/* big quote / pull */
.pull {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 24ch;
}
.pull em { color: var(--sun); font-style: italic; }

/* dark section variants */
.section-dark {
  background: var(--water-darker);
  color: var(--sand-150);
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--sand-50); }
.section-dark .eyebrow { color: var(--water-light); }
.section-dark .eyebrow .dot { background: var(--signal); }

.section-sand-deep {
  background: var(--sand-100);
}

/* form */
input, textarea, select {
  font-family: inherit;
  font-size: 15px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--sand-200);
  background: #fff;
  border-radius: var(--r-sm);
  color: var(--ink);
  transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--ink);
}
label {
  display: block;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}

.field { margin-bottom: 20px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

/* tag/chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--sand-100);
  border: 1px solid var(--sand-200);
  color: var(--ink-soft);
}
.chip-blue { background: rgba(30,95,140,0.08); border-color: rgba(30,95,140,0.2); color: var(--water); }
.chip-sun  { background: rgba(214,57,30,0.08); border-color: rgba(214,57,30,0.2); color: var(--sun); }
.chip-live { background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.3); color: #0F5132; }

/* dark mode override */
body.dark {
  background: #0c0a08;
  color: var(--sand-150);
}
body.dark .nav { background: rgba(12,10,8,0.85); border-bottom-color: #2a241d; }
body.dark .nav-link { color: var(--sand-150); }
body.dark .nav-link:hover { background: #1c1814; color: #fff; }
body.dark .nav-link.active { color: #fff; }
body.dark .nav-cta { background: var(--sand-50); color: var(--ink); }
body.dark .card { background: #15110d; border-color: #2a241d; }
body.dark .service-card { background: #15110d; }
body.dark .service-card:hover { background: #1c1814; border-color: var(--sand-150); }
body.dark .img-placeholder { background-color: #1a1611; border-color: #2a241d; }
body.dark .img-placeholder .ph-inner { background: rgba(12,10,8,0.85); }
body.dark .feature-row { border-color: #2a241d; }
body.dark .btn-primary { background: var(--sand-50); color: var(--ink); }
body.dark .btn-secondary { color: var(--sand-150); border-color: var(--sand-150); }
body.dark .nav-logo .nav-tag { color: var(--sand-150); border-color: #2a241d; }
body.dark .section-sand-deep { background: #15110d; }
body.dark .metrics { border-color: #2a241d; }
body.dark .metric { border-color: #2a241d; }
body.dark .metric .v { color: var(--sand-50); }
body.dark input, body.dark textarea, body.dark select {
  background: #15110d; border-color: #2a241d; color: var(--sand-150);
}
body.dark .chip { background: #15110d; border-color: #2a241d; color: var(--sand-150); }
body.dark .divider { background: #2a241d; }
body.dark .page-intro { border-color: #2a241d; }
body.dark .hero-stat .num { color: var(--water-light); }
