/* Volpsis — one stylesheet. Tokens, then shell, then components, then pages. */

:root {
  --bg: #FAFAFA;
  --ink: #000000;
  --ink-lead: #4D4D4D;
  --ink-body: #646262;
  --accent: #318493;
  --rule: #DDDDDD;

  --measure: 1185px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);

  /* 32px @375  ->  150px @1440 */
  --fs-display: clamp(2rem, -0.597rem + 11.08vw, 9.375rem);
  /* 28px @375  ->  42px @1440 */
  --fs-lead: clamp(1.75rem, 1.442rem + 1.315vw, 2.625rem);
  /* deliberately fixed: matches the current site on every width */
  --fs-body: 1.4rem;
  --fs-nav: 0.875rem;
}

@font-face {
  font-family: "Jost";
  src: url("fonts/jost-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-body);
  font-family: "Jost", "Century Gothic", "Futura", sans-serif;
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.01em;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---- type ---- */

.display {
  margin: 0;
  font-size: var(--fs-display);
  line-height: 0.8;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink);
}

.display--center { max-width: 982px; margin-inline: auto; text-align: center; }

.display--ellipsis { margin-block: clamp(1.5rem, 7vw, 6.25rem); }

.lead {
  margin: 0 0 1.5rem;
  font-size: var(--fs-lead);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-lead);
}

p { margin: 0 0 1.5rem; }

.rule { border: 0; border-top: 1px solid var(--rule); margin: 4rem 0; }

/* ---- header ---- */

.header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  /* wider than --measure: the live header is near full-bleed, not
     constrained to the content column. */
  max-width: 1385px;
  margin-inline: auto;
  padding-block: 2.5rem;
  padding-inline: 20px;
}

.header-logo { justify-self: center; }
.header-logo img { width: 88px; }

.nav { display: flex; gap: 2.5rem; }
.nav--end { justify-self: end; }

.nav a {
  font-size: var(--fs-nav);
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink);
}
.nav a[aria-current="page"] { color: var(--ink-body); }

.nav-toggle { display: none; }

@media (max-width: 767px) {
  .header { grid-template-columns: auto 1fr; padding-block: 1.25rem; padding-inline: var(--gutter); }
  .header-logo { justify-self: start; order: -1; }
  .nav--start, .nav--end { display: none; }

  .nav-toggle {
    display: block; justify-self: end;
    background: none; border: 0; padding: 0.5rem;
    font: inherit; font-size: var(--fs-nav); letter-spacing: 0.34em;
    text-transform: uppercase; color: var(--ink); cursor: pointer;
  }

  .nav-panel {
    position: fixed; inset: 0; z-index: 10;
    background: var(--bg);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 2.5rem;
  }
  .nav-panel a { font-size: 1.25rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink); }
  /* Author-origin display:flex above beats the UA [hidden]{display:none}
     rule regardless of specificity, so the hidden attribute needs its own
     higher-specificity override to actually hide the panel. */
  .nav-panel[hidden] { display: none; }
  body.nav-open { overflow: hidden; }
}

@media (min-width: 768px) { .nav-panel { display: none; } }

/* ---- footer ---- */

.footer {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 6rem var(--gutter) 4rem;
  font-size: var(--fs-nav);
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

/* ---- reveal ---- */

.js [data-reveal] { opacity: 0; transform: translateY(1.5rem); }
.js [data-reveal].is-visible {
  opacity: 1; transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---- accordion (Tasks 5 and 6) ---- */

.accordion details { border-top: 1px solid var(--rule); }
.accordion details:last-of-type { border-bottom: 1px solid var(--rule); }

.accordion summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.4rem 0; cursor: pointer; list-style: none;
  font-size: var(--fs-lead); line-height: 1.1; font-weight: 700;
  letter-spacing: -0.01em; color: var(--ink-lead);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-weight: 400; font-size: 1.5rem; line-height: 1; }
.accordion details[open] summary::after { content: "\2212"; }
.accordion details > p { margin: 0 0 1.4rem; }

/* ---- home ---- */

.hero { padding-block: clamp(3rem, 8vw, 7rem) clamp(2rem, 6vw, 5rem); }

.cards { display: grid; row-gap: clamp(2rem, 5vw, 4rem); column-gap: 2rem; margin-top: clamp(3rem, 28vw, 26rem); }
@media (min-width: 768px) {
  .cards { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .cards > :nth-child(2) { margin-top: -139px; }
  .cards > :nth-child(3) { margin-top: 179px; }
}

.card h3 {
  margin: 0 0 1rem;
  font-size: var(--fs-nav); font-weight: 500;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink-body);
}
.card p { font-size: var(--fs-body); line-height: 1.7; }

/* ---- framework ---- */

.split { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 768px) { .split { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px) { .split--wide-left { grid-template-columns: 3fr 2fr; } }

.step { margin-top: clamp(3rem, 8vw, 6rem); }
.step-label {
  margin: 0 0 1rem;
  font-size: var(--fs-nav); font-weight: 500;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink-body);
}

.pricing-tier { margin-bottom: 3rem; }
.pricing-tier h3 {
  margin: 0 0 0.5rem;
  font-size: var(--fs-nav); font-weight: 500;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink);
}
.pricing-tier ul { margin: 0 0 1rem; padding-left: 1.2rem; }

.note { font-size: 0.95rem; color: var(--ink-body); }

.donut { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 768px) { .donut { grid-template-columns: auto 1fr; } }
.donut svg { width: min(280px, 100%); height: auto; }
.donut-legend { list-style: none; margin: 0; padding: 0; font-size: 1.05rem; }
.donut-legend li { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; }
.donut-swatch { width: 0.9rem; height: 0.9rem; flex: none; border-radius: 2px; }

/* ---- form ---- */

.form { max-width: 720px; margin-top: 3rem; }
.form-row { margin-bottom: 2rem; }
.form-row > label,
.form-group > legend {
  display: block; margin-bottom: 0.5rem;
  font-size: 1.1rem; color: var(--ink-lead);
}
.form-req { font-size: 0.8rem; color: var(--ink-body); }

.form input, .form select, .form textarea {
  width: 100%; padding: 0.75rem;
  font: inherit; font-size: 1.05rem; line-height: 1.4;
  color: var(--ink-lead); background: transparent;
  border: 1px solid var(--ink-lead); border-radius: 0;
}
.form textarea { min-height: 8rem; resize: vertical; }

.form-group { border: 0; margin: 0 0 2rem; padding: 0; }
.form-pair { display: grid; gap: 1rem; }
@media (min-width: 560px) { .form-pair { grid-template-columns: 1fr 1fr; } }
.form-pair label { font-size: 0.85rem; }

.form button {
  padding: 1rem 2.5rem;
  font: inherit; font-size: var(--fs-nav); font-weight: 500;
  letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--ink-lead); background: transparent;
  border: 1px solid var(--ink-lead); cursor: pointer;
}
.form button:hover { color: var(--ink); border-color: var(--ink); }

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

.form-error { color: #A02020; font-size: 0.95rem; margin-top: 0.4rem; }
.form-status { margin-top: 1.5rem; font-size: 1.1rem; }

/* ---- recent-work card logos ---- */

/* The three source logos have very different aspect ratios (1.33, 2.67, 0.94).
   A fixed-height box with object-fit: contain makes them read as one aligned
   row instead of three different-sized blocks. */
.card-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 180px;
  margin: 0 0 1.75rem;
}
.card-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (max-width: 767px) {
  .card-logo { height: 140px; }
}
