/* ============================================================
   CloudFrontiers design system
   Editorial, work-led, generous space, purposeful motion.
   ============================================================ */

:root {
  --ink: #101b3f;
  --dark: #0b1026;
  --offwhite: #f2f1e9;
  --paper: #fbfbf7;
  --cyan: #08cfe8;
  --lime: #c7f000;
  --coral: #ff6b67;
  --lavender: #a692ee;
  --text: #222329;
  --muted: #5f6269;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  --container: 75rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 9vw, 8.5rem);

  --notch: 1.5rem;
  --clip-tr: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
  --clip-bl: polygon(0 0, 100% 0, 100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch)));

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

/* ---------- Focus ---------- */

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

.field-dark :focus-visible,
.field-ink :focus-visible {
  outline-color: var(--lime);
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s var(--ease-out);
}

.skip-link:focus-visible {
  top: 1rem;
}

/* ---------- Type ---------- */

h1,
h2,
h3,
.h-display {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 5.25rem);
}

h2 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
}

h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.15;
}

p {
  max-width: 62ch;
}

.lede {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.5;
  color: var(--muted);
}

.field-dark h1,
.field-dark h2,
.field-dark h3,
.field-ink h1,
.field-ink h2,
.field-ink h3 {
  color: var(--paper);
}

.field-dark .lede,
.field-ink .lede {
  color: rgba(251, 251, 247, 0.72);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.kicker::before {
  content: "";
  width: 2.5rem;
  height: 2px;
  background: currentColor;
  flex: none;
}

.field-dark .kicker,
.field-ink .kicker {
  color: var(--cyan);
}

.field-lime .kicker {
  color: var(--ink);
}

/* ---------- Layout ---------- */

.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-y);
}

.field-dark {
  background: var(--dark);
  color: var(--paper);
}

.field-ink {
  background: var(--ink);
  color: var(--paper);
}

.field-offwhite {
  background: var(--offwhite);
}

.field-lime {
  background: var(--lime);
  color: var(--ink);
}

.section-head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
  max-width: 46rem;
}

.section-head .text-link {
  justify-self: start;
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.5rem;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.25s var(--ease-out),
    color 0.25s var(--ease-out),
    transform 0.25s var(--ease-out);
}

.btn .btn-arrow {
  transition: transform 0.25s var(--ease-out);
}

.btn:hover,
.btn:focus-visible {
  background: transparent;
  color: var(--ink);
}

.btn:hover .btn-arrow,
.btn:focus-visible .btn-arrow {
  transform: translateX(4px);
}

.btn-lime {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}

.btn-lime:hover,
.btn-lime:focus-visible {
  background: transparent;
  color: var(--lime);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.field-dark .btn-ghost,
.field-ink .btn-ghost,
.hero .btn-ghost,
.closing-cta .btn-ghost,
.sensi-spotlight .btn-ghost {
  color: var(--paper);
  border-color: var(--paper);
}

.field-dark .btn-ghost:hover,
.field-dark .btn-ghost:focus-visible,
.field-ink .btn-ghost:hover,
.field-ink .btn-ghost:focus-visible,
.hero .btn-ghost:hover,
.hero .btn-ghost:focus-visible,
.closing-cta .btn-ghost:hover,
.closing-cta .btn-ghost:focus-visible,
.sensi-spotlight .btn-ghost:hover,
.sensi-spotlight .btn-ghost:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--cyan);
  padding-bottom: 0.15rem;
  transition: border-color 0.25s var(--ease-out);
}

.text-link .link-arrow {
  transition: transform 0.25s var(--ease-out);
}

.text-link:hover .link-arrow,
.text-link:focus-visible .link-arrow {
  transform: translateX(5px);
}

.field-dark .text-link,
.field-ink .text-link {
  color: var(--paper);
  border-bottom-color: var(--lime);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}

.site-header.is-scrolled {
  border-bottom-color: rgba(16, 27, 63, 0.14);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.1rem;
  transition: padding 0.3s var(--ease-out);
}

.site-header.is-scrolled .header-inner {
  padding-block: 0.65rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-logo {
  display: block;
  width: 15.5rem;
  max-width: 100%;
  height: auto;
}

.brand {
  min-width: 0;
}

.site-nav {
  display: none;
}

@media (min-width: 65rem) {
  .site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

.site-nav a {
  position: relative;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  color: var(--ink);
  padding-block: 0.35rem;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.header-cta {
  display: none;
}

@media (min-width: 65rem) {
  .header-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.15rem;
    border: 2px solid var(--ink);
    border-radius: 2px;
    font-weight: 700;
    font-size: 0.9375rem;
    text-decoration: none;
    color: var(--ink);
    transition:
      background-color 0.25s var(--ease-out),
      color 0.25s var(--ease-out);
  }

  .header-cta:hover,
  .header-cta:focus-visible {
    background: var(--ink);
    color: var(--paper);
  }
}

/* ---------- Mobile menu ---------- */

/* No-JS fallback: keep navigation reachable when the toggle cannot run */
html:not(.js) .menu-toggle {
  display: none;
}

html:not(.js) .site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem 1.25rem;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
}

@media (min-width: 65rem) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle-icon {
  position: relative;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  transition: background-color 0.2s var(--ease-out);
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease-out);
}

.menu-toggle-icon::before {
  transform: translateY(-5px);
}

.menu-toggle-icon::after {
  transform: translateY(5px);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon::before {
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon::after {
  transform: rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gutter);
  background: var(--dark);
  color: var(--paper);
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.3s var(--ease-out),
    visibility 0s linear 0.3s;
}

.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
  transition:
    opacity 0.3s var(--ease-out),
    visibility 0s;
}

.mobile-menu nav {
  display: grid;
  gap: 0.5rem;
}

.mobile-menu a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-block: 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3rem);
  line-height: 1.1;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid rgba(251, 251, 247, 0.14);
  transition: color 0.25s var(--ease-out), padding-left 0.25s var(--ease-out);
}

.mobile-menu a .menu-index {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--cyan);
}

.mobile-menu a:hover,
.mobile-menu a:focus-visible {
  color: var(--lime);
  padding-left: 0.5rem;
}

.mobile-menu .mobile-menu-cta {
  margin-top: 2rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--lime);
  border-bottom: none;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--dark);
  color: var(--paper);
  padding-block: clamp(4rem, 9vw, 7.5rem) clamp(4.5rem, 9vw, 8rem);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 62rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 4rem;
  }
}

.hero h1 {
  color: var(--paper);
  max-width: 12ch;
}

.hero .lede {
  color: rgba(251, 251, 247, 0.75);
  max-width: 34ch;
  margin-top: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.25rem;
}

.hero-art {
  position: relative;
  aspect-ratio: 1;
  max-width: 30rem;
  margin-inline: auto;
  width: 100%;
}

@media (max-width: 61.99rem) {
  .hero-art {
    max-width: 22rem;
  }
}

/* Connected-system animation */
.system-map .flow {
  stroke-dasharray: 7 11;
  animation: flow-dash 1.6s linear infinite;
}

.system-map .flow-slow {
  animation-duration: 2.6s;
}

@keyframes flow-dash {
  to {
    stroke-dashoffset: -36;
  }
}

.system-map .node-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: node-pulse 3.2s var(--ease-out) infinite;
}

.system-map .node-pulse-delay {
  animation-delay: 1.4s;
}

@keyframes node-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.35);
  }
}

.system-map .panel-drift {
  animation: panel-drift 7s var(--ease-out) infinite alternate;
}

@keyframes panel-drift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-10px);
  }
}

/* ---------- Positioning statement ---------- */

.statement {
  padding-block: clamp(4rem, 9vw, 7rem);
}

.statement p {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 24ch;
}

.statement p strong {
  font-weight: 560;
  color: var(--ink);
  box-shadow: inset 0 -0.42em var(--lime);
}

/* ---------- Work list ---------- */

.work-list {
  display: grid;
  gap: clamp(3.5rem, 7vw, 6rem);
}

.work-item {
  position: relative;
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 56rem) {
  .work-item {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(2.5rem, 5vw, 5rem);
  }

  .work-item:nth-child(even) .work-visual {
    order: -1;
  }
}

.work-index {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--muted);
  display: block;
  margin-bottom: 1rem;
}

.work-item h3 {
  margin-bottom: 0.75rem;
}

.work-item h3 a {
  text-decoration: none;
}

.work-item h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.work-problem {
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.work-tags li {
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(16, 27, 63, 0.3);
  border-radius: 999px;
  color: var(--ink);
}

.work-more {
  margin-top: 1.5rem;
}

.work-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  clip-path: var(--clip-tr);
  transition: clip-path 0.45s var(--ease-out);
}

.work-item:hover .work-visual,
.work-item:focus-within .work-visual {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.work-visual .geo {
  position: absolute;
  transition: transform 0.6s var(--ease-out);
}

.work-item:hover .work-visual .geo-a,
.work-item:focus-within .work-visual .geo-a {
  transform: translate(6%, -6%) scale(1.06);
}

.work-item:hover .work-visual .geo-b,
.work-item:focus-within .work-visual .geo-b {
  transform: translate(-5%, 5%) rotate(-4deg);
}

.theme-cyan {
  background: var(--cyan);
}

.theme-lime {
  background: var(--lime);
}

.theme-lavender {
  background: var(--lavender);
}

.theme-coral {
  background: var(--coral);
}

.geo-circle {
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ink);
  top: -14%;
  right: -10%;
}

.geo-slat {
  width: 26%;
  height: 130%;
  background: var(--dark);
  left: 12%;
  top: -15%;
  transform: rotate(8deg);
}

.geo-notch {
  width: 46%;
  aspect-ratio: 1;
  background: var(--paper);
  left: -8%;
  bottom: -12%;
  clip-path: var(--clip-tr);
}

.geo-ring {
  width: 40%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: clamp(0.75rem, 2vw, 1.25rem) solid var(--paper);
  right: 12%;
  bottom: 10%;
}

.geo-block {
  width: 52%;
  height: 44%;
  background: var(--ink);
  left: 18%;
  top: 28%;
  clip-path: var(--clip-bl);
}

/* ---------- Capability rows ---------- */

.capability-list {
  counter-reset: capability;
  border-top: 2px solid var(--ink);
}

.capability-row {
  display: grid;
  gap: 0.5rem;
  padding-block: clamp(1.75rem, 3.5vw, 2.5rem);
  border-bottom: 1px solid rgba(16, 27, 63, 0.18);
  text-decoration: none;
  color: inherit;
  transition:
    background-color 0.3s var(--ease-out),
    padding-left 0.3s var(--ease-out);
}

@media (min-width: 56rem) {
  .capability-row {
    grid-template-columns: 5rem minmax(0, 5fr) minmax(0, 6fr) 3rem;
    gap: 2rem;
    align-items: baseline;
  }
}

.capability-row:hover,
.capability-row:focus-visible {
  background: var(--offwhite);
  padding-left: 1rem;
}

.capability-number {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--muted);
}

.capability-row h3 {
  transition: color 0.25s var(--ease-out);
}

.capability-row:hover h3,
.capability-row:focus-visible h3 {
  color: var(--ink);
}

.capability-row p {
  color: var(--muted);
  font-size: 1rem;
}

.capability-arrow {
  justify-self: end;
  align-self: center;
  transition: transform 0.3s var(--ease-out);
}

@media (max-width: 55.99rem) {
  .capability-arrow {
    display: none;
  }
}

.capability-row:hover .capability-arrow,
.capability-row:focus-visible .capability-arrow {
  transform: translateX(6px);
}

/* ---------- Sensi spotlight ---------- */

.sensi-spotlight {
  background: var(--ink);
  color: var(--paper);
  clip-path: polygon(0 0, 100% clamp(1.5rem, 4vw, 3.5rem), 100% 100%, 0 calc(100% - clamp(1.5rem, 4vw, 3.5rem)));
  padding-block: calc(var(--section-y) + 2rem);
}

.sensi-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 62rem) {
  .sensi-grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 5rem;
  }
}

.sensi-spotlight h2 {
  color: var(--paper);
}

.sensi-spotlight .kicker {
  color: var(--cyan);
}

.sensi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* Sensi audio visual */
.sensi-visual {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--dark);
  clip-path: var(--clip-tr);
}

.sensi-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  height: 5rem;
}

.sensi-bars span {
  flex: 1;
  max-width: 0.8rem;
  background: var(--cyan);
  transform-origin: bottom;
  animation: bar-rise 1.8s var(--ease-out) infinite alternate;
}

.sensi-bars span:nth-child(3n) {
  background: var(--lime);
}

.sensi-bars span:nth-child(4n) {
  background: var(--lavender);
}

.sensi-bars span:nth-child(2) { animation-delay: 0.15s; }
.sensi-bars span:nth-child(3) { animation-delay: 0.4s; }
.sensi-bars span:nth-child(4) { animation-delay: 0.1s; }
.sensi-bars span:nth-child(5) { animation-delay: 0.55s; }
.sensi-bars span:nth-child(6) { animation-delay: 0.3s; }
.sensi-bars span:nth-child(7) { animation-delay: 0.7s; }
.sensi-bars span:nth-child(8) { animation-delay: 0.2s; }
.sensi-bars span:nth-child(9) { animation-delay: 0.5s; }
.sensi-bars span:nth-child(10) { animation-delay: 0.35s; }
.sensi-bars span:nth-child(11) { animation-delay: 0.6s; }
.sensi-bars span:nth-child(12) { animation-delay: 0.25s; }

@keyframes bar-rise {
  from {
    transform: scaleY(0.25);
  }
  to {
    transform: scaleY(1);
  }
}

.sensi-lines {
  display: grid;
  gap: 0.7rem;
}

.sensi-lines span {
  display: block;
  height: 0.55rem;
  background: rgba(251, 251, 247, 0.16);
}

.sensi-lines span:nth-child(1) { width: 82%; }
.sensi-lines span:nth-child(2) { width: 64%; }
.sensi-lines span:nth-child(3) { width: 74%; background: rgba(8, 207, 232, 0.35); }

.sensi-visual-caption {
  font-size: 0.875rem;
  color: rgba(251, 251, 247, 0.6);
}

/* ---------- Method ---------- */

.method-list {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 56rem) {
  .method-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
  }
}

.method-step {
  border-top: 2px solid var(--ink);
  padding-top: 1.25rem;
}

.field-dark .method-step {
  border-top-color: rgba(251, 251, 247, 0.25);
}

.method-number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3rem);
  line-height: 1;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}

.method-step h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.method-step p {
  font-size: 0.975rem;
  color: var(--muted);
}

.field-dark .method-step p {
  color: rgba(251, 251, 247, 0.65);
}

/* ---------- Platform rail ---------- */

.platform-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding-block: 1.5rem;
  border-top: 1px solid rgba(251, 251, 247, 0.2);
  border-bottom: 1px solid rgba(251, 251, 247, 0.2);
}

.platform-rail li {
  font-weight: 600;
  font-size: 1rem;
  color: rgba(251, 251, 247, 0.85);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.platform-rail li:not(:last-child)::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  background: var(--cyan);
}

/* ---------- Offers ---------- */

.offer-list {
  border-top: 2px solid var(--ink);
}

.offer-row {
  display: grid;
  gap: 0.35rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid rgba(16, 27, 63, 0.18);
}

@media (min-width: 56rem) {
  .offer-row {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) minmax(0, 3fr);
    gap: 2rem;
    align-items: baseline;
  }
}

.offer-row h3 {
  font-size: 1.3rem;
}

.offer-row p {
  color: var(--muted);
  font-size: 1rem;
}

.offer-price {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
}

@media (min-width: 56rem) {
  .offer-price {
    justify-self: end;
  }
}

/* ---------- Service detail sections ---------- */

.service-detail {
  display: grid;
  gap: 2rem;
  padding-block: clamp(3rem, 6vw, 5rem);
  border-top: 2px solid var(--ink);
}

@media (min-width: 62rem) {
  .service-detail {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 5rem;
  }
}

.service-detail .service-number {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--muted);
  display: block;
  margin-bottom: 1rem;
}

.service-detail h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  margin-bottom: 1rem;
}

.service-detail .lede {
  font-size: 1.15rem;
}

.service-points {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(16, 27, 63, 0.18);
}

.service-points li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding-block: 1rem;
  border-bottom: 1px solid rgba(16, 27, 63, 0.18);
}

.service-points li::before {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  background: var(--cyan);
  translate: 0 -1px;
}

/* ---------- Page hero (inner pages) ---------- */

.page-hero {
  background: var(--dark);
  color: var(--paper);
  padding-block: clamp(4rem, 9vw, 7rem);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - clamp(1.5rem, 4vw, 3rem)));
}

.page-hero h1 {
  color: var(--paper);
  max-width: 14ch;
}

.page-hero .lede {
  color: rgba(251, 251, 247, 0.72);
  margin-top: 1.5rem;
  max-width: 40ch;
}

/* ---------- Legal ---------- */

.legal-content {
  display: grid;
  gap: 2.5rem;
  max-width: 44rem;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}

.legal-content a {
  color: var(--ink);
  text-decoration-color: var(--cyan);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* ---------- Contact ---------- */

.contact-panel {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 62rem) {
  .contact-panel {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 5rem;
  }
}

.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  line-height: 1.15;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 3px solid var(--lime);
  overflow-wrap: anywhere;
  transition: border-color 0.25s var(--ease-out);
}

.contact-email:hover,
.contact-email:focus-visible {
  border-bottom-color: var(--cyan);
}

.contact-aside {
  background: var(--offwhite);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  clip-path: var(--clip-tr);
  align-self: start;
}

.contact-aside h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.contact-aside ul {
  display: grid;
  gap: 0.75rem;
}

.contact-aside li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  color: var(--muted);
}

.contact-aside li::before {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--ink);
  translate: 0 -1px;
}

/* ---------- Closing CTA ---------- */

.closing-cta {
  background: var(--dark);
  color: var(--paper);
  text-align: left;
}

.closing-cta h2 {
  color: var(--paper);
  max-width: 16ch;
}

.closing-cta .lede {
  color: rgba(251, 251, 247, 0.72);
  margin-top: 1.25rem;
}

.closing-cta .hero-actions {
  margin-top: 2rem;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--dark);
  color: rgba(251, 251, 247, 0.75);
  border-top: 1px solid rgba(251, 251, 247, 0.12);
  padding-block: clamp(3rem, 6vw, 5rem) 2rem;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

@media (min-width: 56rem) {
  .footer-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 2fr) minmax(0, 2fr);
    gap: 3rem;
  }
}

.footer-brand .brand {
  color: var(--paper);
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.975rem;
  max-width: 30ch;
}

.site-footer h2 {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--paper);
  margin-bottom: 1rem;
}

.footer-links {
  display: grid;
  gap: 0.6rem;
}

.footer-links a {
  display: inline-block;
  padding-block: 0.2rem;
  font-size: 0.975rem;
  color: rgba(251, 251, 247, 0.75);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--lime);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(251, 251, 247, 0.12);
  font-size: 0.875rem;
  color: rgba(251, 251, 247, 0.5);
}

/* ---------- Reveal ---------- */

.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 26rem) {
  :root {
    --gutter: 1rem;
  }

  body {
    font-size: 1rem;
  }

  .header-inner {
    gap: 0.75rem;
  }

  .brand {
    min-width: 0;
    flex-shrink: 1;
    gap: 0.5rem;
  }

  .brand-logo {
    width: 13rem;
  }

  .menu-toggle {
    flex: none;
    padding: 0.5rem 0.65rem;
    gap: 0.45rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .work-tags li {
    font-size: 0.78rem;
  }
}

/* Keep the full wordmark readable on narrow phones. */
@media (max-width: 22rem) {
  .header-inner {
    gap: 0.5rem;
  }

  .menu-toggle {
    padding-inline: 0.5rem;
    gap: 0.3rem;
    font-size: 0.875rem;
  }
}
