/* DFYN LTD — Scale Cascade core */
:root {
  --ink: #42142f;
  --peach: #c9b8e4;
  --pear: #00a36a;
  --ultra: #143d36;
  --copper: #c23a7a;
  --aqua: #f3d9a0;
  --chalk: #efe4cc;
  --rose: #2c3f6b;
  --iron: #6a6158;
  --cocoa: #1a0b16;

  --font-d: "Syne", "Helvetica Neue", Arial, sans-serif;
  --font-b: "Newsreader", "Georgia", serif;
  --font-m: "IBM Plex Mono", "Courier New", monospace;

  --t-far: clamp(2.6rem, 9.2vw, 11.4rem);
  --t-mid: clamp(2.1rem, 5.4vw, 5.8rem);
  --t-close: clamp(1.45rem, 2.2vw, 2.6rem);
  --t-micro: clamp(1rem, 1.15vw, 1.35rem);
  --t-body: clamp(1.02rem, 1.08vw, 1.2rem);
  --t-data: 0.75rem;

  --pad-x: clamp(1.1rem, 4.2vw, 4.5rem);
  --pad-y: clamp(3.5rem, 10vh, 8rem);
  --max: 1680px;
  --r: 0;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
  background: var(--chalk);
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--chalk);
  font-family: var(--font-b);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote {
  margin: 0;
}

ul, ol { padding: 0; list-style: none; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--pear);
  color: var(--ink);
  padding: 0.6rem 1rem;
  z-index: 1000;
}
.skip:focus { left: 0.6rem; top: 0.6rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: var(--header);
  padding: 0.55rem var(--pad-x);
  background: var(--ink);
  color: var(--chalk);
  border-bottom: 0;
}

.brand {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: baseline;
  gap: 0.85rem;
  min-width: 0;
}

.logo {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: 0.02em;
  line-height: 1;
}
.logo span {
  font-weight: 600;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  margin-left: 0.32rem;
  color: var(--pear);
}

.scale-ref {
  font-family: var(--font-m);
  font-size: 0.68rem;
  color: color-mix(in srgb, var(--chalk) 55%, var(--ink));
  letter-spacing: 0.06em;
}

.nav-desktop {
  display: flex;
  justify-content: flex-end;
  gap: clamp(0.9rem, 1.8vw, 1.8rem);
  margin-right: clamp(0.6rem, 2vw, 2rem);
  flex-wrap: wrap;
}

.nav-desktop a {
  font-family: var(--font-d);
  font-size: 0.86rem;
  font-weight: 500;
  position: relative;
  padding: 0.35rem 0;
}
.nav-desktop a:hover { font-weight: 700; }
.nav-desktop a.is-active::after,
.nav-desktop a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.08rem;
  height: 2px;
  width: 0.7rem;
  background: var(--pear);
}

.header-cta {
  justify-self: end;
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 1.2rem;
  height: 2px;
  background: var(--chalk);
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.nav-mobile {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-d);
  font-weight: 600;
  border: 0;
  border-radius: var(--r);
  cursor: pointer;
  text-align: center;
  transition: transform 280ms var(--ease), background-color 280ms var(--ease), color 280ms var(--ease);
  line-height: 1;
}
.btn:hover { transform: scale(1.015); }
.btn:focus-visible {
  outline: 2px solid var(--ultra);
  outline-offset: 3px;
}

.btn-sm {
  font-size: 0.78rem;
  padding: 0.7rem 0.95rem;
}
.btn-md {
  font-size: 0.92rem;
  padding: 0.95rem 1.25rem;
}
.btn-lg {
  font-size: 1.05rem;
  padding: 1.2rem 1.7rem;
}

.btn-pear { background: var(--pear); color: var(--ink); }
.btn-pear:hover { background: color-mix(in srgb, var(--pear) 78%, #fff); }
.btn-ultra { background: var(--ultra); color: var(--chalk); }
.btn-ultra:hover { background: color-mix(in srgb, var(--ultra) 86%, var(--ink)); }
.btn-copper { background: var(--copper); color: var(--chalk); }
.btn-copper:hover { background: color-mix(in srgb, var(--copper) 86%, var(--cocoa)); }

.link-text {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: 0.92rem;
}
.link-text:hover { opacity: 0.72; }

.mono {
  font-family: var(--font-m);
  font-size: var(--t-data);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.display {
  font-family: var(--font-d);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.92;
}

.section {
  padding: var(--pad-y) var(--pad-x);
}

.wrap {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: color-mix(in srgb, var(--chalk) 70%, var(--peach));
  padding: 1.15rem var(--pad-x) 1.35rem;
  font-family: var(--font-m);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  border-top: 3px solid var(--pear);
}
.footer-grid {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 0.9fr;
  gap: 1rem 2.4rem;
  align-items: start;
}
.site-footer a:hover { color: var(--pear); }
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
}
.footer-legal { color: color-mix(in srgb, var(--chalk) 55%, var(--cocoa)); }

/* Form */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.4rem;
}
.field label {
  font-family: var(--font-d);
  font-weight: 600;
}
.field .hint {
  font-family: var(--font-m);
  font-size: 0.72rem;
  color: var(--iron);
}
.field input,
.field textarea {
  border: 1px solid var(--iron);
  background: var(--chalk);
  color: var(--ink);
  border-radius: var(--r);
  padding: 0.85rem 0.9rem;
  width: 100%;
}
.field textarea { min-height: 10rem; resize: vertical; }
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--ultra);
  outline-offset: 1px;
  border-color: var(--ultra);
}
.field.is-error input,
.field.is-error textarea { border-color: var(--copper); }
.field .error {
  display: none;
  color: var(--cocoa);
  font-size: 0.85rem;
}
.field.is-error .error { display: block; }
.form-success {
  display: none;
  background: var(--aqua);
  color: var(--ink);
  padding: 1.4rem;
  margin-top: 1rem;
}
.form-success.is-on { display: block; }
.pear-tick {
  width: 8px;
  height: 8px;
  background: var(--pear);
  display: inline-block;
  margin-left: 0.4rem;
  opacity: 0;
}
.field:focus-within .pear-tick { opacity: 1; }

@media (max-width: 1140px) {
  .nav-desktop,
  .header-cta { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-header { grid-template-columns: 1fr auto; }
  .nav-mobile {
    display: none;
    position: fixed;
    inset: var(--header) 0 0 0;
    background: var(--ink);
    color: var(--chalk);
    z-index: 79;
    padding: 8vh var(--pad-x) 3rem;
    overflow: auto;
  }
  .nav-mobile.is-open { display: flex; flex-direction: column; gap: 0.2rem; }
  .nav-mobile a {
    font-family: var(--font-d);
    font-weight: 600;
    display: flex;
    align-items: center;
    min-height: 3.2rem;
    letter-spacing: -0.03em;
  }
  .nav-mobile a:nth-child(1) { font-size: clamp(2.4rem, 10vw, 3.6rem); color: var(--chalk); }
  .nav-mobile a:nth-child(2) { font-size: 1rem; color: var(--pear); }
  .nav-mobile a:nth-child(3) { font-size: 1.7rem; color: var(--chalk); }
  .nav-mobile a:nth-child(4) { font-size: clamp(2.2rem, 8vw, 3.1rem); color: var(--chalk); }
  .nav-mobile a:nth-child(5) {
    margin-top: 1.6rem;
    font-size: 1rem;
    background: var(--pear);
    color: var(--ink);
    width: fit-content;
    padding: 0.85rem 1.1rem;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
}

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