/* ==========================================================================
   FERIA Sp. z o.o.  |  style.css
   --------------------------------------------------------------------------
   1. Design tokens
   2. Base & reset
   3. Layout helpers
   4. Buttons & links
   5. Header & navigation
   6. Hero
   7. About
   8. Services
   9. Benefits
   10. Contact & form
   11. Footer
   12. Dialogs (legal)
   13. Illustration colours
   14. Reveal animation
   15. Responsive
   16. Reduced motion
   ========================================================================== */


/* 1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Colour: warm paper, charcoal, one deep green accent */
  --c-bg: #EFEBE2;
  --c-bg-alt: #E3DCCD;
  --c-paper: #F8F5EE;
  --c-ink: #262522;
  --c-muted: #5E584F;
  --c-line: rgba(38, 37, 34, .2);
  --c-green: #17473A;
  --c-green-dark: #0F3329;
  --c-sage: #9CC3AE;
  --c-error: #A1261B;

  /* Type */
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Newsreader", Georgia, "Times New Roman", serif;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --gap: clamp(1.5rem, 4vw, 4.5rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --header-h: 76px;

  /* Shape & motion */
  --radius: 2px;
  --ease: cubic-bezier(.22, .7, .2, 1);
}


/* 2. BASE & RESET
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; text-wrap: balance; }
p { text-wrap: pretty; }

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

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute !important;
  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: .75rem; left: .75rem;
  z-index: 300;
  padding: .7rem 1rem;
  background: var(--c-ink);
  color: var(--c-paper);
  font-family: var(--font-display);
  font-size: .9rem;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }


/* 3. LAYOUT HELPERS
   -------------------------------------------------------------------------- */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

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

.section-title {
  font-size: clamp(2.1rem, 4.6vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -.03em;
}


/* 4. BUTTONS & LINKS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.7rem;
  border: 1px solid var(--c-ink);
  border-radius: var(--radius);
  background: var(--c-ink);
  color: var(--c-paper);
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn:hover { background: var(--c-green); border-color: var(--c-green); }
.btn:active { transform: translateY(1px); }

.btn--sm {
  padding: .65rem 1.05rem;
  background: transparent;
  color: var(--c-ink);
  font-size: .85rem;
}
.btn--sm:hover { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-paper); }

.text-link {
  display: inline-block;
  padding-bottom: .15rem;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  transition: color .25s var(--ease), background-size .25s var(--ease);
}
.text-link:hover { color: var(--c-green); background-size: 40% 1px; }
.text-link--small { font-size: .85rem; }


/* 5. HEADER & NAVIGATION
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-scrolled {
  --header-h: 60px;
  background: rgba(239, 235, 226, .97);
  border-bottom-color: var(--c-line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: var(--header-h);
  transition: height .3s var(--ease);
}

/* Text-based logo: the arch is the identity motif of the whole site */
.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: baseline;
  gap: .55rem;
  text-decoration: none;
}
.brand__mark {
  align-self: center;
  width: .95rem;
  height: 1.3rem;
  background: var(--c-green);
  border-radius: 999px 999px 0 0;
}
.brand__name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1;
}
.brand__sub {
  font-family: var(--font-display);
  font-size: .78rem;
  color: var(--c-muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.site-nav__list { display: flex; align-items: center; gap: 2rem; }
.site-nav__link {
  padding-block: .35rem;
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  background: linear-gradient(var(--c-green), var(--c-green)) left bottom / 0 1.5px no-repeat;
  transition: background-size .3s var(--ease), color .2s;
}
.site-nav__link:hover,
.site-nav__link.is-active { background-size: 100% 1.5px; }

/* Mobile toggle (hidden on desktop) */
.nav-toggle {
  position: relative;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem; height: 2.75rem;
  margin-right: -.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before {
  display: block;
  width: 1.5rem; height: 1.5px;
  background: var(--c-ink);
  transition: transform .3s var(--ease), background-color .3s;
}
.nav-toggle__bars { position: relative; transform: translateY(-4px); }
.nav-toggle__bars::before { content: ""; position: absolute; left: 0; top: 8px; }
.menu-open .nav-toggle__bars { transform: rotate(45deg); }
.menu-open .nav-toggle__bars::before { transform: translateY(-8px) rotate(-90deg); top: 8px; }


/* 6. HERO
   -------------------------------------------------------------------------- */
.hero {
  padding-top: calc(var(--header-h) + clamp(2.5rem, 6vw, 5.5rem));
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--gap);
  align-items: center;
}

.hero__title {
  font-size: clamp(2.5rem, 11vw, 4.6rem);
  font-weight: 500;
  line-height: .96;
  letter-spacing: -.045em;
}
.hero__line { display: block; }
.hero__line--indent { padding-left: 1.1em; }

.hero__lead {
  max-width: 32em;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  justify-content: start;
  gap: 1rem 3rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.1rem;
  border-top: 1px solid var(--c-ink);
  font-size: 1rem;
}
.hero__meta dt {
  font-family: var(--font-display);
  font-size: .8rem;
  color: var(--c-muted);
}
.hero__meta dd { line-height: 1.4; }
.hero__meta a { text-underline-offset: .2em; }

/* Layered visual composition */
.hero__art {
  position: relative;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 5 / 6;
  justify-self: end;
}
.hero__art-block {
  position: absolute;
  right: 0; bottom: 0;
  width: 46%; height: 30%;
  background: var(--c-green);
}
.hero__art-main {
  position: absolute;
  top: 0; right: 6%;
  width: 76%;
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 0 0;
}
.hero__art-small {
  position: absolute;
  left: 0; bottom: 7%;
  width: 44%;
  aspect-ratio: 1;
  border: 8px solid var(--c-bg);
}
.hero__tag {
  position: absolute;
  left: 0; top: 0;
  display: flex;
  align-items: center;
  gap: .9rem;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-display);
  font-size: .85rem;
  color: var(--c-muted);
}
.hero__tag::after {
  content: "";
  width: 1px; height: 3.5rem;
  background: var(--c-ink);
}

/* Shared media frame (works for inline SVG illustrations and for real <img> photos) */
.media {
  position: relative;
  overflow: hidden;
  background: var(--c-bg-alt);
}
.media > svg,
.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* 7. ABOUT
   -------------------------------------------------------------------------- */
.about__head { margin-bottom: clamp(3rem, 6vw, 5.5rem); }
.about__head .section-title { max-width: 14em; margin-left: auto; }

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

.about__text {
  grid-column: 1 / 6;
}
.about__text > p + p { margin-top: 1.1rem; }
.about__lead {
  margin-bottom: 1.6rem;
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  line-height: 1.3;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--c-ink);
}
.fact { display: flex; flex-direction: column-reverse; gap: .35rem; }
.fact dt {
  font-family: var(--font-display);
  font-size: .8rem;
  line-height: 1.3;
  color: var(--c-muted);
}
.fact dd {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.04em;
}

.about__media {
  position: relative;
  grid-column: 6 / 13;
  margin-top: clamp(0rem, 7vw, 6rem);
}
.about__media::before {
  content: "";
  position: absolute;
  top: -1rem; right: -1rem;
  width: 46%; height: 52%;
  border: 1px solid var(--c-ink);
}
.about__image {
  position: relative;
  z-index: 1;
  aspect-ratio: 5 / 4;
}
.about__statement {
  position: absolute;
  z-index: 2;
  left: calc(var(--gap) * -.6); bottom: -2.5rem;
  width: min(21rem, 72%);
  padding: 1.5rem 1.6rem;
  background: var(--c-green);
  color: var(--c-paper);
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.3;
}


/* 8. SERVICES
   -------------------------------------------------------------------------- */
.services {
  background: var(--c-bg-alt);
}
.services__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.services__head .section-title { grid-column: 1 / 8; }
.services__head p { grid-column: 9 / 13; color: var(--c-muted); }

.services__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gap);
  align-items: start;
}

/* Featured service */
.feature {
  padding: 1.25rem;
  border: 1px solid var(--c-ink);
  background: var(--c-bg);
}
.feature__media {
  aspect-ratio: 4 / 4.4;
  border-radius: 999px 999px 0 0;
}
.feature__body { padding: 1.5rem .5rem .5rem; }
.feature__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  color: var(--c-green);
}
.feature__num {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--c-muted);
}
.feature__title {
  margin-bottom: .8rem;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  letter-spacing: -.03em;
  line-height: 1.05;
}
.feature__body > p { color: var(--c-muted); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.4rem 0 1.6rem;
}
.tags li {
  padding: .3rem .65rem;
  border: 1px solid var(--c-line);
  font-family: var(--font-display);
  font-size: .8rem;
  line-height: 1.3;
}

/* Keep the featured block in view while the rows scroll, but only on tall screens
   (a sticky block taller than the viewport would hide its lower part). */
@media (min-width: 960px) and (min-height: 900px) {
  .feature { position: sticky; top: calc(60px + 1.5rem); }
}

/* Numbered rows */
.svc-list { border-bottom: 1px solid var(--c-ink); }
.svc-row {
  display: grid;
  grid-template-columns: 3rem 2rem minmax(0, 1fr) 4.5rem;
  grid-template-areas: "num icon body action";
  gap: 1.25rem;
  align-items: start;
  padding: 1.85rem .75rem 1.85rem 0;
  border-top: 1px solid var(--c-ink);
  color: inherit;
  text-decoration: none;
  transition: background-color .3s var(--ease), padding-left .3s var(--ease);
}
.svc-row__num {
  grid-area: num;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.9;
  color: var(--c-muted);
  transition: color .3s var(--ease);
}
.svc-row__icon {
  grid-area: icon;
  margin-top: .2rem;
  color: var(--c-ink);
  transition: color .3s var(--ease);
}
.svc-row__body { grid-area: body; }
.svc-row__title {
  margin-bottom: .45rem;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  letter-spacing: -.025em;
  line-height: 1.15;
}
.svc-row__body p { max-width: 36em; color: var(--c-muted); font-size: 1.05rem; line-height: 1.55; }
.svc-row__action {
  grid-area: action;
  justify-self: end;
  padding-top: .5rem;
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 500;
  color: var(--c-green);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}

.svc-row:hover,
.svc-row:focus-visible {
  padding-left: .75rem;
  background: rgba(38, 37, 34, .05);
}
.svc-row:hover .svc-row__num,
.svc-row:focus-visible .svc-row__num,
.svc-row:hover .svc-row__icon,
.svc-row:focus-visible .svc-row__icon { color: var(--c-green); }
.svc-row:hover .svc-row__action,
.svc-row:focus-visible .svc-row__action { opacity: 1; transform: none; }


/* 9. BENEFITS (contrasting dark-green section)
   -------------------------------------------------------------------------- */
.benefits {
  background: var(--c-green);
  color: var(--c-paper);
}
.benefits ::selection { background: var(--c-paper); color: var(--c-green); }
.benefits :focus-visible { outline-color: var(--c-sage); }

.benefits__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--gap);
  align-items: start;
}
.benefits__intro {
  position: sticky;
  top: calc(60px + 2rem);
}
.benefits__intro p {
  max-width: 22em;
  margin-top: 1.25rem;
  color: rgba(248, 245, 238, .8);
}

.benefits__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
}
.benefit {
  padding: 1.4rem 0 3rem;
  border-top: 1px solid rgba(248, 245, 238, .35);
}
.benefit:nth-child(even) { margin-top: 4rem; }
.benefit__num {
  display: block;
  margin-bottom: 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 8vw, 7rem);
  font-weight: 300;
  line-height: .8;
  letter-spacing: -.06em;
  color: var(--c-sage);
}
.benefit__title {
  margin-bottom: .6rem;
  font-size: clamp(1.4rem, 2.2vw, 1.7rem);
  letter-spacing: -.025em;
  line-height: 1.15;
}
.benefit p { color: rgba(248, 245, 238, .82); font-size: 1.05rem; line-height: 1.6; }


/* 10. CONTACT & FORM
   -------------------------------------------------------------------------- */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gap);
  align-items: start;
}
.contact__intro {
  max-width: 24em;
  margin-top: 1.25rem;
  color: var(--c-muted);
}

.company {
  margin-top: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--c-ink);
}
.company__row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--c-ink);
}
.company dt {
  padding-top: .2rem;
  font-family: var(--font-display);
  font-size: .85rem;
  color: var(--c-muted);
}
.company dd { line-height: 1.45; }
.company address { margin-bottom: .35rem; }
.company__email {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  text-underline-offset: .22em;
}
.company__email:hover { color: var(--c-green); }

.contact__form {
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--c-ink);
  background: var(--c-paper);
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2rem;
}
.field { margin-bottom: 1.5rem; }
.field label {
  display: block;
  margin-bottom: .2rem;
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 500;
}
.field__optional { font-weight: 400; color: var(--c-muted); }

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: .65rem 0;
  border: 0;
  border-bottom: 1px solid var(--c-ink);
  border-radius: 0;
  background: transparent;
  font-size: 1.125rem;
  line-height: 1.4;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--c-green);
  box-shadow: 0 1px 0 var(--c-green);
}
.field input.is-invalid,
.field textarea.is-invalid {
  border-bottom-color: var(--c-error);
  box-shadow: 0 1px 0 var(--c-error);
}
.field__error {
  margin-top: .45rem;
  font-family: var(--font-display);
  font-size: .85rem;
  line-height: 1.4;
  color: var(--c-error);
}
.field__error:empty { display: none; }

.form__note {
  margin-bottom: 1.5rem;
  font-size: .95rem;
  color: var(--c-muted);
}
.form__note a { text-underline-offset: .2em; }
.form__note a:hover { color: var(--c-green); }

.form__status {
  margin-top: 1.25rem;
  padding: .9rem 1.1rem;
  border-left: 3px solid var(--c-green);
  background: rgba(23, 71, 58, .08);
  font-size: 1rem;
  line-height: 1.5;
}
.form__status:empty { display: none; }
.form__status[data-type="error"] {
  border-left-color: var(--c-error);
  background: rgba(161, 38, 27, .08);
}


/* 11. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
  border-top: 1px solid var(--c-ink);
  background: var(--c-bg-alt);
  font-size: 1rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.5rem var(--gap);
}
.footer__brand p {
  max-width: 24em;
  margin-top: 1.1rem;
  color: var(--c-muted);
}
.footer__title {
  margin-bottom: .9rem;
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 500;
  color: var(--c-muted);
}
.footer__col li + li { margin-top: .35rem; }
.footer__col a { text-decoration: none; background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size .25s var(--ease); }
.footer__col a:hover { background-size: 100% 1px; }
.footer__col address { line-height: 1.6; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-block: 1.25rem 1.75rem;
  border-top: 1px solid var(--c-line);
  font-size: .9rem;
  color: var(--c-muted);
}


/* 12. DIALOGS (legal)
   -------------------------------------------------------------------------- */
.dialog {
  width: min(40rem, calc(100% - 2rem));
  max-height: min(85vh, 46rem);
  padding: 0;
  border: 1px solid var(--c-ink);
  border-radius: var(--radius);
  background: var(--c-paper);
  color: var(--c-ink);
  overflow: hidden;
}
.dialog::backdrop { background: rgba(38, 37, 34, .6); }
.dialog[open] { animation: dialog-in .25s var(--ease); }
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.dialog__inner {
  position: relative;
  max-height: min(85vh, 46rem);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  overflow-y: auto;
  font-size: 1.05rem;
}
.dialog__title {
  margin-bottom: 1.25rem;
  padding-right: 5rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -.03em;
  line-height: 1.05;
}
.dialog h3 {
  margin: 1.5rem 0 .35rem;
  font-size: 1.05rem;
  letter-spacing: -.01em;
}
.dialog p { color: var(--c-muted); }
.dialog a { color: var(--c-ink); text-underline-offset: .2em; }
.dialog__close {
  position: absolute;
  top: clamp(1.25rem, 3vw, 2rem);
  right: clamp(1.25rem, 3vw, 2rem);
  padding: .5rem .85rem;
  border: 1px solid var(--c-ink);
  border-radius: var(--radius);
  background: transparent;
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.dialog__close:hover { background: var(--c-ink); color: var(--c-paper); }


/* 13. ILLUSTRATION COLOURS
   Inline SVG illustrations use these classes so the palette stays in one place.
   -------------------------------------------------------------------------- */
.art { width: 100%; height: 100%; }
.f-ink     { fill: var(--c-ink); }
.f-ink-2   { fill: #3A3833; }
.f-ink-3   { fill: #171613; }
.f-paper   { fill: var(--c-paper); }
.f-sand    { fill: var(--c-bg-alt); }
.f-sand-d  { fill: #D3C8B3; }
.f-green   { fill: var(--c-green); }
.f-green-d { fill: var(--c-green-dark); }
.f-sage    { fill: var(--c-sage); }
.s-ink     { stroke: var(--c-ink); }
.s-paper   { stroke: var(--c-paper); }
.s-green-d { stroke: var(--c-green-dark); }


/* 14. REVEAL ANIMATION
   Content stays visible unless JavaScript is running (the .js class is set in <head>).
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease) var(--d, 0ms), transform .6s var(--ease) var(--d, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* The one signature moment: the hero arch rises, then the supporting blocks settle in */
.js .reveal--art { opacity: 1; transform: none; transition: none; }
.js .reveal--art .hero__art-main {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1s var(--ease) .15s;
}
.js .reveal--art .hero__art-block,
.js .reveal--art .hero__art-small,
.js .reveal--art .hero__tag {
  opacity: 0;
  transition: opacity .6s var(--ease) .7s;
}
.js .reveal--art.is-visible .hero__art-main { clip-path: inset(0 0 0 0); }
.js .reveal--art.is-visible .hero__art-block,
.js .reveal--art.is-visible .hero__art-small,
.js .reveal--art.is-visible .hero__tag { opacity: 1; }


/* 15. RESPONSIVE
   -------------------------------------------------------------------------- */

/* Large desktop: let the headline breathe */
@media (min-width: 960px) {
  .hero__title { font-size: clamp(3.2rem, 5.6vw, 5rem); }
}

/* Tablet & below: single-column layouts, mobile navigation */
@media (max-width: 959px) {
  :root { --header-h: 68px; }

  /* Navigation becomes a full-screen panel */
  .nav-toggle { display: inline-flex; }
  .site-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) + 1.5rem) var(--gutter) 2rem;
    background: var(--c-bg);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
  }
  .menu-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav__link {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid var(--c-line);
    font-size: 1.9rem;
    font-weight: 500;
    letter-spacing: -.03em;
    background-image: none;
  }
  .site-nav__link.is-active { color: var(--c-green); }
  .site-nav__cta { align-self: flex-start; padding: 1rem 1.5rem; font-size: .95rem; }
  .site-header.menu-open { background: var(--c-bg); border-bottom-color: transparent; }

  /* Hero */
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__art { justify-self: start; max-width: 460px; }

  /* About */
  .about__head .section-title { margin-left: 0; }
  .about__layout { display: block; }
  .about__media { margin-top: 4rem; margin-right: 1rem; }
  .about__media::before { right: -1rem; }
  .about__statement { left: 1rem; bottom: -2rem; }

  /* Services */
  .services__head { display: block; }
  .services__head p { margin-top: 1.25rem; max-width: 30em; }
  .services__grid { grid-template-columns: minmax(0, 1fr); }
  .feature { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.5rem; }
  .feature__body { padding: .5rem .5rem .5rem 0; }

  /* Benefits */
  .benefits__grid { grid-template-columns: minmax(0, 1fr); }
  .benefits__intro { position: static; }

  /* Contact */
  .contact__grid { grid-template-columns: minmax(0, 1fr); }

  /* Footer */
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}

/* Large phones & small tablets */
@media (max-width: 679px) {
  body { font-size: 1.0625rem; }

  .hero__line--indent { padding-left: .6em; }
  .hero__art { max-width: 380px; }
  .hero__meta { grid-template-columns: minmax(0, 1fr); gap: 1rem; }

  .about__lead { font-size: 1.35rem; }
  .facts { gap: .75rem; }
  .fact dt { font-size: .75rem; }

  .feature { display: block; }
  .feature__body { padding: 1.5rem .25rem .25rem; }

  .svc-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "num icon action"
      "body body body";
    gap: .9rem 1rem;
    padding: 1.5rem 0;
  }
  .svc-row__num { line-height: 1.6; }
  .svc-row__icon { justify-self: start; margin-top: 0; }
  .svc-row__action { opacity: 1; transform: none; padding-top: 0; color: var(--c-muted); }
  .svc-row:hover, .svc-row:focus-visible { padding-left: 0; }

  .benefits__list { grid-template-columns: minmax(0, 1fr); }
  .benefit:nth-child(even) { margin-top: 0; }
  .benefit { padding-bottom: 2.25rem; }

  .form__row { grid-template-columns: minmax(0, 1fr); }
  .company__row { grid-template-columns: 5.25rem minmax(0, 1fr); gap: .75rem; }

  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__bottom { flex-direction: column; }
}

/* Very small screens */
@media (max-width: 380px) {
  .brand__sub { display: none; }
  .btn { width: 100%; }
  .hero__actions { flex-direction: column; align-items: flex-start; }
  .hero__actions .btn { width: 100%; }
}


/* 16. REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }

  .js .reveal { opacity: 1; transform: none; }
  .js .reveal--art .hero__art-main { clip-path: none; }
  .js .reveal--art .hero__art-block,
  .js .reveal--art .hero__art-small,
  .js .reveal--art .hero__tag { opacity: 1; }
}
