/* ==========================================================================
   CADDEZ — drawing-sheet identity
   Palette derived from the SolarCAD interface: field green from the 3D
   terrain, amber from the Fill Boundary control.
   ========================================================================== */

:root {
  --ink:      #14181D;
  --ink-2:    #4A535E;
  --ink-3:    #8A939E;
  --paper:    #FBFBF8;
  --paper-2:  #F2F2EC;
  --rule:     #DCDCD4;
  --rule-2:   #EDEDE6;
  --amber:    #E8A317;
  --field:    #16281C;
  --field-2:  #24422E;
  --teal:     #2FB4A0;

  --grid-fine: rgba(20, 24, 29, 0.045);
  --grid-bold: rgba(20, 24, 29, 0.085);

  --w: 1180px;
  --pad: 40px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--w);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* --- Type roles ---------------------------------------------------------- */

.display {
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* --- Sheet reference: the signature device ------------------------------- */

.sheet-ref {
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--ink);
  padding-top: 9px;
  margin-bottom: 34px;
}
.sheet-ref .num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink);
  font-weight: 600;
}
.sheet-ref .sep { flex: 1; height: 1px; background: var(--rule); }
.sheet-ref .meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* --- Header -------------------------------------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 251, 248, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-head .bar {
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-weight: 700;
  font-size: 23px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.logo em { font-style: normal; color: var(--amber); }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  font-size: 14px;
  text-decoration: none;
  color: var(--ink-2);
  padding: 4px 0;
  border-bottom: 1.5px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--amber); }
.nav a.on { color: var(--ink); border-bottom-color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 7px 11px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--ink);
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  border-bottom: 1px solid var(--rule);
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(0deg,  var(--grid-fine) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, var(--grid-fine) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(0deg,  var(--grid-bold) 0 1px, transparent 1px 130px),
    repeating-linear-gradient(90deg, var(--grid-bold) 0 1px, transparent 1px 130px);
}
.hero .inner {
  max-width: var(--w);
  margin: 0 auto;
  padding: 96px var(--pad) 0;
}
.hero .eyebrow { margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(42px, 7.2vw, 88px);
  max-width: 15ch;
}
.hero h1 .amber { color: var(--amber); }
.hero .deck {
  margin: 26px 0 0;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--ink-2);
  max-width: 52ch;
  line-height: 1.5;
}
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* Title block — engineering drawing corner stamp */
.titleblock {
  margin-top: 68px;
  border: 1px solid var(--ink);
  border-bottom: none;
  background: var(--paper);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.titleblock div { padding: 14px 18px 16px; border-right: 1px solid var(--rule); }
.titleblock div:last-child { border-right: none; }
.titleblock dt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 5px;
}
.titleblock dd {
  margin: 0;
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 2px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: background .15s, color .15s, transform .15s;
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--field); border-color: var(--field); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-amber { background: var(--amber); border-color: var(--amber); color: var(--field); }
.btn-amber:hover { background: #d5960f; border-color: #d5960f; }
.btn .arw { transition: transform .18s; }
.btn:hover .arw { transform: translateX(3px); }

/* --- Sections ------------------------------------------------------------ */

.band { padding: 84px 0; }
.band-tint { background: var(--paper-2); }
.band-dark {
  background: var(--field);
  color: #E7EDE8;
}
.band-dark .sheet-ref { border-top-color: rgba(231,237,232,0.5); }
.band-dark .sheet-ref .num { color: #E7EDE8; }
.band-dark .sheet-ref .sep { background: rgba(231,237,232,0.22); }
.band-dark .sheet-ref .meta { color: rgba(231,237,232,0.6); }
.band-dark h2 { color: #FFFFFF; }
.band-dark .lede { color: rgba(231,237,232,0.82); }

h2.sec {
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-weight: 600;
  font-size: clamp(29px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  max-width: 22ch;
}
.lede {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 62ch;
  margin: 0 0 34px;
  line-height: 1.55;
}

/* --- Steps (the workflow sequence) --------------------------------------- */

.steps { border-top: 1px solid var(--rule); }
.step {
  display: grid;
  grid-template-columns: 68px 190px 1fr;
  gap: 26px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.step .idx {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  color: #C2860B;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.step h3 {
  margin: 0;
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.01em;
}
.step p { margin: 0; color: var(--ink-2); font-size: 16px; }

/* --- Comparison / data table --------------------------------------------- */

.data {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.data th {
  text-align: left;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--rule);
}
.data th.r, .data td.r { text-align: right; }
.data td {
  padding: 13px 0;
  border-bottom: 1px solid var(--rule-2);
  font-size: 17px;
}
.data tr:last-child td { border-bottom: none; }
.data td.hi {
  font-weight: 600;
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-size: 19px;
}
.band-dark .data th { color: rgba(231,237,232,0.55); border-bottom-color: rgba(231,237,232,0.28); }
.band-dark .data td { border-bottom-color: rgba(231,237,232,0.14); }
.band-dark .data td.hi { color: var(--amber); }

.figure { margin: 30px 0 0; }
.figure img { border: 1px solid var(--rule); border-radius: 2px; }
.band-dark .figure img { border-color: rgba(231,237,232,0.22); }
.figure figcaption {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  margin-top: 11px;
  max-width: 78ch;
}
.band-dark .figure figcaption { color: rgba(231,237,232,0.55); }

/* --- Card grid ----------------------------------------------------------- */

.grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.cell { background: var(--paper); padding: 30px 28px 34px; }
.band-tint .cell { background: var(--paper-2); }
.cell .mono { display: block; margin-bottom: 13px; }
.cell h3 {
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.01em;
  margin: 0 0 9px;
}
.cell p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* --- Two-column split ---------------------------------------------------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: start; }
.split ul { margin: 0; padding-left: 19px; }
.split li { margin-bottom: 9px; color: var(--ink-2); }

/* --- Contrast list (by hand / in SolarCAD) ------------------------------- */

.versus { border-top: 1px solid var(--rule); }
.versus .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--rule);
}
.versus .a, .versus .b { padding: 18px 24px 20px 0; font-size: 15.5px; }
.versus .a { color: var(--ink-3); }
.versus .b { padding-left: 26px; border-left: 1px solid var(--rule); color: var(--ink); }
.versus .head {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding-bottom: 10px;
}
.versus .head.a { color: var(--ink-3); }
.versus .head.b { color: var(--amber); }

/* --- CTA ----------------------------------------------------------------- */

.cta { border-top: 1px solid var(--ink); padding: 72px 0 84px; }
.cta h2 { max-width: 20ch; }
.cta .row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* --- Footer -------------------------------------------------------------- */

.site-foot {
  background: var(--field);
  color: rgba(231,237,232,0.72);
  padding: 54px 0 34px;
  font-size: 14.5px;
}
.site-foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.site-foot .logo { color: #fff; font-size: 21px; }
.site-foot h4 {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(231,237,232,0.5);
  margin: 0 0 13px;
  font-weight: 500;
}
.site-foot a { color: rgba(231,237,232,0.82); text-decoration: none; }
.site-foot a:hover { color: var(--amber); }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 8px; }
.site-foot .base {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid rgba(231,237,232,0.16);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(231,237,232,0.45);
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
  :root { --pad: 24px; }
  .split, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .titleblock { grid-template-columns: repeat(2, 1fr); }
  .titleblock div:nth-child(2) { border-right: none; }
  .titleblock div:nth-child(1), .titleblock div:nth-child(2) { border-bottom: 1px solid var(--rule); }
  .site-foot .cols { grid-template-columns: 1fr 1fr; }
  .step { grid-template-columns: 52px 1fr; }
  .step p { grid-column: 2; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .hero .inner { padding-top: 62px; }
  .nav {
    display: none;
    position: absolute;
    top: 66px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--pad) 18px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 0; width: 100%; border-bottom: 1px solid var(--rule-2); }
  .nav a:hover, .nav a.on { border-bottom-color: var(--rule-2); }
  .nav-toggle { display: block; }
  .site-head .bar { position: relative; }
  .band { padding: 58px 0; }
  .versus .row { grid-template-columns: 1fr; }
  .versus .row.hdr { display: none; }
  .versus .b {
    border-left: 2px solid var(--amber);
    padding-left: 14px;
    padding-top: 0;
    margin-bottom: 4px;
  }
  .versus .a { padding-bottom: 10px; }
  .site-foot .cols { grid-template-columns: 1fr; }
  .data td { font-size: 15.5px; }
  .data td.hi { font-size: 17px; }
}
