/* ============================================================
   CLOUDGEN TECHNOLOGIES: spec-sheet editorial system
   Type: Archivo (display + text) / IBM Plex Mono (metadata)
   Ink on paper. One blue. Hairline rules. No decoration.
   ============================================================ */

:root {
  --paper: #FBFBF9;
  --paper-2: #F3F3EF;
  --ink: #131614;
  --ink-2: #4A4F4B;
  --ink-3: #8A8F8A;
  --rule: #DCDCD5;
  --rule-dark: #131614;
  --blue: #1F3DD6;
  --max-w: 1280px;
  --pad: 32px;
  --nav-h: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--blue); color: #FFFFFF; }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

img, svg { display: block; max-width: 100%; }

.mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule-dark);
}
.topbar-in {
  display: flex;
  align-items: stretch;
  height: var(--nav-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 32px;
  border-right: 1px solid var(--rule);
}
.brand-mark {
  width: 38px;
  height: 38px;
  background: url("img/logo.png") center / contain no-repeat;
  position: relative;
  flex-shrink: 0;
}
.brand-name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  display: block;
  margin-top: 1px;
}
.topnav {
  display: flex;
  align-items: stretch;
  list-style: none;
  margin-left: auto;
}
.topnav li { display: flex; }
.topnav a {
  display: flex;
  align-items: center;
  padding: 0 22px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  border-left: 1px solid var(--rule);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.topnav a:hover { color: var(--ink); background: var(--paper-2); }
.topnav a.active {
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--blue);
}
.topnav-cta {
  display: flex;
  align-items: center;
  margin-left: 24px;
  flex-shrink: 0;
}
.topnav-cta a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 10px 20px;
  background: var(--ink);
  color: var(--paper);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background-color 0.15s ease;
}
.topnav-cta a:hover { background: var(--blue); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  border-left: 1px solid var(--rule);
  padding: 0 20px;
  margin-left: auto;
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; stroke: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 16px 28px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--blue); border-color: var(--blue); color: #FFFFFF; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-paper { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn-paper:hover { background: var(--blue); border-color: var(--blue); color: #FFFFFF; }
.btn .arr { transition: transform 0.15s ease; }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--rule-dark); }
.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-3);
}
.hero-main { padding: 72px 0 64px; }
.hero h1 {
  font-size: clamp(44px, 7vw, 92px);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 18ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--blue);
}
.hero-low {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 64px;
  align-items: end;
  margin-top: 56px;
}
.hero-low p {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 52ch;
  text-wrap: pretty;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---------- section scaffold ---------- */
.sec { border-bottom: 1px solid var(--rule-dark); }
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.sec-head .idx { color: var(--blue); }
.sec-head .lab { color: var(--ink-3); }
.sec-title { padding: 48px 0 0; }
.sec-title h2 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 24ch;
  text-wrap: balance;
}
.sec-title .sub {
  margin-top: 16px;
  font-size: 17px;
  color: var(--ink-2);
  max-width: 60ch;
  text-wrap: pretty;
}

/* ---------- services ledger ---------- */
.ledger { margin-top: 48px; border-top: 1px solid var(--rule-dark); }
.ledger-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1.1fr) minmax(0, 1.4fr) 56px;
  gap: 32px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
  color: inherit;
  transition: background-color 0.15s ease;
  position: relative;
}
.ledger-row:hover { background: var(--paper-2); }
.ledger-row:hover .ledger-arr { color: var(--blue); transform: translateX(6px); }
.ledger-num { color: var(--ink-3); }
.ledger-row:hover .ledger-num { color: var(--blue); }
.ledger-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.ledger-desc {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.55;
  text-wrap: pretty;
}
.ledger-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
}
.ledger-tags span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.ledger-arr {
  font-size: 20px;
  justify-self: end;
  color: var(--ink-3);
  transition: transform 0.15s ease, color 0.15s ease;
}

/* ---------- principles (why us) ---------- */
.prin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-left: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  margin-top: 48px;
}
.prin {
  padding: 36px 36px 40px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.prin .mono { color: var(--blue); display: block; margin-bottom: 18px; }
.prin h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.prin p { font-size: 15px; color: var(--ink-2); text-wrap: pretty; }

/* ---------- statement band ---------- */
.statement {
  background: var(--ink);
  color: var(--paper);
}
.statement-in {
  padding-top: 88px;
  padding-bottom: 88px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.statement h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-wrap: balance;
}
.statement h2 em { font-style: normal; color: #8FA3FF; }
.statement p { color: #A8ABA6; margin-top: 16px; font-size: 16px; max-width: 48ch; }
.statement-cta { justify-self: end; }

/* ---------- bottom padding helper ---------- */
.sec-body { padding-bottom: 80px; }

/* ---------- footer ---------- */
.footer {
  background: var(--paper);
  border-top: 1px solid var(--rule-dark);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 48px;
  padding: 56px 0;
  border-bottom: 1px solid var(--rule);
}
.footer-brand p {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-2);
  max-width: 30ch;
}
.footer h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer ul a {
  font-size: 14px;
  color: var(--ink-2);
  transition: color 0.15s ease;
}
.footer ul a:hover { color: var(--blue); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 22px 0;
  color: var(--ink-3);
}
.footer-bottom .legal { display: flex; gap: 24px; }
.footer-bottom a { color: var(--ink-3); }
.footer-bottom a:hover { color: var(--ink); }

/* ---------- inner page hero ---------- */
.page-head { border-bottom: 1px solid var(--rule-dark); }
.page-head-main { padding: 64px 0 56px; }
.page-head h1 {
  font-size: clamp(36px, 5.5vw, 68px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.03;
  max-width: 20ch;
  text-wrap: balance;
}
.page-head .lede {
  margin-top: 24px;
  font-size: 18px;
  color: var(--ink-2);
  max-width: 56ch;
  text-wrap: pretty;
}

/* ---------- service detail ---------- */
.svc { border-bottom: 1px solid var(--rule-dark); }
.svc-head {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.svc-head .idx { color: var(--blue); }
.svc-head .lab { color: var(--ink-3); }
.svc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 72px;
  padding: 48px 0 72px;
  align-items: start;
}
.svc h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.svc .svc-lede {
  margin-top: 16px;
  font-size: 16.5px;
  color: var(--ink-2);
  max-width: 58ch;
  text-wrap: pretty;
}
.caps { list-style: none; margin-top: 36px; border-top: 1px solid var(--rule-dark); }
.caps li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.caps .cap-k {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  padding-top: 3px;
}
.caps .cap-v { font-size: 15px; color: var(--ink-2); text-wrap: pretty; }
.svc-side { display: flex; flex-direction: column; }
.side-block {
  border: 1px solid var(--rule-dark);
  padding: 24px;
}
.side-block + .side-block { border-top: none; }
.side-block h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
}
.side-block p { font-size: 14px; color: var(--ink-2); text-wrap: pretty; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  background: var(--paper);
}
.side-block ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.side-block ul li {
  font-size: 14px;
  color: var(--ink-2);
  display: flex;
  gap: 10px;
}
.side-block ul li::before { content: "·"; color: var(--blue); flex-shrink: 0; }

/* ---------- about ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 72px;
  padding: 56px 0 72px;
  align-items: start;
}
.split h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-wrap: balance;
}
.split .body p { font-size: 16.5px; color: var(--ink-2); text-wrap: pretty; }
.split .body p + p { margin-top: 16px; }
.split .body strong { color: var(--ink); font-weight: 600; }

.rules-list { border-top: 1px solid var(--rule-dark); margin-top: 48px; }
.rule-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.rule-row .num { color: var(--ink-3); }
.rule-row h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.rule-row p { font-size: 15px; color: var(--ink-2); text-wrap: pretty; }

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 72px;
  padding-top: 56px;
  padding-bottom: 80px;
  align-items: start;
}
.form-frame { border: 1px solid var(--rule-dark); padding: 40px; background: #FFFFFF; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.field label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.field input, .field select, .field textarea {
  font-family: 'Archivo', sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 13px 14px;
  width: 100%;
  transition: border-color 0.15s ease;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23131614' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #C2362B; }
.field .err {
  font-size: 13px;
  color: #C2362B;
  display: none;
}
.field.invalid .err { display: block; }
.form-success { display: none; padding: 32px 8px; }
.form-success.show { display: block; }
.form-success .mono { color: var(--blue); display: block; margin-bottom: 16px; }
.form-success h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 10px; }
.form-success p { font-size: 15px; color: var(--ink-2); max-width: 44ch; }
.info-list { border-top: 1px solid var(--rule-dark); }
.info-row { padding: 24px 0; border-bottom: 1px solid var(--rule); }
.info-row h3 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
.info-row p, .info-row address {
  font-size: 15px;
  font-style: normal;
  color: var(--ink-2);
  line-height: 1.7;
}

/* ---------- reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
  }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .hero-low { grid-template-columns: 1fr; gap: 32px; }
  .hero-ctas { justify-content: flex-start; }
  .svc-grid { grid-template-columns: 1fr; gap: 40px; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .statement-in { grid-template-columns: 1fr; gap: 32px; }
  .statement-cta { justify-self: start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --pad: 24px; }
  .hero-main { padding: 48px 0 48px; }
  .hero-meta { flex-direction: column; gap: 4px; }
  .ledger-row { grid-template-columns: 48px minmax(0, 1fr); gap: 12px 20px; }
  .ledger-desc { grid-column: 2; }
  .ledger-arr { display: none; }
  .prin-grid { grid-template-columns: 1fr; }
  .prin { padding: 28px 24px 32px; }
  .caps li { grid-template-columns: 1fr; gap: 6px; }
  .rule-row { grid-template-columns: 48px minmax(0, 1fr); }
  .rule-row p { grid-column: 2; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-frame { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .brand { border-right: none; }
  .topnav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule-dark);
    flex-direction: column;
    align-items: stretch;
  }
  .topnav.open { display: flex; }
  .topnav a { padding: 16px 20px; border-left: none; border-top: 1px solid var(--rule); }
  .topnav a.active { box-shadow: inset 3px 0 0 var(--blue); }
  .topnav-cta { display: none; }
  .nav-toggle { display: block; }

  /* page header */
  .page-head-main { padding: 36px 0 28px; }
  .page-head h1 { font-size: clamp(28px, 8vw, 48px); }
  .page-head .lede { font-size: 16px; margin-top: 14px; }

  /* section spacing */
  .sec-title { padding: 28px 0 0; }
  .sec-title h2 { font-size: clamp(22px, 7vw, 34px); }
  .sec-body { padding-bottom: 48px; }
  .statement-in { padding-top: 52px; padding-bottom: 52px; gap: 28px; }

  /* about */
  .split { padding: 36px 0 48px; gap: 24px; }
  .split h2 { font-size: clamp(22px, 6vw, 32px); }

  /* services */
  .svc-grid { padding: 32px 0 48px; gap: 32px; }
  .svc h2 { font-size: clamp(22px, 6vw, 32px); }
  .svc .svc-lede { font-size: 15px; }

  /* legal */
  .legal-doc { padding-top: 20px; padding-bottom: 40px; }
  .legal-body .legal-intro { font-size: 16px; line-height: 1.6; }
  .legal-body .legal-updated { margin-bottom: 16px; padding-bottom: 14px; }
  .legal-section { padding-top: 24px; }
  .legal-section h2 { font-size: 18px; margin-bottom: 10px; }
  .legal-section p { font-size: 15px; }
  .legal-section ul li { font-size: 15px; }
}
