/* Мария Ридзель — Stillness Studio: editorial organic minimalism */

:root {
  --bg: #ebe4db;
  --bg-warm: #e3d9ce;
  --bg-card: #f5f0ea;
  --bg-deep: #d8cfc4;
  --gray: #cfc6bb;
  --gray-mid: #9a9188;
  --text: #2a2622;
  --text-soft: #5c554c;
  --terracotta: #a85f4a;
  --terracotta-dark: #8c4d3b;
  --peach: #d4a088;
  --peach-light: #edd5c8;
  --sage: #6d8474;
  --serif: 'Fraunces', 'Palatino Linotype', Georgia, serif;
  --sans: 'Newsreader', 'Times New Roman', serif;
  --container: 680px;
  --container-wide: 1080px;
  --section-y: clamp(80px, 12vw, 132px);
  --radius-btn: 4px;
  --line: 1px solid var(--gray);
  --ease: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 47px,
      rgba(42, 38, 34, 0.022) 47px,
      rgba(42, 38, 34, 0.022) 48px
    );
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Atmosphere */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.ambient--1 {
  width: min(55vw, 480px);
  height: min(55vw, 480px);
  top: -8%;
  right: -12%;
  background: radial-gradient(circle, rgba(212, 160, 136, 0.45), transparent 70%);
}

.ambient--2 {
  width: min(45vw, 380px);
  height: min(45vw, 380px);
  bottom: 15%;
  left: -15%;
  background: radial-gradient(circle, rgba(109, 132, 116, 0.28), transparent 70%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.wrap { width: min(90%, var(--container-wide)); margin-inline: auto; position: relative; z-index: 1; }
.wrap--narrow { width: min(90%, var(--container)); margin-inline: auto; position: relative; z-index: 1; }

h1, h2, h3, .h-serif, .font-serif {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--text);
  line-height: 1.15;
  font-variation-settings: 'SOFT' 50, 'WONK' 0.8;
}

h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.35rem);
  letter-spacing: -0.02em;
}

h1 em {
  font-style: italic;
  color: var(--terracotta);
  font-weight: 500;
}

h2 {
  font-size: clamp(1.75rem, 3.8vw, 2.35rem);
  letter-spacing: -0.015em;
}

h3.h-serif { font-size: clamp(1.2rem, 2.5vw, 1.4rem); }

.text-body { font-size: 16px; color: var(--text-soft); line-height: 1.78; }
.text-body strong,
.text-body .hl { color: var(--text); font-weight: 500; }
.text-body .accent { color: var(--terracotta); font-weight: 500; }

.lead {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-soft);
  max-width: 36em;
  line-height: 1.68;
}

.lead strong {
  color: var(--text);
  font-weight: 500;
}

.section { padding-block: var(--section-y); }
.divider { border: none; border-top: var(--line); margin-block: 0; }

.section-num {
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--terracotta);
  letter-spacing: 0.2em;
  margin-bottom: 12px;
  opacity: 0.85;
}

/* Hero load cascade */
.hero-anim {
  opacity: 0;
  transform: translateY(24px);
  animation: hero-in var(--ease-out) forwards;
  animation-delay: calc(0.12s + var(--d, 0) * 0.1s);
}

@keyframes hero-in {
  to { opacity: 1; transform: none; }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

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

.reveal:nth-child(2) { transition-delay: 0.06s; }
.reveal:nth-child(3) { transition-delay: 0.12s; }

/* Fixed social */
.social-fixed {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-fixed a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  border: var(--line);
  border-radius: 50%;
  background: rgba(245, 240, 234, 0.88);
  backdrop-filter: blur(10px);
  transition: color var(--ease), border-color var(--ease), transform var(--ease);
}

.social-fixed a:hover {
  color: var(--terracotta);
  border-color: var(--peach);
  transform: translateY(-2px);
}

.social-fixed svg { width: 16px; height: 16px; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(235, 228, 219, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 16px;
}

.logo {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav ul { display: flex; list-style: none; gap: clamp(10px, 2vw, 22px); flex-wrap: wrap; }

.nav a {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-soft);
  letter-spacing: 0.01em;
  position: relative;
  padding-bottom: 2px;
  transition: color var(--ease);
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--terracotta);
  transition: width var(--ease);
}

.nav a:hover { color: var(--terracotta); }
.nav a:hover::after { width: 100%; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-btn);
  transition: background var(--ease), color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.btn--primary {
  background: var(--terracotta);
  color: #faf6f2;
  box-shadow: 0 4px 20px rgba(168, 95, 74, 0.25);
}

.btn--primary:hover {
  background: var(--terracotta-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(168, 95, 74, 0.32);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--gray-mid);
}

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

.btn--full { width: 100%; }
.btn--loading { pointer-events: none; opacity: 0.85; }

.btn__spin {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn--loading .btn__spin { display: block; }
.btn--loading .btn__txt { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

.menu-btn {
  display: none;
  width: 44px; height: 44px;
  border: var(--line);
  border-radius: var(--radius-btn);
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
}

.menu-btn svg { width: 20px; height: 20px; }
.header__cta { display: none; }

/* Hero — asymmetric layout */
.hero {
  padding-top: clamp(48px, 9vw, 88px);
  padding-bottom: var(--section-y);
  position: relative;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.hero__label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 22px;
  font-weight: 500;
}

.hero h1 { margin-bottom: 24px; max-width: 12ch; }

.hero .lead { margin-bottom: 36px; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 32px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: var(--text-soft);
  list-style: none;
}

.hero__meta li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero__meta li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--terracotta);
  opacity: 0.7;
}

.hero__visual {
  position: relative;
  margin-left: clamp(0px, 4vw, 32px);
  width: fit-content;
  max-width: 100%;
}

.hero__ring {
  position: absolute;
  top: -8%;
  right: -6%;
  width: 72%;
  aspect-ratio: 1;
  border: 1px solid var(--peach);
  border-radius: 50%;
  opacity: 0.6;
  pointer-events: none;
  animation: ring-pulse 8s ease-in-out infinite;
}

@keyframes ring-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.5; }
  50% { transform: scale(1.03) rotate(4deg); opacity: 0.75; }
}

.hero__photo {
  position: relative;
  z-index: 1;
  margin: 0;
  width: min(100%, 400px);
  aspect-ratio: 4 / 5;
  border-radius: 2px 2px 48px 2px;
  overflow: hidden;
  background: var(--bg-warm);
  box-shadow:
    24px 32px 64px rgba(42, 38, 34, 0.12),
    -8px -8px 0 var(--peach-light);
  transform: rotate(1.2deg);
  transition: transform var(--ease);
}

.hero__photo:hover { transform: rotate(0deg) scale(1.01); }

.hero__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  filter: grayscale(100%) contrast(1.04);
}

.hero__photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-soft);
  background: linear-gradient(145deg, var(--bg-warm), var(--peach-light));
}

.hero__photo-fallback[hidden] {
  display: none !important;
}

/* Approach */
.approach {
  padding-top: clamp(72px, 12vw, 120px);
  text-align: center;
}

.approach .illus {
  display: block;
  margin-inline: auto;
  opacity: 0.88;
  transition: transform 1.2s var(--ease);
}

.approach .illus.on { animation: illus-float 6s ease-in-out infinite; }

@keyframes illus-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.approach .illus--top {
  width: min(130px, 26vw);
  margin-bottom: clamp(28px, 5vw, 48px);
}

.approach .illus--bottom {
  width: min(160px, 32vw);
  margin-top: clamp(40px, 7vw, 64px);
}

.approach__title { margin-bottom: clamp(40px, 7vw, 64px); }

.approach__list { list-style: none; }

.approach__item {
  padding-block: clamp(32px, 5vw, 48px);
  max-width: 480px;
  margin-inline: auto;
}

.approach__item + .approach__item { border-top: var(--line); }

.approach__item h3 { margin-bottom: 14px; }

/* About */
.about__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(36px, 5vw, 64px);
  align-items: start;
}

.about__grid h2 { margin-bottom: 24px; }
.about__grid .text-body + .text-body { margin-top: 1.1em; }

.about__aside {
  padding: 36px 32px;
  background: var(--bg-card);
  border: var(--line);
  transform: translateY(12px);
  box-shadow: 12px 16px 40px rgba(42, 38, 34, 0.06);
}

.about__aside ul {
  list-style: none;
  display: grid;
  gap: 14px;
  font-size: 15px;
  font-weight: 400;
}

.about__aside li::before {
  content: '*';
  color: var(--terracotta);
  margin-right: 10px;
}

/* Services */
.services__head {
  margin-bottom: 52px;
  max-width: 28em;
}

.services__head .lead { margin-top: 16px; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--gray);
  border: var(--line);
}

.service {
  background: var(--bg-card);
  padding: 36px 30px;
  transition: background var(--ease), transform var(--ease);
  position: relative;
  overflow: hidden;
}

.service::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--terracotta);
  transition: height var(--ease);
}

.service:hover {
  background: var(--bg-warm);
  transform: translateY(-2px);
}

.service:hover::before { height: 100%; }

.service h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.service p { font-size: 15px; color: var(--text-soft); }

/* Process */
.process header { margin-bottom: 44px; }

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 8px;
}

.process-step {
  padding-top: 24px;
  border-top: 2px solid var(--peach);
  transition: border-color var(--ease);
}

.process-step:hover { border-top-color: var(--terracotta); }

.process-step__n {
  font-family: var(--serif);
  font-size: 12px;
  color: var(--terracotta);
  margin-bottom: 14px;
  letter-spacing: 0.1em;
}

.process-step h3 { font-size: 1rem; margin-bottom: 8px; font-family: var(--serif); }
.process-step p { font-size: 14px; color: var(--text-soft); }

.process-note {
  text-align: center;
  margin-top: 48px;
  font-size: 14px;
  font-weight: 500;
  color: var(--sage);
  letter-spacing: 0.04em;
}

/* Reviews */
.reviews h2 { margin-bottom: 12px; text-align: center; }

.reviews-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 36px;
  font-style: italic;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.review {
  padding: 32px 28px;
  background: var(--bg-card);
  border: var(--line);
  transition: transform var(--ease), box-shadow var(--ease);
}

.review:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(42, 38, 34, 0.08);
}

.review p {
  font-size: 15px;
  color: var(--text-soft);
  font-style: italic;
  margin-bottom: 18px;
  line-height: 1.65;
}

.review cite {
  font-size: 13px;
  font-weight: 500;
  font-style: normal;
  font-family: var(--serif);
  color: var(--text);
}

/* Contact */
.contact__grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 56px;
  align-items: start;
}

.contact h2 { margin-bottom: 20px; }

.form-box {
  padding: 40px 36px;
  background: var(--bg-card);
  border: var(--line);
  box-shadow: 16px 20px 48px rgba(42, 38, 34, 0.07);
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  color: var(--text-soft);
}

.field input,
.field select {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  font-size: 16px;
  border: var(--line);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(168, 95, 74, 0.12);
}

.field input.err { border-color: #b85a5a; }
.err-msg { font-size: 12px; color: #b85a5a; margin-top: 6px; min-height: 1em; }
.hp { position: absolute; left: -9999px; opacity: 0; }
.consent { font-size: 13px; color: var(--text-soft); margin-top: 14px; }
.consent a { text-decoration: underline; text-underline-offset: 3px; color: var(--terracotta); }

.footer {
  padding: 36px 0;
  border-top: var(--line);
  font-size: 13px;
  color: var(--text-soft);
  background: var(--bg-card);
  position: relative;
  z-index: 1;
}

.footer__row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer strong { font-family: var(--serif); color: var(--text); }
.footer a:hover { color: var(--terracotta); }

.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(42, 38, 34, 0.45);
  opacity: 0; visibility: hidden;
  transition: opacity var(--ease), visibility var(--ease);
}

.modal.on { opacity: 1; visibility: visible; }

.modal__box {
  background: var(--bg-card);
  padding: 52px 40px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  border: var(--line);
  position: relative;
  transform: scale(0.94) translateY(12px);
  transition: transform var(--ease);
  box-shadow: 0 24px 64px rgba(42, 38, 34, 0.15);
}

.modal.on .modal__box { transform: none; }

.modal__x {
  position: absolute; top: 12px; right: 14px;
  font-size: 1.5rem; color: var(--text-soft);
  line-height: 1;
  transition: color var(--ease);
}

.modal__x:hover { color: var(--terracotta); }
.modal h3 { font-family: var(--serif); margin-bottom: 12px; font-size: 1.5rem; }

@media (max-width: 900px) {
  .hero__inner, .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .hero__inner { gap: 28px; }
  .hero__visual {
    order: -1;
    width: min(260px, 68vw);
    margin-inline: auto;
    margin-left: auto;
    margin-bottom: 0;
  }
  .hero__ring { display: none; }
  .hero__photo {
    width: 100%;
    max-height: none;
    transform: none;
    box-shadow: 0 16px 40px rgba(42, 38, 34, 0.1);
  }
  .hero__photo:hover { transform: none; }
  .hero h1 { max-width: none; }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
  .about__aside { transform: none; }
}

@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .nav {
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: var(--bg);
    padding: 24px;
    border-bottom: var(--line);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--ease), opacity var(--ease), visibility var(--ease);
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav ul { flex-direction: column; gap: 18px; }
  .menu-btn { display: flex; }
  .social-fixed { right: 12px; bottom: 12px; }
}

@media (min-width: 641px) {
  .header__cta { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-anim, .reveal { opacity: 1; transform: none; animation: none; transition: none; }
  .hero__ring, .approach .illus.on { animation: none; }
  .grain { display: none; }
}
