/* =========================================================================
   ELENA MORETTI — INTERIOR DESIGN
   Main stylesheet
   -------------------------------------------------------------------------
   1. Design tokens (edit colours & fonts here)
   2. Base
   3. Layout helpers & typography
   4. Header / navigation / mobile menu
   5. Hero
   6. About
   7. Parallax bands
   8. Works
   9. Services
   10. Contacts & form
   11. Footer
   12. Reveal animations
   13. Maintenance page
   14. Responsive
   15. Reduced motion
   ========================================================================= */

/* 1. DESIGN TOKENS ------------------------------------------------------- */
:root {
  /* Anthracite (primary) */
  --anthracite-900: #1c1e21;
  --anthracite-800: #232528;
  --anthracite-700: #2e3135;
  --anthracite-600: #3c4045;
  --anthracite-400: #6b7078;

  /* Azure (accent) — use sparingly */
  --azure: #8cc3e6;          /* on dark backgrounds */
  --azure-strong: #2f78ad;   /* on light backgrounds (AA contrast) */
  --azure-soft: rgba(140, 195, 230, .16);

  /* Neutrals */
  --white: #ffffff;
  --paper: #f5f4f1;
  --stone: #e8e6e1;
  --line: #d9d6d0;
  --ink: #232528;
  --ink-soft: #5a5f66;

  /* Typography */
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Spacing & layout */
  --gutter: clamp(20px, 4.5vw, 72px);
  --section-space: clamp(96px, 14vw, 200px);
  --max-width: 1440px;
  --header-h: 88px;

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --slow: 1.1s;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
address { font-style: normal; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

::selection { background: var(--azure); color: var(--anthracite-900); }

:focus-visible {
  outline: 1px solid var(--azure-strong);
  outline-offset: 4px;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--anthracite-800); color: var(--white);
  padding: 10px 16px; font-size: 13px;
  transition: top .3s var(--ease);
}
.skip-link:focus { top: 16px; }

/* 3. LAYOUT & TYPOGRAPHY ------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section-space) 0; position: relative; }
.section--dark { background: var(--anthracite-800); color: var(--stone); }

.label {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 11px; font-weight: 500;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: clamp(28px, 3vw, 44px);
}
.label::before {
  content: ""; width: 36px; height: 1px; background: var(--azure-strong);
}
.label__num { color: var(--azure-strong); font-weight: 600; }
.label--light { color: rgba(255,255,255,.6); }
.label--light::before { background: var(--azure); }
.label--light .label__num { color: var(--azure); }

.display {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(34px, 4.2vw, 64px);
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--anthracite-800);
}
.display em { font-style: italic; font-weight: 300; }
.display--xl { font-size: clamp(44px, 6.4vw, 104px); line-height: 1; letter-spacing: -.02em; }
.display--light { color: var(--white); }

.link {
  position: relative;
  color: var(--ink);
  background-image: linear-gradient(var(--azure-strong), var(--azure-strong));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .6s var(--ease), color .4s var(--ease);
  padding-bottom: 2px;
}
.link:hover, .link:focus-visible { color: var(--azure-strong); background-size: 100% 1px; }
.link--light { color: rgba(255,255,255,.7); background-image: linear-gradient(var(--azure), var(--azure)); }
.link--light:hover { color: var(--azure); }

.btn {
  display: inline-flex; align-items: center; gap: 14px;
  height: 56px; padding: 0 30px;
  font-size: 12px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  border: 1px solid transparent;
  transition: background-color .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease);
}
.btn span[aria-hidden] { transition: transform .5s var(--ease); display: inline-block; }
.btn:hover span[aria-hidden] { transform: translateX(6px); }

.btn--accent { border-color: var(--azure); color: var(--azure); }
.btn--accent:hover { background: var(--azure); color: var(--anthracite-900); }

.btn--dark { background: var(--anthracite-800); color: var(--white); }
.btn--dark:hover { background: var(--azure-strong); }
.btn[disabled] { opacity: .55; cursor: progress; }

/* 4. HEADER -------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  color: var(--white);
  transition: background-color .6s var(--ease), backdrop-filter .6s var(--ease), transform .6s var(--ease);
}
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: rgba(255,255,255,.14);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1s var(--ease);
}
.site-header__inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  transition: height .6s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(28, 30, 33, .86);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
}
.site-header.is-scrolled::after { transform: scaleX(1); }
.site-header.is-scrolled .site-header__inner { height: 68px; }
.site-header.is-hidden { transform: translateY(-100%); }

.logo { display: flex; flex-direction: column; line-height: 1; position: relative; z-index: 2; }
.logo__name {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 400;
  letter-spacing: .06em;
}
.logo__name--sm { font-size: 20px; }
.logo__tag {
  margin-top: 6px;
  font-size: 9px; font-weight: 500;
  letter-spacing: .38em; text-transform: uppercase;
  opacity: .7;
}

.nav__list { display: flex; gap: clamp(22px, 3vw, 48px); }
.nav__link {
  position: relative;
  font-size: 11px; font-weight: 500;
  letter-spacing: .24em; text-transform: uppercase;
  color: rgba(255,255,255,.78);
  padding: 8px 0;
  transition: color .4s var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--azure);
  transform: scaleX(0); transform-origin: right;
  transition: transform .6s var(--ease);
}
.nav__link:hover { color: var(--white); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__link.is-active { color: var(--azure); }

/* Hamburger */
.menu-toggle {
  display: none;
  position: relative; z-index: 2;
  width: 44px; height: 44px;
  margin-right: -10px;
}
.menu-toggle span {
  position: absolute; left: 10px; right: 10px; height: 1px;
  background: currentColor;
  transition: transform .6s var(--ease), top .6s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 18px; }
.menu-toggle span:nth-child(2) { top: 26px; }
.menu-open .menu-toggle span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--anthracite-900);
  color: var(--white);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 6vh) var(--gutter) 40px;
  opacity: 0; visibility: hidden;
  transition: opacity .6s var(--ease), visibility 0s linear .6s;
}
.menu-open .mobile-menu {
  opacity: 1; visibility: visible;
  transition: opacity .6s var(--ease), visibility 0s;
}
.mobile-menu li {
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.menu-open .mobile-menu li { opacity: 1; transform: none; }
.menu-open .mobile-menu li:nth-child(1) { transition-delay: .10s; }
.menu-open .mobile-menu li:nth-child(2) { transition-delay: .16s; }
.menu-open .mobile-menu li:nth-child(3) { transition-delay: .22s; }
.menu-open .mobile-menu li:nth-child(4) { transition-delay: .28s; }
.menu-open .mobile-menu li:nth-child(5) { transition-delay: .34s; }
.mobile-menu nav a {
  display: flex; align-items: baseline; gap: 18px;
  font-family: var(--font-display);
  font-size: clamp(40px, 11vw, 64px); font-weight: 300;
  line-height: 1.25;
}
.mobile-menu nav a span {
  font-family: var(--font-body);
  font-size: 11px; letter-spacing: .2em; color: var(--azure);
}
.mobile-menu nav a.is-active { font-style: italic; }
.mobile-menu__foot {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; color: rgba(255,255,255,.6);
}
.mobile-menu__foot a { color: var(--azure); }

/* 5. HERO ---------------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--anthracite-900);
  color: var(--white);
  display: grid; place-items: center;
}
.hero__media { position: absolute; inset: 0; overflow: hidden; }
.hero__img {
  position: absolute; left: 0; top: 0;
  width: 100%; height: 125%;
  object-fit: cover;
  will-change: transform;
  animation: heroIn 2.8s var(--ease-out) both;
}
@keyframes heroIn {
  from { opacity: 0; scale: 1.08; }
  to   { opacity: 1; scale: 1; }
}
.hero__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(28,30,33,.55) 0%, rgba(28,30,33,.12) 28%, rgba(28,30,33,.18) 60%, rgba(28,30,33,.7) 100%),
    radial-gradient(ellipse at center, rgba(28,30,33,.35), rgba(28,30,33,0) 65%);
}
.hero__content {
  position: relative; z-index: 1;
  text-align: center;
  padding: 0 var(--gutter);
  will-change: transform, opacity;
}
.hero__eyebrow {
  font-size: 11px; font-weight: 500;
  letter-spacing: .38em; text-transform: uppercase;
  color: rgba(255,255,255,.82);
  margin-bottom: 28px;
  animation: fadeUp 1.4s var(--ease-out) .9s both;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(64px, 12.5vw, 196px);
  line-height: .8;
  letter-spacing: -.02em;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > span { display: inline-block; animation: lineUp 1.6s var(--ease-out) both; }
.hero__title .line:nth-child(1) > span { animation-delay: .35s; }
.hero__title .line:nth-child(2) > span { animation-delay: .5s; }
.hero__title em { font-style: italic; }
.hero__title-accent { color: var(--azure); }
.hero__claim {
  margin-top: 30px;
  font-family: var(--font-display);
  font-style: italic; font-weight: 300;
  font-size: clamp(18px, 1.7vw, 24px);
  color: rgba(255,255,255,.88);
  display: inline-flex; align-items: center; gap: 18px;
  animation: fadeUp 1.4s var(--ease-out) 1.1s both;
}
.hero__claim::before, .hero__claim::after {
  content: ""; width: 40px; height: 1px; background: var(--azure);
}
@keyframes lineUp { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.hero__scroll {
  position: absolute; left: 50%; bottom: 34px; z-index: 1;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-size: 10px; letter-spacing: .34em; text-transform: uppercase;
  color: rgba(255,255,255,.7);
  animation: fadeUp 1.4s var(--ease-out) 1.6s both;
}
.hero__scroll i {
  position: relative; width: 1px; height: 56px; overflow: hidden;
  background: rgba(255,255,255,.22);
}
.hero__scroll i::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 50%;
  background: var(--azure);
  animation: scrollLine 2.6s var(--ease) infinite;
}
@keyframes scrollLine {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(200%); }
}

/* 6. ABOUT --------------------------------------------------------------- */
.about { background: var(--paper); }
.about__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(16px, 2vw, 32px);
  align-items: start;
}
.about__text { grid-column: 1 / span 6; padding-top: clamp(0px, 4vw, 60px); }
.about__text .display { max-width: 15ch; margin-bottom: clamp(40px, 4vw, 64px); }
.about__cols {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 22px clamp(24px, 3vw, 48px);
  color: var(--ink-soft);
  font-size: 15px;
}
.about__cols p:first-child::first-letter {
  font-family: var(--font-display);
  float: left;
  font-size: 64px; line-height: .8;
  padding: 6px 10px 0 0;
  color: var(--anthracite-800);
}
.facts {
  display: flex;
  margin-top: clamp(48px, 5vw, 80px);
  border-top: 1px solid var(--line);
}
.facts > div { padding: 24px 16px 0 0; }
.facts dt {
  font-family: var(--font-display);
  font-size: clamp(32px, 3vw, 44px); font-weight: 300; line-height: 1;
  color: var(--anthracite-800);
}
.facts dd { margin-top: 10px; font-size: 12px; letter-spacing: .06em; color: var(--ink-soft); }

.about__figure { grid-column: 8 / span 5; position: relative; }
.about__frame {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5.4;
  background: var(--stone);
}
.about__frame img {
  position: absolute; left: 0; top: -8%;
  width: 100%; height: 116%;
  object-fit: cover;
  will-change: transform;
}
.about__figure::before {
  content: ""; position: absolute; z-index: -1;
  right: -24px; top: 48px; bottom: -24px; width: 60%;
  border: 1px solid var(--line);
}
.about__figure figcaption {
  margin-top: 16px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft);
}

/* 7. PARALLAX BANDS ----------------------------------------------------- */
.band {
  position: relative;
  height: clamp(420px, 88vh, 900px);
  overflow: hidden;
  background: var(--anthracite-800);
  display: grid; place-items: center;
}
.band__img {
  position: absolute; left: 0; top: -15%;
  width: 100%; height: 130%;
  object-fit: cover;
  will-change: transform;
}
.band__veil { position: absolute; inset: 0; background: rgba(28,30,33,.42); }
.band__veil--soft { background: linear-gradient(180deg, rgba(28,30,33,.18), rgba(28,30,33,.05) 50%, rgba(28,30,33,.25)); }
.band__quote {
  position: relative; z-index: 1;
  max-width: 900px; padding: 0 var(--gutter);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(28px, 3.6vw, 54px);
  line-height: 1.2;
  color: var(--white);
}
.band__quote em { color: var(--azure); }

/* 8. WORKS -------------------------------------------------------------- */
.works { background: var(--paper); }
.section-head {
  display: grid; grid-template-columns: 1fr minmax(260px, 380px);
  align-items: end; gap: 40px;
  margin-bottom: clamp(64px, 8vw, 128px);
}
.section-head__intro { color: var(--ink-soft); font-size: 15px; padding-bottom: 12px; }

.works__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: clamp(20px, 2.6vw, 44px);
  row-gap: clamp(56px, 6vw, 96px);
  padding-bottom: clamp(40px, 8vw, 128px); /* room for the offset column */
}
/* Editorial offset: middle column drops lower */
.works__grid > li:nth-child(3n + 2) { transform: translateY(clamp(40px, 8vw, 128px)); }

.work { position: relative; }
.work__link { display: block; cursor: pointer; }
.work__media {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--stone);
}
.work__media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.001);
  transition: transform 1.6s var(--ease-out), filter 1.2s var(--ease);
}
.work__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(20px, 2vw, 32px);
  background: linear-gradient(180deg, rgba(28,30,33,0) 40%, rgba(28,30,33,.72) 100%);
  color: var(--white);
  opacity: 0;
  transition: opacity .9s var(--ease);
}
.work__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(28px, 2.5vw, 40px);
  line-height: 1.05;
  transform: translateY(14px);
  transition: transform 1s var(--ease-out);
}
.work__more {
  margin-top: 12px;
  font-size: 10px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase;
  color: var(--azure);
  transform: translateY(14px); opacity: 0;
  transition: transform 1s var(--ease-out) .08s, opacity .8s var(--ease) .08s;
}
.work__link:hover .work__media img,
.work__link:focus-visible .work__media img { transform: scale(1.045); }
.work__link:hover .work__overlay,
.work__link:focus-visible .work__overlay { opacity: 1; }
.work__link:hover .work__title,
.work__link:hover .work__more,
.work__link:focus-visible .work__title,
.work__link:focus-visible .work__more { transform: none; opacity: 1; }

.work__caption {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-top: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  font-size: 12px;
}
.work__num { color: var(--azure-strong); font-weight: 600; letter-spacing: .1em; }
.work__name {
  flex: 1;
  font-family: var(--font-display);
  font-size: 22px; font-weight: 400; line-height: 1.1;
  color: var(--anthracite-800);
}
.work__meta { color: var(--ink-soft); letter-spacing: .08em; text-transform: uppercase; font-size: 10.5px; text-align: right; }

/* 9. SERVICES ----------------------------------------------------------- */
.services__grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(16px, 2vw, 32px);
}
.services__aside {
  grid-column: 1 / span 5;
  align-self: start;
  position: sticky; top: 120px;
}
.services__aside .display { max-width: 13ch; }
.services__intro {
  margin: 32px 0 44px;
  max-width: 40ch;
  color: rgba(255,255,255,.62);
  font-size: 15px;
}
.services__list {
  grid-column: 7 / span 6;
  counter-reset: svc;
  border-top: 1px solid rgba(255,255,255,.12);
}
.service {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px 24px;
  padding: clamp(28px, 3vw, 44px) 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
  position: relative;
}
.service::before {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%;
  background: var(--azure);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.1s var(--ease);
}
.service:hover::before { transform: scaleX(1); }
.service__num {
  font-size: 12px; font-weight: 500; letter-spacing: .14em;
  color: var(--azure);
  padding-top: 12px;
}
.service__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.1;
  color: var(--white);
  transition: transform .8s var(--ease);
}
.service:hover .service__title { transform: translateX(8px); }
.service__text {
  grid-column: 2;
  max-width: 48ch;
  color: rgba(255,255,255,.58);
  font-size: 14.5px;
}

/* 10. CONTACTS & FORM --------------------------------------------------- */
.contacts { background: var(--paper); }
.contacts__grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(16px, 2vw, 32px);
  row-gap: 64px;
}
.contacts__info { grid-column: 1 / span 6; }
.contacts__info .display { max-width: 11ch; }
.contacts__lead { margin: 36px 0 48px; max-width: 44ch; color: var(--ink-soft); }
.contact-list li {
  display: grid; grid-template-columns: 90px 1fr; gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list li > span {
  font-size: 10.5px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-soft); padding-top: 4px;
}
.socials { display: flex; flex-wrap: wrap; gap: 8px 24px; }

.contacts__form { grid-column: 8 / span 5; padding-top: clamp(0px, 6vw, 110px); }

.contact-form { position: relative; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.field { position: relative; margin-bottom: 30px; }
.field label {
  display: block;
  font-size: 10.5px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
  transition: color .4s var(--ease);
}
.field input,
.field textarea {
  width: 100%;
  font: inherit; font-size: 16px; color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 0 12px;
  transition: border-color .5s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--azure-strong); }
.field:focus-within label { color: var(--azure-strong); }
.field.has-error input,
.field.has-error textarea { border-color: #b4574a; }
.field__error {
  display: block; min-height: 0;
  font-size: 12px; color: #a24b3f;
  margin-top: 6px;
}
.field__error:empty { display: none; }

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

.form-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-top: 8px;
}
.form-note { font-size: 12px; color: var(--ink-soft); max-width: 26ch; line-height: 1.5; }

.form-status { margin-top: 24px; font-size: 14px; }
.form-status.is-error { color: #a24b3f; }
.form-status.is-error a { color: inherit; text-decoration: underline; }

/* Success state: elegant replacement of the form content */
.form-success {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--paper);
  opacity: 0; visibility: hidden;
  transition: opacity 1s var(--ease), visibility 0s linear 1s;
}
.contact-form.is-sent .form-success {
  opacity: 1; visibility: visible;
  transition: opacity 1s var(--ease) .2s, visibility 0s;
}
.contact-form.is-sent > :not(.form-success) { opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); }
.form-success__mark {
  width: 56px; height: 56px; border: 1px solid var(--azure-strong); border-radius: 50%;
  display: grid; place-items: center; color: var(--azure-strong);
  margin-bottom: 28px;
}
.form-success__title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(30px, 3vw, 44px); line-height: 1.1;
  color: var(--anthracite-800);
}
.form-success__sub { margin-top: 14px; color: var(--ink-soft); font-size: 15px; }
.form-success__again { margin-top: 32px; align-self: flex-start; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }

/* 11. FOOTER ------------------------------------------------------------- */
.site-footer {
  background: var(--anthracite-900);
  color: rgba(255,255,255,.55);
  font-size: 12px;
  letter-spacing: .04em;
}
.site-footer__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-top: 36px; padding-bottom: 36px;
}
.site-footer .logo__name { color: var(--white); }

/* 12. REVEAL ANIMATIONS -------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--slow) var(--ease), transform 1.4s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal--image .about__frame {
  clip-path: inset(12% 0 0 0);
  transition: clip-path 1.8s var(--ease-out);
}
.js .reveal--image.is-visible .about__frame { clip-path: inset(0 0 0 0); }

/* 13. MAINTENANCE PAGE --------------------------------------------------- */
.maint {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  color: var(--white);
  background: var(--anthracite-900);
}
.maint__bg { position: fixed; inset: 0; }
.maint__bg img {
  width: 100%; height: 100%; object-fit: cover;
  animation: maintZoom 24s var(--ease) infinite alternate;
}
@keyframes maintZoom { from { scale: 1.02; } to { scale: 1.1; } }
.maint__veil {
  position: fixed; inset: 0;
  background: linear-gradient(100deg, rgba(28,30,33,.92) 0%, rgba(28,30,33,.78) 45%, rgba(28,30,33,.45) 100%);
}
.maint__inner {
  position: relative; z-index: 1;
  max-width: var(--max-width); margin: 0 auto;
  min-height: 100vh; min-height: 100svh;
  padding: 40px var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto 1fr auto;
  column-gap: clamp(16px, 2vw, 32px);
}
.maint__top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.maint__status {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: rgba(255,255,255,.7);
}
.maint__status i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--azure);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.maint__main {
  grid-column: 1 / span 6;
  align-self: center;
  padding: 60px 0;
}
.maint__title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(56px, 8.4vw, 140px);
  line-height: .92; letter-spacing: -.02em;
  margin: 0 0 36px;
  animation: fadeUp 1.6s var(--ease-out) .2s both;
}
.maint__title em { color: var(--azure); }
.maint__text {
  max-width: 42ch; color: rgba(255,255,255,.72); font-size: 16px;
  animation: fadeUp 1.6s var(--ease-out) .45s both;
}
.maint__text a { color: var(--azure); }
.maint__panel {
  grid-column: 8 / span 5;
  align-self: center;
  background: rgba(245,244,241,.97);
  color: var(--ink);
  padding: clamp(28px, 3.4vw, 52px);
  animation: fadeUp 1.6s var(--ease-out) .65s both;
}
.maint__panel h2 {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(28px, 2.4vw, 38px); line-height: 1.1;
  margin: 0 0 8px; color: var(--anthracite-800);
}
.maint__panel > p { color: var(--ink-soft); font-size: 14px; margin-bottom: 30px; }
.maint__panel .form-success { background: rgba(245,244,241,.97); }
.maint__panel .form-foot { flex-direction: row-reverse; justify-content: flex-start; }
.maint__foot {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 32px;
  font-size: 12px; color: rgba(255,255,255,.55);
}
.maint__foot nav { display: flex; gap: 24px; }

/* 14. RESPONSIVE --------------------------------------------------------- */
@media (max-width: 1100px) {
  .about__text { grid-column: 1 / span 7; }
  .about__figure { grid-column: 8 / span 5; }
  .about__cols { grid-template-columns: 1fr; }
  .services__aside { grid-column: 1 / span 5; }
  .services__list { grid-column: 6 / span 7; }
}

/* Tablet */
@media (max-width: 960px) {
  :root { --header-h: 76px; }

  .nav { display: none; }
  .menu-toggle { display: block; }

  .about__text, .about__figure { grid-column: 1 / -1; }
  .about__text { padding-top: 0; }
  .about__figure { margin-top: 72px; max-width: 560px; }
  .about__cols { grid-template-columns: 1fr 1fr; }

  .section-head { grid-template-columns: 1fr; gap: 24px; }

  .works__grid { grid-template-columns: repeat(2, 1fr); }
  .works__grid > li:nth-child(3n + 2) { transform: none; }
  .works__grid > li:nth-child(2n) { transform: translateY(64px); }
  .works__grid { padding-bottom: 64px; }

  .services__aside { grid-column: 1 / -1; position: static; margin-bottom: 64px; }
  .services__list { grid-column: 1 / -1; }

  .contacts__info, .contacts__form { grid-column: 1 / -1; }
  .contacts__form { padding-top: 0; max-width: 640px; }

  .maint__main, .maint__panel { grid-column: 1 / -1; }
  .maint__main { padding: 72px 0 48px; }
  .maint__panel { margin-bottom: 56px; max-width: 640px; }
}

/* Touch devices: project title always visible (no hover) */
@media (hover: none) {
  .work__overlay { opacity: 1; background: linear-gradient(180deg, rgba(28,30,33,0) 55%, rgba(28,30,33,.6) 100%); }
  .work__title { transform: none; }
  .work__more { display: none; }
  .work__caption .work__name { display: none; }
}

/* Smartphone */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .hero { min-height: 520px; }
  .hero__claim::before, .hero__claim::after { display: none; }
  .hero__claim { max-width: 22ch; }

  .about__cols { grid-template-columns: 1fr; }
  .about__figure::before { right: -12px; bottom: -12px; }

  .band { height: 62vh; min-height: 360px; }

  .works__grid { grid-template-columns: 1fr; row-gap: 56px; padding-bottom: 0; }
  .works__grid > li:nth-child(2n) { transform: none; }

  .service { grid-template-columns: 44px 1fr; gap: 8px 12px; }

  .field-row { grid-template-columns: 1fr; }
  .form-foot { flex-direction: column-reverse; align-items: stretch; }
  .form-foot .btn { justify-content: center; }
  .form-note { max-width: none; text-align: center; }
  .maint__panel .form-foot { flex-direction: column-reverse; }

  .contact-list li { grid-template-columns: 1fr; gap: 4px; }

  .site-footer__inner { flex-direction: column; text-align: center; gap: 12px; }

  .maint__inner { padding-top: 28px; padding-bottom: 28px; }
  .maint__panel { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); }
}

/* 15. 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;
  }
  .js .reveal { opacity: 1; transform: none; }
  .js .reveal--image .about__frame { clip-path: none; }
}
