/* Torus Solutions
   Editorial restyle. Three rule weights, a filled type scale, three content
   widths, and a raised ground. No imagery. */

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

:root {
  /* Ground */
  --bg: #181816;
  --bg-raised: #1D1D1B;
  --surface: #1F1F1D;
  --surface-hover: #24241F;

  /* Rules. 1px with alpha, so weight is opacity and not sub-pixel width. */
  --rule-hair:   rgba(234, 230, 220, 0.07);
  --rule:        rgba(234, 230, 220, 0.13);
  --rule-strong: rgba(234, 230, 220, 0.22);

  /* Text. Secondary and muted were lifted: at #7A7872 body copy measured
     4.15:1 and labels 2.06:1 against the ground, both below AA. */
  --text: #EAE6DC;
  --text-secondary: #9A978F;
  --text-muted: #868379;

  /* Accent */
  --accent: #C8AA82;
  --accent-muted: #A08B68;
  --accent-dim: #8A7558;
  --accent-bright: #D4B98E;
  --accent-wash: rgba(200, 170, 130, 0.07);

  /* Type scale */
  --fs-display:   clamp(44px, 7vw, 84px);
  --fs-h2:        clamp(30px, 4.5vw, 50px);
  --fs-serif-sub: clamp(21px, 2.4vw, 26px);
  --fs-lead:      19px;
  --fs-body:      17px;
  --fs-small:     15px;
  --fs-label:     11px;

  /* Widths */
  --w-text: 660px;
  --w-content: 900px;
  --w-wide: 1200px;

  /* Rhythm */
  --space-section: 96px;
  --space-section-lg: 140px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--rule-hair);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 64px;
  transition: border-color 0.3s;
}

nav.is-scrolled { border-bottom-color: var(--rule-strong); }

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}

.nav-links { display: flex; gap: 40px; list-style: none; }

.nav-links a {
  font-family: 'Syne', sans-serif;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); }

/* PAGE */
.page { display: block; padding-top: 64px; min-height: 100vh; }

/* LAYOUT */
.container {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 0 48px;
}

.section {
  padding: var(--space-section) 0;
  border-top: 1px solid var(--rule);
}

.section:first-child { border-top: none; }
.section--lg { padding: var(--space-section-lg) 0; }

/* A raised band. Breaks the ground out to full bleed while keeping its
   contents on the same measure as everything else. */
.section--raised {
  background: var(--bg-raised);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
}

/* Widens a block past the 900px container without nesting another one.
   Width must stay auto: an explicit width pins the box and the negative
   margins then shift it sideways instead of expanding it. */
.bleed-wide {
  max-width: var(--w-wide);
  margin-left: calc((var(--w-content) - var(--w-wide)) / 2);
  margin-right: calc((var(--w-content) - var(--w-wide)) / 2);
}

@media (max-width: 1296px) {
  .bleed-wide { max-width: 100%; margin-left: 0; margin-right: 0; }
  /* Label column steps down with the measure it is sitting in. */
  .principle { grid-template-columns: 240px 1fr; gap: 48px; }
}

.section-cta { margin-top: 48px; }

/* TYPOGRAPHY */
.eyebrow {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: block;
}

h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: var(--fs-display);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 32px;
}

h1 em { font-style: italic; color: var(--accent); }

h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: var(--fs-h2);
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: -0.015em;
}

/* The missing middle voice. Serif, sentence case, weight 400. */
.serif-sub {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: var(--fs-serif-sub);
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--text);
  text-transform: none;
  margin-bottom: 0;
}

h3 {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 14px;
}

p {
  color: var(--text-secondary);
  font-size: var(--fs-body);
  line-height: 1.8;
  margin-bottom: 20px;
  max-width: var(--w-text);
}

p:last-child { margin-bottom: 0; }

/* HERO */
/* The only gradient on the site. Painted as the hero's own background rather
   than a z-index -1 pseudo-element, so it cannot be trapped by a stacking
   context introduced anywhere above it. */
.hero {
  padding: 128px 0 104px;
  background: radial-gradient(ellipse 760px 420px at 8% 22%, var(--accent-wash), transparent 70%);
}

.hero-rule {
  width: 48px;
  height: 1px;
  background: var(--accent);
  margin-bottom: 48px;
}

.hero p {
  font-size: var(--fs-lead);
  max-width: 580px;
  margin-top: 28px;
  line-height: 1.75;
}

.hero-cta {
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

/* BUTTONS */
.btn {
  font-family: 'Syne', sans-serif;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 15px 32px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  display: inline-block;
}

.btn-primary {
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
}

.btn-ghost {
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--rule);
}

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

/* COLUMN BANDS */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.two-col-wide {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 80px;
  align-items: start;
}

/* SERVICE GRID */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
  margin-top: 56px;
}

.service-item {
  padding: 36px 32px;
  border-bottom: 1px solid var(--rule-hair);
  border-right: 1px solid var(--rule-hair);
  transition: background 0.2s;
  position: relative;
}

.service-item::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.25s ease;
}

.service-item:hover { background: var(--surface); }
.service-item:hover::after { transform: scaleY(1); }

.service-item:nth-child(2n) { border-right: none; }
.service-item h3 { margin-bottom: 10px; }

.service-item p {
  font-size: var(--fs-small);
  line-height: 1.7;
  max-width: 100%;
}

/* PRINCIPLES */
.principles-list { margin-top: 0; }

.principle {
  padding: 40px 0;
  border-bottom: 1px solid var(--rule-hair);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  align-items: start;
  transition: background 0.25s;
}

.principle:first-child { border-top: 1px solid var(--rule-hair); }

.principle:hover { background: var(--surface); }

.principle p { margin: 0; max-width: 680px; }

/* STAT ROW */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  margin: 64px 0;
}

.stat-item {
  padding: 40px 32px;
  border-right: 1px solid var(--rule-hair);
}

.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 48px;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 10px;
}

.stat-label {
  font-family: 'Syne', sans-serif;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ENGAGEMENTS */
.engagement-list { margin-top: 8px; }

.engagement {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 40px;
  padding: 56px 32px 56px 0;
  border-top: 1px solid var(--rule-hair);
  transition: background 0.25s;
}

.engagement:first-child { border-top: 1px solid var(--rule); }
.engagement:last-child { border-bottom: 1px solid var(--rule); }

.engagement:hover { background: var(--surface); }

.engagement-index {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 56px;
  font-weight: 300;
  line-height: 0.9;
  color: var(--accent-dim);
  transition: color 0.25s;
  padding-left: 32px;
}

.engagement:hover .engagement-index { color: var(--accent); }

.engagement-region {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 14px;
}

.engagement-sector {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: var(--fs-serif-sub);
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--text);
  margin-bottom: 14px;
  max-width: 640px;
}

.engagement-scale {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--accent-muted);
  margin: 0 0 24px;
  max-width: 620px;
}

/* The finding. This is the part of the page that has to carry. */
.engagement-finding {
  background: var(--accent-wash);
  border-left: 2px solid var(--accent-dim);
  padding: 20px 24px;
  margin: 0 0 24px;
  max-width: 660px;
  transition: border-color 0.25s;
}

.engagement:hover .engagement-finding { border-left-color: var(--accent); }

.engagement-finding-label {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}

.engagement-finding p {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-small);
  line-height: 1.7;
  max-width: 100%;
}

.engagement-text { margin: 0; max-width: 660px; }

/* When a list opens a section, the section has already drawn a rule. Suppress
   the list's own so the two do not read as a pair sitting 96px apart. */
.section > .principles-list:first-child .principle:first-child,
.section > .engagement-list:first-child .engagement:first-child {
  border-top: none;
}

.disclosure {
  margin-top: 56px;
  padding: 32px 0 0;
  border-top: 1px solid var(--rule-hair);
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: var(--w-text);
}

/* CONTACT FORM */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 48px;
}

.form-full { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 8px; }

label {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

input, select, textarea {
  background: var(--surface);
  border: 1px solid var(--rule);
  color: var(--text);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: var(--fs-small);
  font-weight: 300;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-dim);
  background: var(--surface-hover);
}

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23868379' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

textarea { resize: vertical; min-height: 120px; }

::placeholder { color: var(--text-muted); opacity: 1; }

.form-note {
  font-family: 'Syne', sans-serif;
  font-size: var(--fs-label);
  color: var(--text-muted);
  letter-spacing: 0.04em;
  line-height: 1.6;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-hair);
  max-width: 100%;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--rule-strong);
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-copy {
  font-family: 'Syne', sans-serif;
  font-size: var(--fs-label);
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* SCROLL REVEAL
   Nothing is hidden until JS adds .has-reveal to the root, so no-JS and
   no-IntersectionObserver both land on fully visible content. */
html.has-reveal .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

html.has-reveal .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .principle { grid-template-columns: 220px 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  nav { padding: 0 24px; }
  .container { padding: 0 24px; }
  footer { padding: 32px 24px; flex-direction: column; gap: 12px; text-align: center; }

  .hero { padding: 80px 0 64px; background: none; }
  .section { padding: 64px 0; }
  .section--lg { padding: 80px 0; }

  .two-col, .two-col-wide { grid-template-columns: 1fr; gap: 40px; }

  .service-item:nth-child(2n) { border-right: 1px solid var(--rule-hair); }
  .service-item { border-right: none !important; }

  .principle { grid-template-columns: 1fr; gap: 16px; padding: 32px 0; }

  .stat-row { grid-template-columns: 1fr; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--rule-hair); }
  .stat-item:last-child { border-bottom: none; }

  .form-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 24px; }
  .nav-links a { font-size: 10px; letter-spacing: 0.06em; }

  /* Index moves inline above the region and the gutter collapses. */
  .engagement {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 40px 0;
  }
  .engagement-index {
    padding-left: 0;
    font-size: 34px;
    line-height: 1;
    margin-bottom: 16px;
  }
  .engagement-finding { padding: 16px 18px; }
}

/* Five nav items plus the wordmark need about 562px on one line. Below that
   the nav stacks: wordmark on its own row, links spread beneath it.
   .page padding-top tracks the taller nav. */
@media (max-width: 600px) {
  nav {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 24px;
  }

  .nav-links { width: 100%; justify-content: space-between; gap: 0; }

  /* The stacked nav measures 93px: 14 padding + 23 wordmark + 12 gap + 30
     links + 14 padding. The previous 72px left 21px of every page hidden
     behind the fixed bar. The slack here absorbs metric variance if Syne
     falls back to a system sans. */
  .page { padding-top: 104px; }
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html.has-reveal .reveal { opacity: 1; transform: none; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--accent-dim);
  padding: 12px 20px;
  font-family: 'Syne', sans-serif;
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.skip-link:focus { left: 16px; top: 16px; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.hidden-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error { color: var(--accent); font-size: 14px; margin: 20px 0 0; }
.form-error a { color: var(--accent); }

button[disabled] { cursor: default; }
