/* Spancode. Brand and layout follow the 14 Sep 2026 website concept
   (Drive: if-x20 / spancode / dist). The model and contact sections are added in the same style. */

:root {
  --ink: #171b19;
  --paper: #f3f5f0;
  --lime: #d4ff45;
  --muted: #a6ada6;
  --rule: #555e50;

  --ridge: #d4ff45;
  --hip: #f3f5f0;
  --valley: #87a8ff;
  --barge: #ff9d5c;
  --eave: #8d9a84;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 30px; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
}

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

a:focus-visible, button:focus-visible, [tabindex]:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 3px solid #87a8ff;
  outline-offset: 6px;
}

h1, h2, h3, p { margin: 0; }

/* Header */
header {
  height: 112px;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ffffff24;
}
.brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -1.8px;
  display: flex;
  align-items: center;
}
.brand-period { color: var(--lime); }
.mark { font-size: 50px; color: var(--lime); margin-right: 12px; line-height: 1; }

nav { display: flex; align-items: center; gap: 36px; font-size: 14px; }
nav a:hover { color: var(--lime); }
nav .nav-cta {
  border: 1px solid #71786e;
  border-radius: 4px;
  padding: 13px 18px;
  display: flex;
  gap: 32px;
}

/* Shared small labels */
.eyebrow, .section-label, .hero-foot, .card-top, .small-label, .viewer-bar, .readout dt {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  letter-spacing: 1.7px;
  font-weight: 500;
}
.section-label { margin-bottom: 44px; }

/* Hero */
.hero { padding: 66px 5% 0; position: relative; overflow: hidden; }
.eyebrow { display: flex; align-items: center; gap: 12px; }
.square { width: 9px; height: 9px; background: var(--lime); }

h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(60px, 8.65vw, 140px);
  font-weight: 500;
  letter-spacing: -.065em;
  line-height: 1.04;
  margin: 45px 0 34px;
}
.code-word { color: var(--lime); }
.cursor { font-weight: 400; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 56px;
}
.hero-bottom p { color: #bec4bb; font-size: 19px; line-height: 1.6; }
.circle-link {
  width: 68px;
  height: 68px;
  border: 1px solid #87917c;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  transition: background .2s, color .2s;
}
.circle-link:hover { background: var(--lime); color: var(--ink); }
.hero-foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 0;
  border-top: 1px solid #ffffff24;
  font-size: 12px;
  color: #b5bdb0;
}

/* Headings */
h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(38px, 4.3vw, 70px);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: 1.1;
}
h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -1.5px;
}

/* 01 Approach */
.approach, .team { background: var(--paper); color: var(--ink); padding: 80px 5%; }
.approach-main {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 10%;
  align-items: end;
}
.approach h2 span, .team h2 span, .contact h2 span { color: #757e70; }
.approach-main > p, .connection-heading > p { line-height: 1.7; font-size: 18px; max-width: 450px; }

.disciplines, .people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 60px;
  border: 1px solid #c8cfc2;
}
.people { grid-template-columns: repeat(3, 1fr); }
.disciplines article, .people article { padding: 36px 38px 30px; }
.people article + article { border-left: 1px solid #c8cfc2; }
.disciplines .software { background: var(--lime); border-left: 1px solid #c8cfc2; }
.people .software { background: var(--lime); }
.card-top { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 60px; }
.disciplines p, .people p { max-width: 440px; line-height: 1.7; margin-top: 23px; color: #485040; }
.people h3 { font-size: 32px; }

.tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 36px; }
.tags span { border: 1px solid #9faa91; padding: 8px 13px; border-radius: 2px; font-size: 14px; }

/* 02 Model */
.model { padding: 80px 5%; border-bottom: 1px solid #ffffff24; }
.model .section-label { color: var(--muted); }
.model-main {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 6%;
  align-items: center;
}
.model h2 span { color: #78866f; }
.model-copy p { color: #b6beb1; line-height: 1.7; font-size: 18px; max-width: 470px; margin-top: 28px; }
.model .tags span { border-color: var(--rule); }

.viewer { margin: 0; border: 1px solid var(--rule); }
.viewer-bar {
  display: flex;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule);
  font-size: 12px;
  color: #b5bdb0;
}
.viewer-hint { color: var(--lime); }
#roof {
  display: block;
  width: 100%;
  height: auto;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}
#roof.dragging { cursor: grabbing; }

.legend {
  list-style: none;
  margin: 0;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: #b6beb1;
}
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 18px; height: 3px; background: var(--c); }

.readout { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); }
.readout div { padding: 16px 20px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.readout div:nth-child(3n) { border-right: 0; }
.readout div:nth-last-child(-n + 3) { border-bottom: 0; }
.readout dt { font-size: 11px; color: #8d9a84; text-transform: uppercase; }
.readout dd {
  margin: 6px 0 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  letter-spacing: -.5px;
}

/* 03 Connection */
.connections { padding: 80px 5%; }
.connections .section-label { color: var(--muted); }
.connection-heading { display: flex; align-items: end; justify-content: space-between; gap: 50px; }
.connection-heading > p { color: #b6beb1; max-width: 340px; }

.workflow {
  margin-top: 58px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--rule);
}
.workflow button {
  background: transparent;
  color: var(--paper);
  border: 0;
  border-right: 1px solid var(--rule);
  padding: 24px;
  display: flex;
  gap: 18px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
}
.workflow button:last-child { border-right: 0; }
.workflow button span { font-family: 'Space Grotesk', sans-serif; font-size: 22px; flex: 1; }
.workflow button[aria-selected=true] { background: var(--lime); color: var(--ink); }
.workflow button:hover:not([aria-selected=true]) { background: #2a3027; }

.stage-panel {
  border: 1px solid var(--rule);
  border-top: 0;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 40px;
  align-items: center;
  min-height: 245px;
}
.small-label { color: var(--lime); font-size: 12px; display: block; margin-bottom: 19px; }
.stage-panel p { color: #b6beb1; line-height: 1.7; max-width: 370px; }
.stage-number {
  font-family: 'Space Grotesk', sans-serif;
  color: #78866f;
  font-size: 90px;
  font-weight: 400;
  letter-spacing: -6px;
}

/* 04 Contact */
.contact { background: var(--paper); color: var(--ink); padding: 80px 5%; }
.contact-main { display: grid; grid-template-columns: 1fr 1.1fr; gap: 8%; align-items: start; }
.contact-main p { line-height: 1.7; font-size: 18px; max-width: 450px; margin-top: 28px; color: #485040; }

.form { display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label {
  display: grid;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-weight: 500;
}
.form input, .form textarea {
  font: 16px 'DM Sans', sans-serif;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: transparent;
  border: 1px solid #9faa91;
  border-radius: 2px;
  padding: 13px 14px;
  width: 100%;
}
.form textarea { resize: vertical; }
.form input:focus-visible, .form textarea:focus-visible { outline-offset: 2px; }
.send {
  justify-self: start;
  display: flex;
  gap: 32px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 15px 20px;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.send:hover { background: var(--lime); color: var(--ink); }
.contact-main .form-note { margin: 0; min-height: 1.7em; font-size: 15px; max-width: none; }
.form-note.bad { color: #a3360f; }

/* 05 Vision */
.vision { background: var(--lime); color: var(--ink); padding: 65px 5%; }
.vision h2 { font-size: clamp(55px, 8vw, 125px); }
.vision-bottom { display: flex; align-items: end; justify-content: space-between; margin-top: 36px; }
.vision-bottom p { font-size: 18px; line-height: 1.6; }
.vision-bottom a {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  display: grid;
  place-items: center;
  font-size: 26px;
}

/* Footer */
footer { display: flex; align-items: center; justify-content: space-between; padding: 35px 5%; gap: 25px; }
footer > span { font-size: 12px; letter-spacing: 1px; color: #b6beb1; }
footer .brand { font-size: 28px; }

@media (min-width: 1600px) {
  header, section, footer {
    padding-left: max(5%, calc((100vw - 1450px) / 2)) !important;
    padding-right: max(5%, calc((100vw - 1450px) / 2)) !important;
  }
}

@media (max-width: 1000px) {
  nav > a:not(.nav-cta) { display: none; }
  .model-main, .contact-main { grid-template-columns: 1fr; gap: 40px; }
  .people { grid-template-columns: 1fr; }
  .people article + article { border-left: 0; border-top: 1px solid #c8cfc2; }
}

@media (max-width: 760px) {
  header { height: 84px; }
  .brand { font-size: 28px; }
  nav .nav-cta { font-size: 12px; padding: 11px; gap: 12px; }
  .mark { font-size: 36px; margin-right: 7px; }
  .hero { padding-top: 42px; }
  .eyebrow { font-size: 11px; letter-spacing: 1px; }
  h1 { font-size: clamp(49px, 11vw, 82px); margin-top: 36px; }
  .hero-bottom p { font-size: 16px; }
  .circle-link { width: 50px; height: 50px; flex-shrink: 0; }
  .hero-foot { font-size: 10px; letter-spacing: .7px; }
  .hero-foot span:nth-child(2) { display: none; }
  .approach, .team, .model, .connections, .contact { padding-top: 55px; padding-bottom: 55px; }
  .section-label { font-size: 12px; margin-bottom: 30px; }
  .approach-main { grid-template-columns: 1fr; gap: 25px; }
  .approach-main > p, .connection-heading > p, .model-copy p, .contact-main p { font-size: 16px; }
  .disciplines, .people { grid-template-columns: 1fr; margin-top: 35px; }
  .disciplines article, .people article { padding: 27px; }
  .disciplines .software { border-left: 0; border-top: 1px solid #c8cfc2; }
  .card-top { margin-bottom: 35px; }
  h3 { font-size: 30px; }
  .viewer-hint { display: none; }
  .readout { grid-template-columns: repeat(2, 1fr); }
  .readout div:nth-child(3n) { border-right: 1px solid var(--rule); }
  .readout div:nth-child(2n) { border-right: 0; }
  .readout div:nth-last-child(-n + 3) { border-bottom: 1px solid var(--rule); }
  .readout div:nth-last-child(-n + 2) { border-bottom: 0; }
  .readout dd { font-size: 20px; }
  .connection-heading { display: block; }
  .connection-heading > p { margin-top: 24px; }
  .workflow { margin-top: 32px; }
  .workflow button { padding: 16px 10px; gap: 7px; font-size: 12px; }
  .workflow button span { font-size: 16px; }
  .stage-panel { padding: 26px; grid-template-columns: 1fr; gap: 23px; min-height: 320px; }
  .stage-number { display: none; }
  .form .row { grid-template-columns: 1fr; }
  .vision { padding-top: 48px; padding-bottom: 48px; }
  footer { flex-wrap: wrap; }
  footer > span:last-child { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
