/* ==========================================================================
   DAP Dom Aukcyjno Powierniczy — stylesheet
   Editorial, European creative-business aesthetic.

   Contents
   01. Design tokens
   02. Reset & base
   03. Utilities & shared components
   04. Header & navigation
   05. Hero
   06. About
   07. Services
   08. Why / benefits (contrast section)
   09. Contact & form
   10. Footer
   11. Legal dialogs
   12. Reveal-on-scroll
   13. Responsive
   14. Reduced motion
   ========================================================================== */


/* ==========================================================================
   01. Design tokens
   ========================================================================== */
:root {
  /* Colour — warm neutrals, one accent, one deep contrast green */
  --paper: #f4efe7;
  --paper-2: #ebe4d6;
  --paper-3: #faf7f1;
  --ink: #1c1b19;
  --muted: #6a655c;
  --line: #d6cebf;

  --accent: #a8472a;          /* muted terracotta */
  --accent-dark: #8a3820;
  --accent-light: #e08a66;    /* accent for use on dark backgrounds */

  --green: #1f2d26;           /* deep green, contrast section */
  --on-dark: #efe9dd;
  --on-dark-muted: #a9b2a9;

  --error: #a32a1f;

  /* Typography */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Spacing scale */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;

  /* Layout */
  --container: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4.5rem, 9vw, 8.5rem);
  --header-h: 84px;
  --header-h-compact: 62px;

  /* Shape & motion */
  --radius: 2px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t: 0.35s;
}


/* ==========================================================================
   02. Reset & base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h-compact) + 1rem);
  -webkit-text-size-adjust: 100%;
}

html.nav-locked,
html.dialog-open {
  overflow: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

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

address {
  font-style: normal;
}

button, input, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

::selection {
  background: var(--accent);
  color: var(--paper);
}


/* ==========================================================================
   03. Utilities & shared components
   ========================================================================== */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9rem;
  transform: translateY(-200%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus {
  transform: none;
}

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

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

/* Line icons */
.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.icon--lg {
  width: 2.25rem;
  height: 2.25rem;
}

/* Expressive italic accent inside headings */
.display {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
}

.display em,
.hero h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

/* Small uppercase label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 2.25rem;
  height: 1px;
  background: currentColor;
}

.eyebrow__dot {
  width: 0.55rem;
  height: 0.7rem;
  background: var(--accent);
  border-radius: 0.3rem 0.3rem 0 0;
  flex: none;
}

.section-label {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-label::after {
  content: "";
  flex: 0 0 3.5rem;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
  align-self: center;
}

.section-label__num {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0;
  color: var(--accent);
}

.section-label--light {
  color: var(--on-dark-muted);
}

.section-label--light .section-label__num {
  color: var(--accent-light);
}

.section-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section-head .section-label {
  grid-column: 1 / -1;
  margin-bottom: 1.5rem;
}

.section-head .display {
  grid-column: 1 / span 9;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.55rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}

.btn .icon {
  width: 1.1rem;
  height: 1.1rem;
  transition: transform var(--t) var(--ease);
}

.btn:hover .icon {
  transform: translateX(4px);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--ink);
}

.btn--outline {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--outline:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--sm {
  padding: 0.7rem 1.1rem;
  font-size: 0.85rem;
}

/* Text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid currentColor;
  font-weight: 500;
  transition: color var(--t) var(--ease), gap var(--t) var(--ease);
}

.link-arrow .icon {
  width: 1.05rem;
  height: 1.05rem;
}

.link-arrow:hover {
  color: var(--accent);
  gap: 0.9rem;
}

.link-arrow--light {
  color: var(--on-dark);
}

.link-arrow--light:hover {
  color: var(--accent-light);
}

/* Illustration frames */
.media {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
}

.media svg {
  width: 100%;
  height: 100%;
}


/* ==========================================================================
   04. Header & navigation
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.site-header.is-scrolled,
.site-header.nav-open {
  background: rgba(244, 239, 231, 0.96);
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: var(--header-h);
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
  transition: height 0.3s var(--ease);
}

.site-header.is-scrolled .header__inner {
  height: var(--header-h-compact);
}

/* Text-based logo */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.brand__mark {
  width: 15px;
  height: 21px;
  background: var(--accent);
  border-radius: 8px 8px 0 0; /* echoes the arch motif used in the artwork */
  flex: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand__text strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.brand__text small {
  margin-top: 0.35rem;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand--light {
  color: var(--on-dark);
}

.brand--light .brand__text small {
  color: var(--on-dark-muted);
}

/* Desktop navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav ul {
  display: flex;
  gap: 2rem;
}

.nav a:not(.btn) {
  position: relative;
  padding: 0.4rem 0;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t) var(--ease);
}

.nav a:not(.btn):hover::after,
.nav a.is-active::after {
  transform: scaleX(1);
}

/* Menu toggle (mobile only) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}


/* ==========================================================================
   05. Hero
   ========================================================================== */
.hero {
  padding-top: calc(var(--header-h) + clamp(2rem, 5vw, 4.5rem));
}

.hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: center;
}

.hero__copy {
  grid-column: 1 / span 7;
  padding-right: 1rem;
}

.hero h1 {
  margin: 1.6rem 0 1.8rem;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.7rem, 6vw, 5.4rem);
  line-height: 1;
  letter-spacing: -0.025em;
  font-optical-sizing: auto;
}

.lead {
  max-width: 34rem;
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
  margin-top: 2.5rem;
}

/* Layered visual composition */
.hero__visual {
  grid-column: 8 / span 5;
  position: relative;
  aspect-ratio: 5 / 6;
}

.hero__img {
  position: absolute;
  overflow: hidden;
  background: var(--paper-2);
}

.hero__img svg {
  width: 100%;
  height: 100%;
}

.hero__img--main {
  top: 0;
  right: 0;
  width: 82%;
  aspect-ratio: 4 / 5;
}

.hero__img--small {
  left: 0;
  bottom: 0;
  width: 48%;
  aspect-ratio: 1;
  border: 10px solid var(--paper);
}

.hero__tag {
  position: absolute;
  top: 7%;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 1rem;
  background: var(--paper);
  border: 1px solid var(--ink);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.3;
}

.hero__stat {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: 44%;
  padding: 1.1rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  line-height: 1.2;
}

.hero__stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.7rem;
  font-weight: 300;
  line-height: 1;
  color: var(--accent-light);
}

.hero__stat span {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Ruled information strip */
.hero__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(3rem, 6vw, 5.5rem);
  border-top: 1px solid var(--ink);
}

.hero__meta > div {
  padding: 1.1rem 1.5rem 1.4rem 0;
}

.hero__meta > div + div {
  padding-left: 1.5rem;
  border-left: 1px solid var(--line);
}

.hero__meta dt {
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__meta dd {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.35;
}

.hero__meta a {
  border-bottom: 1px solid var(--accent);
  transition: color var(--t) var(--ease);
}

.hero__meta a:hover {
  color: var(--accent);
}


/* ==========================================================================
   06. About
   ========================================================================== */
.about__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: start;
}

.about__media {
  grid-column: 1 / span 6;
  position: relative;
}

.about__media .media {
  aspect-ratio: 6 / 5;
}

.about__statement {
  position: absolute;
  right: -4rem;
  bottom: -2.5rem;
  width: min(72%, 22rem);
  padding: 1.4rem 1.6rem 1.6rem;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.3;
}

.about__statement span {
  display: block;
  margin-bottom: 0.7rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
}

.about__text {
  grid-column: 8 / span 5;
  padding-top: clamp(0rem, 4vw, 4rem);
}

.about__text p + p {
  margin-top: 1.1rem;
  color: var(--muted);
}

.about__text .about__lead {
  margin-bottom: 1.6rem;
  font-size: 1.28rem;
  line-height: 1.55;
  color: var(--ink);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2.5rem;
  border-top: 1px solid var(--ink);
}

.facts > div {
  display: flex;
  flex-direction: column-reverse;
  padding: 1.1rem 0.75rem 0 0;
}

.facts > div + div {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}

.facts dd {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 300;
  line-height: 1;
  color: var(--accent);
}

.facts dt {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
}


/* ==========================================================================
   07. Services
   ========================================================================== */
.services__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 1.5rem;
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.services__head .section-label {
  grid-column: 1 / -1;
}

.services__head .display {
  grid-column: 1 / span 7;
}

.services__intro {
  grid-column: 9 / span 4;
  color: var(--muted);
}

/* Large featured service */
.feature {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid var(--ink);
}

.feature__media {
  grid-column: 1 / span 5;
  aspect-ratio: 6 / 7;
}

.feature__body {
  grid-column: 7 / span 6;
  display: flex;
  flex-direction: column;
}

.feature__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.feature__num {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 6vw, 5.5rem);
  font-weight: 300;
  line-height: 1;
  color: var(--accent);
}

.feature__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.9rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.feature__text {
  max-width: 34rem;
  margin-top: 1.2rem;
  color: var(--muted);
}

.feature__list {
  margin-top: auto;
  padding-top: 2rem;
}

.feature__list li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  font-weight: 500;
  font-size: 0.98rem;
}

.feature__list li:last-child {
  border-bottom: 1px solid var(--line);
}

.feature__list .icon {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--accent);
}

/* Numbered service rows */
.service-list {
  margin-top: clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line);
}

.service {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 1.5fr);
  column-gap: var(--gutter);
  align-items: start;
  margin-inline: -1rem;
  padding: 1.9rem 1rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(var(--paper-2), var(--paper-2)) no-repeat left center / 0% 100%;
  transition: background-size 0.55s var(--ease);
}

.service:hover {
  background-size: 100% 100%;
}

.service__num {
  padding-top: 0.45rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--muted);
  transition: color var(--t) var(--ease);
}

.service__title {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.service__title .icon {
  width: 1.7rem;
  height: 1.7rem;
  margin-top: 0.15rem;
  transition: color var(--t) var(--ease), transform var(--t) var(--ease);
}

.service__title h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.service__desc {
  color: var(--muted);
  transition: color var(--t) var(--ease);
}

.service:hover .service__num,
.service:hover .service__title .icon {
  color: var(--accent);
}

.service:hover .service__title .icon {
  transform: translateY(-2px);
}

.service:hover .service__desc {
  color: var(--ink);
}


/* ==========================================================================
   08. Why / benefits — contrast section
   ========================================================================== */
.section--dark {
  background: var(--green);
  color: var(--on-dark);
}

.why__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: start;
}

.why__intro {
  grid-column: 1 / span 4;
  position: sticky;
  top: calc(var(--header-h-compact) + 2rem);
}

.why__intro .display {
  margin: 1.5rem 0 1.4rem;
}

.why__intro .display em {
  color: var(--accent-light);
}

.why__text {
  max-width: 24rem;
  margin-bottom: 2rem;
  color: var(--on-dark-muted);
}

.benefits {
  grid-column: 6 / span 7;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gutter);
}

.benefit {
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid rgba(239, 233, 221, 0.28);
}

.benefit:nth-child(even) {
  margin-top: 4.5rem;
}

.benefit__num {
  display: block;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 6vw, 5.5rem);
  font-weight: 300;
  line-height: 1;
  color: var(--accent-light);
}

.benefit h3 {
  margin-bottom: 0.7rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.2;
}

.benefit p {
  color: var(--on-dark-muted);
  font-size: 1rem;
}


/* ==========================================================================
   09. Contact & form
   ========================================================================== */
.contact__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: start;
}

.contact__info {
  grid-column: 1 / span 5;
}

.contact__info .display {
  margin: 1.5rem 0 1.4rem;
}

.details {
  margin-top: 2.5rem;
  border-top: 1px solid var(--ink);
}

.details > div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.details dt {
  padding-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.details dd {
  font-size: 1rem;
  line-height: 1.5;
}

.details a {
  border-bottom: 1px solid var(--accent);
  transition: color var(--t) var(--ease);
}

.details a:hover {
  color: var(--accent);
}

/* Form panel */
.form {
  grid-column: 7 / span 6;
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2rem;
}

.field {
  margin-bottom: 0.9rem;
}

.field label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.field .req {
  color: var(--accent);
}

.field .opt {
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 400;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 0.65rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  font-size: 1.05rem;
  line-height: 1.5;
  outline: 0;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.field textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--accent);
  box-shadow: 0 1px 0 0 var(--accent);
}

.field.has-error input,
.field.has-error textarea {
  border-bottom-color: var(--error);
  box-shadow: 0 1px 0 0 var(--error);
}

.field__error {
  min-height: 1.4em;
  margin-top: 0.3rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--error);
}

.form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
  margin-top: 0.75rem;
}

.form__note {
  flex: 1 1 14rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}

.form__note a {
  border-bottom: 1px solid currentColor;
  transition: color var(--t) var(--ease);
}

.form__note a:hover {
  color: var(--accent);
}

.form__status {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--ink);
  background: var(--paper-2);
  font-size: 0.95rem;
  line-height: 1.55;
}

.form__status[hidden] {
  display: none;
}

.form__status.is-success {
  border-left-color: var(--green);
  background: #e6ebe3;
}

.form__status.is-error {
  border-left-color: var(--error);
  background: #f3e2dd;
}

.form__status strong {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
}

.form__status a {
  display: inline-block;
  margin-top: 0.5rem;
  border-bottom: 1px solid currentColor;
  font-weight: 500;
}

.form__status a:hover {
  color: var(--accent);
}


/* ==========================================================================
   10. Footer
   ========================================================================== */
.site-footer {
  position: relative;
  overflow: hidden;
  padding-top: clamp(3.5rem, 7vw, 6rem);
  background: var(--ink);
  color: var(--on-dark);
  font-size: 0.95rem;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 1fr 1.1fr;
  gap: 2.5rem var(--gutter);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.footer__brand p {
  max-width: 22rem;
  margin-top: 1.5rem;
  color: var(--on-dark-muted);
}

.footer__col h3 {
  margin-bottom: 1.1rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.footer__col li + li {
  margin-top: 0.5rem;
}

.footer__col p {
  line-height: 1.55;
}

.footer__col p + p {
  margin-top: 0.5rem;
  color: var(--on-dark-muted);
}

.footer__col address {
  line-height: 1.7;
}

.site-footer a {
  transition: color var(--t) var(--ease);
}

.site-footer a:not(.brand):hover {
  color: var(--accent-light);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 1.4rem 0;
  border-top: 1px solid rgba(239, 233, 221, 0.18);
  font-size: 0.85rem;
  color: var(--on-dark-muted);
}

.footer__bottom ul {
  display: flex;
  gap: 1.75rem;
}

.footer__wordmark {
  margin: 0 0 -0.14em;
  font-family: var(--font-display);
  font-size: clamp(7rem, 24vw, 19rem);
  font-weight: 300;
  line-height: 0.8;
  letter-spacing: -0.03em;
  color: rgba(239, 233, 221, 0.05);
  white-space: nowrap;
  user-select: none;
}


/* ==========================================================================
   11. Legal dialogs
   ========================================================================== */
.doc-dialog {
  width: min(720px, calc(100vw - 2rem));
  max-height: min(85vh, 46rem);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-top: 3px solid var(--accent);
  background: var(--paper);
  color: var(--ink);
}

.doc-dialog[open] {
  display: flex;
  flex-direction: column;
}

.doc-dialog::backdrop {
  background: rgba(28, 27, 25, 0.62);
}

.doc-dialog__inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.doc-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1.25rem, 4vw, 2rem) 1.25rem;
  border-bottom: 1px solid var(--line);
}

.doc-dialog__head h2 {
  margin-top: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 400;
  line-height: 1.1;
}

.doc-dialog__close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}

.doc-dialog__close:hover {
  background: var(--ink);
  color: var(--paper);
}

.doc-dialog__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.5rem clamp(1.25rem, 4vw, 2rem) 2.5rem;
  font-size: 0.98rem;
}

.doc-dialog__meta {
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.doc-dialog__body h3 {
  margin: 1.75rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
}

.doc-dialog__body p + p {
  margin-top: 0.7rem;
}

.doc-dialog__body a {
  border-bottom: 1px solid var(--accent);
}


/* ==========================================================================
   12. Reveal-on-scroll (only active when JS is running)
   ========================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}


/* ==========================================================================
   13. Responsive
   ========================================================================== */

/* Mid-size desktops */
@media (max-width: 1180px) {
  .why__intro {
    grid-column: 1 / span 5;
  }

  .benefits {
    grid-column: 7 / span 6;
  }

  .footer__top {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .footer__top > .footer__col:last-child {
    grid-column: 1 / -1;
  }
}

/* Tablet & mobile: stacked layouts, mobile menu */
@media (max-width: 960px) {
  :root {
    --header-h: 72px;
  }

  /* Navigation becomes a full-screen panel */
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2rem;
    padding: calc(var(--header-h) + 2rem) var(--gutter) 2rem;
    background: var(--paper);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }

  .nav ul {
    flex-direction: column;
    gap: 0;
  }

  .nav li {
    border-bottom: 1px solid var(--line);
  }

  .nav a:not(.btn) {
    display: block;
    padding: 1rem 0;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: -0.01em;
  }

  .nav a:not(.btn)::after {
    display: none;
  }

  .nav a.is-active {
    color: var(--accent);
  }

  .nav__cta {
    justify-content: center;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
  }

  /* Hero */
  .hero__copy {
    grid-column: 1 / -1;
    padding-right: 0;
  }

  .hero__visual {
    grid-column: 1 / -1;
    width: min(100%, 30rem);
    margin: 3.5rem 0 0 auto;
  }

  /* Section heads */
  .section-head .display {
    grid-column: 1 / -1;
  }

  /* About */
  .about__media,
  .about__text {
    grid-column: 1 / -1;
  }

  .about__text {
    padding-top: 4rem;
  }

  .about__statement {
    right: auto;
    left: 1.25rem;
    bottom: -3rem;
    width: min(80%, 22rem);
  }

  /* Services */
  .services__head .display,
  .services__intro {
    grid-column: 1 / -1;
  }

  .feature__media,
  .feature__body {
    grid-column: 1 / -1;
  }

  .feature__media {
    aspect-ratio: 4 / 3;
  }

  .feature__body {
    margin-top: 2rem;
  }

  /* Benefits */
  .why__intro,
  .benefits {
    grid-column: 1 / -1;
  }

  .why__intro {
    position: static;
    margin-bottom: 3rem;
  }

  /* Contact */
  .contact__info,
  .form {
    grid-column: 1 / -1;
  }

  .form {
    margin-top: 3.5rem;
  }
}

/* Small tablets / large phones */
@media (max-width: 720px) {
  .hero__meta {
    grid-template-columns: 1fr;
  }

  .hero__meta > div,
  .hero__meta > div + div {
    padding: 1rem 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .service {
    grid-template-columns: 3rem minmax(0, 1fr);
    row-gap: 0.75rem;
    column-gap: 1rem;
  }

  .service__desc {
    grid-column: 2;
  }

  .benefits {
    grid-template-columns: 1fr;
  }

  .benefit:nth-child(even) {
    margin-top: 0;
  }

  .footer__top {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand,
  .footer__top > .footer__col:last-child {
    grid-column: 1 / -1;
  }
}

/* Phones */
@media (max-width: 560px) {
  body {
    font-size: 1rem;
  }

  .brand__text small {
    font-size: 0.58rem;
    letter-spacing: 0.16em;
  }

  .hero__img--small {
    border-width: 7px;
  }

  .hero__tag {
    font-size: 0.64rem;
    padding: 0.55rem 0.75rem;
  }

  .hero__stat strong {
    font-size: 2.2rem;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .facts dd {
    font-size: 2rem;
  }

  .details > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .form__row {
    grid-template-columns: 1fr;
  }

  .form__footer .btn {
    width: 100%;
    justify-content: center;
  }

  .footer__top {
    grid-template-columns: 1fr;
  }

  .footer__bottom {
    flex-direction: column;
  }
}


/* ==========================================================================
   14. Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
