/* Stranded Solutions — site styles */
:root {
  /* Light theme (default) */
  --bg: #FAF7F2;
  --paper: #F5F1EA;
  --surface: #FFFFFF;
  --ink: #0B1F33;
  --ink-2: #2B3F54;
  --muted: #6B7589;
  --rule: #E5DFD3;
  --rule-strong: #D6CDB9;
  --navy: #0F2B46;
  --navy-2: #163A5F;
  --blue: #4A90E2;
  --blue-soft: #7DAEE8;
  --blue-tint: #E8F0FA;
  --accent: #4A90E2;

  --serif: "Source Serif 4", "Source Serif Pro", "Iowan Old Style", "Apple Garamond", Georgia, serif;
  --sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 56px);

  --shadow-1: 0 1px 2px rgba(15, 43, 70, 0.04), 0 4px 16px rgba(15, 43, 70, 0.06);
  --shadow-2: 0 8px 32px rgba(15, 43, 70, 0.08);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #08182A;
  --paper: #0F2B46;
  --surface: #112E4A;
  --ink: #F5F1EA;
  --ink-2: #C9D3E1;
  --muted: #8DA0B8;
  --rule: rgba(245, 241, 234, 0.10);
  --rule-strong: rgba(245, 241, 234, 0.18);
  --navy: #F5F1EA;
  --navy-2: #C9D3E1;
  --blue: #7DAEE8;
  --blue-soft: #4A90E2;
  --blue-tint: rgba(125, 174, 232, 0.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--muted);
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.012em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
.serif { font-family: var(--serif); }
.italic { font-style: italic; }

p { margin: 0 0 1em; color: var(--ink-2); text-wrap: pretty; }

/* ==================== NAV ==================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--rule); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 32px; height: 32px; }
.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-name .sub {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  display: block;
  margin-top: -2px;
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: 14.5px;
  font-weight: 450;
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--ink); background: var(--paper); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.theme-toggle:hover { background: var(--paper); color: var(--ink); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--navy);
  color: var(--bg);
}
[data-theme="dark"] .btn-primary { background: var(--blue); color: #0B1F33; }
.btn-primary:hover { background: var(--blue); color: white; }
[data-theme="dark"] .btn-primary:hover { background: #F5F1EA; color: #0B1F33; }

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

.btn-arrow svg { width: 14px; height: 14px; transition: transform 0.25s var(--ease); }
.btn:hover .btn-arrow svg, .btn:hover svg.arrow { transform: translateX(3px); }

/* ==================== HERO ==================== */
.hero {
  padding: clamp(80px, 14vh, 160px) 0 clamp(60px, 10vh, 120px);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.hero-eyebrow {
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(44px, 6.4vw, 88px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.024em;
  margin-bottom: 28px;
}
.hero h1 .em {
  font-style: italic;
  font-weight: 400;
  color: var(--blue);
}
.hero-lede {
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--ink-2);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.55;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 520px;
  margin-left: auto;
}

.hero-meta {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.hero-meta .item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-meta .k {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.hero-meta .v {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* ==================== SECTIONS ==================== */
section { padding: clamp(80px, 12vh, 140px) 0; position: relative; }
.section-head {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(40px, 6vw, 96px);
  margin-bottom: 64px;
  align-items: end;
}
.section-head h2 {
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: 400;
  letter-spacing: -0.022em;
  line-height: 1.04;
}
.section-head h2 .em { font-style: italic; color: var(--blue); }
.section-head .desc {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 480px;
  line-height: 1.55;
}
.section-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

/* ==================== ABOUT ==================== */
.about {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.about-text h2 {
  font-size: clamp(34px, 4vw, 52px);
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}
.about-text h2 .em { font-style: italic; color: var(--blue); }
.about-text p {
  font-size: 17px;
  margin-bottom: 16px;
}
.values {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--rule-strong);
}
.value {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule-strong);
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 24px;
  align-items: start;
}
.value .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--blue);
  padding-top: 5px;
}
.value h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.value p { margin: 0; font-size: 15.5px; color: var(--ink-2); }

/* ==================== SERVICES ==================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.service {
  background: var(--bg);
  padding: 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: background 0.3s var(--ease);
  min-height: 220px;
}
.service:hover { background: var(--paper); }
.service.featured {
  grid-column: span 6;
  background: var(--navy);
  color: var(--paper);
  min-height: 260px;
}
[data-theme="dark"] .service.featured { background: var(--blue); color: #0B1F33; }
.service.featured:hover { background: var(--navy-2); }
[data-theme="dark"] .service.featured:hover { background: #5B98D8; }

.service.col-3 { grid-column: span 3; }
.service.col-4 { grid-column: span 4; }
.service.col-6 { grid-column: span 6; }

.service .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.service.featured .num { color: var(--blue-soft); }
[data-theme="dark"] .service.featured .num { color: rgba(11, 31, 51, 0.7); }

.service h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.15;
}
.service.featured h3 { font-size: 36px; color: var(--paper); }
[data-theme="dark"] .service.featured h3 { color: #0B1F33; }
.service h3 .em { font-style: italic; color: var(--blue); }
.service.featured h3 .em { color: var(--blue-soft); }
[data-theme="dark"] .service.featured h3 .em { color: var(--navy); }

.service p {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0;
}
.service.featured p { color: rgba(245, 241, 234, 0.78); }
[data-theme="dark"] .service.featured p { color: rgba(11, 31, 51, 0.78); }

.service .icon {
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
}
.service .meta-tag {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  padding-top: 16px;
}
.service.featured .meta-tag { color: var(--blue-soft); }
[data-theme="dark"] .service.featured .meta-tag { color: var(--navy); }

/* ==================== PROCESS ==================== */
.process {
  border-top: 1px solid var(--rule);
}
.process-list {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--rule);
}
.process-step {
  display: grid;
  grid-template-columns: 80px 1fr 2fr 200px;
  gap: 32px;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
  transition: background 0.3s;
}
.process-step:hover { background: var(--paper); }
.process-step .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--blue);
  padding-top: 6px;
}
.process-step h3 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.012em;
}
.process-step p { font-size: 15.5px; margin: 0; }
.process-step .timing {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: right;
  padding-top: 10px;
}

/* ==================== CASE STUDIES ==================== */
.cases {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.case {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.case:hover {
  transform: translateY(-3px);
  border-color: var(--blue);
  box-shadow: var(--shadow-2);
}
.case-visual {
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  background: var(--navy);
  margin: -36px -36px 0;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  position: relative;
}
.case-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.case-meta-row .industry { color: var(--blue); }
.case h3 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.12;
}
.case h3 .em { font-style: italic; color: var(--blue); }
.case p { font-size: 15px; color: var(--ink-2); margin: 0; }
.case .stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  margin-top: auto;
}
.case .stat .k {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
  display: block;
}
.case .stat .v {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ==================== CONTACT ==================== */
.contact {
  background: var(--navy);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .contact { background: #061322; }
.contact h2 { color: var(--paper); }
.contact .desc { color: rgba(245, 241, 234, 0.72); }
.contact .eyebrow { color: var(--blue-soft); }
.contact .eyebrow::before { background: var(--blue-soft); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.contact-side {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 32px;
  border-top: 1px solid rgba(245, 241, 234, 0.12);
}
.contact-info .row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  font-size: 14.5px;
}
.contact-info .row .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-soft);
  padding-top: 3px;
}
.contact-info .row .v { color: var(--paper); }
.contact-info .row a:hover { color: var(--blue-soft); }

.contact-form {
  background: rgba(245, 241, 234, 0.04);
  border: 1px solid rgba(245, 241, 234, 0.12);
  border-radius: 6px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.field { display: flex; flex-direction: column; gap: 8px; position: relative; }
.field label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-soft);
  display: flex;
  justify-content: space-between;
}
.field label .req { color: rgba(245, 241, 234, 0.4); }
.field input, .field textarea, .field select {
  font-family: var(--sans);
  font-size: 15px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245, 241, 234, 0.22);
  padding: 8px 0 12px;
  color: var(--paper);
  outline: none;
  border-radius: 0;
  resize: none;
  transition: border-color 0.2s;
}
.field textarea { min-height: 100px; }
.field input:focus, .field textarea:focus, .field select:focus { border-bottom-color: var(--blue-soft); }
.field input::placeholder, .field textarea::placeholder { color: rgba(245, 241, 234, 0.36); }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.field select option { background: var(--navy); color: var(--paper); }
.field.error input, .field.error textarea, .field.error select { border-bottom-color: #E27474; }
.field .err-msg {
  font-family: var(--mono);
  font-size: 10.5px;
  color: #E89A9A;
  letter-spacing: 0.06em;
  min-height: 14px;
  opacity: 0;
  transition: opacity 0.2s;
}
.field.error .err-msg { opacity: 1; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

.budget-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  border: 1px solid rgba(245, 241, 234, 0.18);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  transition: all 0.2s;
}
.chip:hover { border-color: var(--blue-soft); }
.chip.active {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.form-submit {
  margin-top: 8px;
  padding: 16px 24px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.form-submit:hover { background: var(--blue-soft); }
.form-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.form-submit.success { background: #4FA76F; }

.form-success {
  background: rgba(79, 167, 111, 0.10);
  border: 1px solid rgba(79, 167, 111, 0.4);
  color: #A8D9BA;
  padding: 16px;
  border-radius: 4px;
  font-size: 14px;
  display: none;
}
.form-success.show { display: block; }

/* ==================== FOOTER ==================== */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--rule);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}
.footer-brand { max-width: 320px; }
.footer-brand p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 16px;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14.5px; color: var(--ink-2); transition: color 0.2s; }
.footer-col a:hover { color: var(--blue); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ==================== ANIMATIONS ==================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
.reveal.d5 { transition-delay: 0.40s; }

@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-8px) rotate(0.5deg); }
}
@keyframes draw-strand {
  from { stroke-dashoffset: 600; }
  to { stroke-dashoffset: 0; }
}
.strand-anim path {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: draw-strand 2.4s var(--ease) forwards;
}
.strand-anim path:nth-child(2) { animation-delay: 0.2s; }
.strand-anim path:nth-child(3) { animation-delay: 0.4s; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 980px) {
  .hero-grid, .section-head, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 380px; margin: 20px auto 0; }
  .hero-meta { grid-template-columns: repeat(2, 1fr); }
  .cases-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .service.col-3, .service.col-4, .service.col-6, .service.featured { grid-column: span 12; }
  .process-step { grid-template-columns: 60px 1fr; }
  .process-step .timing { display: none; }
  .process-step p { grid-column: 2; }
  .field-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}
