/* =====================================================================
   [НАЗВАНИЕ БРЕНДА] — styles.css
   Концепция: страница = луковица; каждая секция — снятый слой.
   ===================================================================== */

   :root {
    --bg: #F7E6D2;         /* тёплая бумага */
    --bg-deep: #EFCFAA;
    --ink: #2B1408;
    --ink-2: #6E4527;
    --or: #F0801E;
    --or-dark: #B84A0B;
    --or-deep: #5C1E06;    /* сердцевина */
    --or-pale: #FFB86B;
    --leaf: #7FA53E;
  
    --display: "Yeseva One", Georgia, serif;
    --text: "Golos Text", system-ui, sans-serif;
  
    --gutter: clamp(1.25rem, 5vw, 5rem);
    --ease: cubic-bezier(.19, 1, .22, 1);
  }
  
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0; background: var(--bg); color: var(--ink);
    font-family: var(--text); font-size: 17px; line-height: 1.6; overflow-x: hidden;
  }
  img { max-width: 100%; height: auto; display: block; }
  a { color: var(--or-dark); text-underline-offset: 3px; }
  h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0 0 .5em; }
  h2 { font-size: clamp(1.8rem, 3.6vw, 2.9rem); letter-spacing: -.01em; }
  h3 { font-size: 1.25rem; }
  p { margin: 0 0 1em; }
  strong { font-weight: 800; }
  
  .grain-defs { position: absolute; width: 0; height: 0; }
  .grain {
    position: fixed; inset: 0; pointer-events: none; z-index: 60;
    filter: url(#grain); opacity: .9; mix-blend-mode: multiply;
  }
  .skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--or-deep); color: #fff; padding: .6rem 1rem; z-index: 100; }
  .skip-link:focus { top: 1rem; }
  :focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }
  
  /* ---------- кнопки ---------- */
  .btn {
    display: inline-block; padding: .9rem 1.6rem; font-weight: 600; text-decoration: none;
    border-radius: 999px; border: 2px solid var(--ink); color: var(--ink); background: transparent;
    cursor: pointer; font: inherit; font-weight: 600;
    transition: transform .5s var(--ease), background .3s, color .3s;
  }
  .btn--fill { background: var(--ink); color: var(--bg); }
  .btn--fill:hover { background: var(--or-dark); border-color: var(--or-dark); color: #fff; transform: translateY(-2px); }
  .btn--line:hover { background: var(--ink); color: var(--bg); }
  .btn--big { width: 100%; padding: 1.1rem; font-size: 1.05rem; }
  
  /* ---------- индикатор глубины (справа) ---------- */
  .depth {
    position: fixed; right: 1.2rem; top: 50%; transform: translateY(-50%); z-index: 40;
    display: flex; flex-direction: column; gap: .6rem;
  }
  .depth a { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink-2); font-size: .72rem; }
  .depth a span {
    width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); transition: background .3s, transform .3s;
  }
  .depth a:not(:hover) { color: transparent; }
  .depth a.is-active span { background: var(--or); transform: scale(1.35); }
  
  /* ---------- шапка ---------- */
  .site-header {
    position: sticky; top: 0; z-index: 50; display: grid;
    grid-template-columns: auto 1fr auto auto; align-items: center; gap: 1.5rem;
    padding: 1rem var(--gutter); background: var(--bg); border-bottom: 1px solid var(--ink);
  }
  .brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-family: var(--display); font-size: 1.2rem; }
  .header__tag { margin: 0; color: var(--ink-2); font-size: .85rem; }
  .menu-btn {
    font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; color: var(--ink); padding: .4rem .2rem;
    border-bottom: 2px solid transparent;
  }
  .menu-btn[aria-expanded="true"] { border-bottom-color: var(--or); }
  .header__cta { font-weight: 600; text-decoration: none; color: var(--ink); border-bottom: 2px solid var(--or); }
  
  .menu {
    position: fixed; inset: 0; z-index: 45; background: var(--or); color: var(--ink);
    display: grid; place-items: center;
    clip-path: circle(0% at calc(100% - 6rem) 2rem); transition: clip-path .8s var(--ease);
  }
  .menu.is-open { clip-path: circle(150% at calc(100% - 6rem) 2rem); }
  .menu ul { list-style: none; margin: 0; padding: 0; text-align: center; }
  .menu a {
    font-family: var(--display); font-size: clamp(2rem, 7vw, 4.5rem); color: var(--ink); text-decoration: none;
    display: block; line-height: 1.2; transition: letter-spacing .4s var(--ease), color .3s;
  }
  .menu a:hover { letter-spacing: .04em; color: var(--bg); }
  
  /* ---------- HERO ---------- */
  .hero {
    position: relative; min-height: calc(100vh - 70px); padding: clamp(2rem, 6vh, 5rem) var(--gutter) 3rem;
    display: grid; grid-template-rows: 1fr auto; overflow: hidden;
  }
  .hero__cut {
    position: absolute; right: -22vw; top: 50%; width: clamp(560px, 70vw, 1100px); height: auto;
    transform: translateY(-50%) rotate(var(--spin, 0deg)); pointer-events: none;
  }
  .hero__rings circle {
    fill: none; stroke: var(--or-dark); stroke-width: 1.5;
    stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: draw 2.4s var(--ease) forwards;
  }
  .hero__rings circle:nth-child(odd) { stroke: var(--or); stroke-width: 26; opacity: .35; }
  .hero__rings circle:nth-child(n+7) { stroke-dasharray: 1000; stroke-dashoffset: 1000; }
  .hero__rings circle:nth-child(2) { animation-delay: .1s; }
  .hero__rings circle:nth-child(3) { animation-delay: .2s; }
  .hero__rings circle:nth-child(4) { animation-delay: .3s; }
  .hero__rings circle:nth-child(5) { animation-delay: .4s; }
  .hero__rings circle:nth-child(6) { animation-delay: .5s; }
  .hero__rings circle:nth-child(7) { animation-delay: .6s; }
  .hero__rings circle:nth-child(8) { animation-delay: .7s; }
  .hero__rings circle:nth-child(9) { animation-delay: .8s; }
  .hero__core { fill: var(--or-deep) !important; stroke: none !important; animation: none !important; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  
  .hero__body { position: relative; z-index: 2; align-self: center; }
  .hero__title { font-size: clamp(3rem, 11vw, 10rem); line-height: .92; margin: 0 0 1.2rem; letter-spacing: -.02em; }
  .hero__title .w { display: block; overflow: hidden; }
  .hero__title .w::after { content: ""; }
  .hero__title .w { transform: translateY(110%); animation: up 1.1s var(--ease) forwards; }
  .hero__title .w:nth-child(2) { animation-delay: .08s; padding-left: .8em; }
  .hero__title .w:nth-child(3) { animation-delay: .16s; color: var(--or-dark); }
  @keyframes up { to { transform: none; } }
  .hero__sub { font-size: clamp(1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 40ch; opacity: 0; animation: fade 1s .5s forwards; }
  @keyframes fade { to { opacity: 1; } }
  
  .hero__foot {
    position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 46ch) auto 1fr;
    gap: 2rem; align-items: end; padding-top: 2rem; border-top: 1px solid var(--ink);
    opacity: 0; animation: fade 1s .7s forwards;
  }
  .hero__lead { margin: 0; font-size: .98rem; color: var(--ink-2); }
  .hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; }
  .hero__scroll { justify-self: end; display: inline-flex; align-items: center; gap: .6rem; font-size: .8rem; color: var(--ink-2); text-decoration: none; }
  .hero__scroll span { width: 1px; height: 40px; background: var(--ink); animation: drip 1.8s ease-in-out infinite; transform-origin: top; }
  @keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }
  
  /* ---------- бегущая строка ---------- */
  .ticker { border-block: 1px solid var(--ink); overflow: hidden; background: var(--bg-deep); }
  .ticker__track { display: flex; gap: 3rem; width: max-content; padding: .7rem 0; animation: ticker 28s linear infinite; }
  .ticker span { font-family: var(--display); font-size: 1.1rem; white-space: nowrap; }
  .ticker span::after { content: "◌"; margin-left: 3rem; color: var(--or-dark); }
  @keyframes ticker { to { transform: translateX(-50%); } }
  
  /* ---------- О НАС ---------- */
  .about {
    display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: clamp(2rem, 6vw, 6rem);
    padding: clamp(4rem, 10vh, 8rem) var(--gutter);
  }
  .about__aside { position: sticky; top: 6rem; align-self: start; }
  .about__aside img { width: min(100%, 320px); margin-bottom: 2rem; animation: sway 9s ease-in-out infinite; transform-origin: 60% 20%; }
  @keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
  .ledger { margin: 0; border-top: 1px solid var(--ink); }
  .ledger div { display: flex; justify-content: space-between; align-items: baseline; padding: .8rem 0; border-bottom: 1px solid var(--ink); }
  .ledger dt { font-size: .85rem; color: var(--ink-2); }
  .ledger dd { margin: 0; font-family: var(--display); font-size: 2rem; color: var(--or-dark); }
  
  .about__text { max-width: 66ch; }
  .about__text h2 { margin-bottom: 1.5rem; }
  .dropcap::first-letter {
    font-family: var(--display); font-size: 4.2em; float: left; line-height: .8; padding: .1em .12em 0 0; color: var(--or-dark);
  }
  .pull {
    margin: 2rem 0 0; padding: 1.5rem 0 0 1.5rem; border-left: 4px solid var(--or);
    font-family: var(--display); font-size: 1.5rem; line-height: 1.3; color: var(--or-deep);
  }
  
  /* ---------- УСЛУГИ — интерактивный срез ---------- */
  .services { padding: clamp(4rem, 10vh, 8rem) var(--gutter); background: var(--bg-deep); border-block: 1px solid var(--ink); }
  .services__head { max-width: 60ch; margin-bottom: 3rem; }
  .services__head p { color: var(--ink-2); }
  .cut { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 6rem); align-items: center; }
  .cut__svg { width: min(100%, 560px); justify-self: center; overflow: visible; }
  .cut__ring circle {
    fill: var(--or-pale); stroke: var(--ink); stroke-width: 1.5; cursor: pointer;
    transition: fill .35s, transform .6s var(--ease); transform-origin: 300px 300px;
  }
  .cut__ring:nth-child(2) circle { fill: #FFCB8E; }
  .cut__ring:nth-child(3) circle { fill: #FFB06B; }
  .cut__ring:nth-child(4) circle { fill: #FF9646; }
  .cut__ring:nth-child(5) circle { fill: #F0801E; }
  .cut__ring.is-active circle, .cut__ring:hover circle, .cut__ring:focus-visible circle { fill: var(--or-dark); transform: scale(1.025); }
  .cut__ring:focus-visible { outline: none; }
  .cut__core { fill: var(--or-deep); pointer-events: none; }
  .cut__labels text { font-family: var(--display); font-size: 22px; fill: var(--ink); text-anchor: middle; pointer-events: none; }
  
  .cut__list { display: grid; }
  .cut__item {
    grid-area: 1 / 1; padding: 0 0 0 1.5rem; border-left: 1px solid var(--ink);
    opacity: 0; transform: translateX(20px); pointer-events: none; transition: opacity .5s, transform .6s var(--ease);
  }
  .cut__item.is-active { opacity: 1; transform: none; pointer-events: auto; }
  .cut__index { font-family: var(--display); font-size: 3.5rem; line-height: 1; color: var(--or-dark); display: block; margin-bottom: .5rem; }
  .cut__item h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
  .cut__item p { color: var(--ink-2); max-width: 46ch; }
  .cut__item a { font-weight: 600; }
  
  /* ---------- ПРОЦЕСС — линия рисуется по скроллу ---------- */
  .process { padding: clamp(4rem, 10vh, 8rem) var(--gutter) 2rem; }
  .process__head { max-width: 60ch; margin-bottom: 1rem; }
  .process__head p { color: var(--ink-2); }
  .peel { position: relative; }
  .peel__svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
  .peel__path {
    fill: none; stroke: var(--or-dark); stroke-width: 3; stroke-linecap: round;
    stroke-dasharray: var(--len, 3000); stroke-dashoffset: var(--len, 3000);
  }
  .peel__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; min-height: 420px; position: relative; }
  .peel__step { padding: 1rem 0 0; align-self: end; }
  .peel__step:nth-child(even) { align-self: start; }
  .peel__dot { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 3px solid var(--ink); margin-bottom: 1rem; transition: background .3s; }
  .peel__step.is-lit .peel__dot { background: var(--or); }
  .peel__step h3 { font-size: 1.3rem; }
  .peel__step p { color: var(--ink-2); font-size: .95rem; max-width: 30ch; }
  
  /* ---------- СЕРДЦЕВИНА: преимущества + отзывы ---------- */
  .core {
    position: relative; background: var(--or-deep); color: #F9E4CE; padding: clamp(4rem, 10vh, 8rem) var(--gutter);
    clip-path: polygon(0 4vw, 100% 0, 100% 100%, 0 100%);
    margin-top: 2rem; overflow: hidden;
  }
  .core h2 { color: #fff; }
  .core__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 6vw, 7rem); position: relative; z-index: 1; }
  .why { list-style: none; margin: 0; padding: 0; counter-reset: why; }
  .why li {
    display: grid; grid-template-columns: 3rem 1fr; grid-template-rows: auto auto; column-gap: 1rem;
    padding: 1.4rem 0; border-top: 1px solid rgba(255,255,255,.25); counter-increment: why;
  }
  .why li::before {
    content: counter(why, decimal-leading-zero); grid-column: 1; grid-row: 1 / span 2;
    font-family: var(--display); color: var(--or-pale); font-size: 1.1rem; padding-top: .2rem;
  }
  .why h3 { grid-column: 2; grid-row: 1; color: #fff; font-size: 1.3rem; margin-bottom: .3rem; }
  .why p { grid-column: 2; grid-row: 2; margin: 0; color: #E3BE9C; font-size: .95rem; }
  
  .core__reviews-title { font-size: 1.4rem; margin-bottom: 1.5rem; }
  .skins { position: relative; display: grid; gap: 1rem; }
  .skin {
    margin: 0; padding: 2.2rem 2.8rem; background: #F9E4CE; color: var(--ink); text-align: center;
    border-radius: 48% 52% 44% 56% / 54% 46% 54% 46%;
    transition: transform .6s var(--ease);
  }
  .skin:nth-child(1) { transform: rotate(-2deg); }
  .skin:nth-child(2) { transform: rotate(1.5deg) translateX(1rem); border-radius: 54% 46% 50% 50% / 46% 54% 46% 54%; }
  .skin:nth-child(3) { transform: rotate(-1deg); }
  .skin:hover { transform: rotate(0) scale(1.02); }
  .skin p { font-size: .98rem; margin-bottom: .6rem; }
  .skin footer { font-size: .85rem; color: var(--ink-2); }
  .skin cite { font-style: normal; font-weight: 800; color: var(--ink); }
  .core__sprout { position: absolute; right: -60px; bottom: -60px; width: 320px; opacity: .35; }
  
  /* ---------- FAQ ---------- */
  .faq { padding: clamp(4rem, 10vh, 8rem) var(--gutter); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 3rem; }
  .faq h2 { position: sticky; top: 6rem; align-self: start; }
  .faq__list { border-top: 1px solid var(--ink); }
  .faq__item { border-bottom: 1px solid var(--ink); }
  .faq__item summary { list-style: none; cursor: pointer; padding: 1.2rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
  .faq__item summary::-webkit-details-marker { display: none; }
  .faq__item summary h3 { margin: 0; font-size: 1.15rem; }
  .faq__item summary::after {
    content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink);
    box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 20px var(--bg); transition: box-shadow .4s var(--ease), border-color .3s;
  }
  .faq__item[open] summary::after { box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 20px var(--or); border-color: var(--or-dark); }
  .faq__item p { padding: 0 0 1.4rem; color: var(--ink-2); max-width: 60ch; }
  
  /* ---------- ЗАЯВКА ---------- */
  .contact {
    padding: clamp(4rem, 10vh, 8rem) var(--gutter); background: var(--or); color: var(--ink);
    display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 7rem); align-items: center;
    clip-path: polygon(0 0, 100% 3vw, 100% 100%, 0 100%);
  }
  .contact h2 { font-size: clamp(2rem, 4.5vw, 3.6rem); }
  .contact address { font-style: normal; display: grid; gap: .3rem; font-size: 1.15rem; margin-top: 1.5rem; }
  .contact address a { color: var(--ink); font-weight: 600; }
  
  .form { display: grid; gap: 1.6rem; }
  /* плавающая подпись: span визуально над полем, но в DOM после — через column-reverse */
  .field { display: flex; flex-direction: column-reverse; }
  .field span { color: var(--or-deep); transform: translateY(1.8rem); transition: transform .3s var(--ease), font-size .3s; pointer-events: none; }
  .field input, .field textarea {
    width: 100%; font: inherit; padding: .9rem 0 .6rem; background: transparent; color: var(--ink);
    border: 0; border-bottom: 2px solid var(--ink); resize: vertical;
  }
  .field input:focus, .field textarea:focus { outline: none; border-bottom-color: #fff; }
  .field input:focus ~ span, .field input:not(:placeholder-shown) ~ span,
  .field textarea:focus ~ span, .field textarea:not(:placeholder-shown) ~ span { transform: translateY(0); font-size: .78rem; }
  .field input.is-invalid, .field textarea.is-invalid { border-bottom-color: #7A0B0B; }
  .form__note { font-size: .8rem; margin: 0; }
  .form__note a { color: var(--ink); }
  .form__status { margin: 0; font-weight: 600; min-height: 1.4em; }
  .form__status.is-error { color: #7A0B0B; }
  
  /* ---------- FOOTER ---------- */
  .site-footer { background: var(--ink); color: #D9B48F; padding: 3rem var(--gutter) 2rem; overflow: hidden; }
  .footer__big {
    font-family: var(--display); font-size: clamp(3rem, 12vw, 11rem); line-height: .9; margin: 0 0 2rem -.04em;
    color: transparent; -webkit-text-stroke: 1px #D9B48F; white-space: nowrap;
  }
  .footer__row { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; font-size: .9rem; border-top: 1px solid #5a3a22; padding-top: 1.5rem; }
  .footer__row p { margin: 0; }
  .footer__row nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
  .site-footer a { color: #D9B48F; }
  .site-footer a:hover { color: #fff; }
  
  /* ---------- reveal ---------- */
  .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .reveal.is-visible { opacity: 1; transform: none; }
  
  /* ---------- адаптив ---------- */
  @media (max-width: 1000px) {
    .peel__steps { grid-template-columns: repeat(2, 1fr); min-height: 0; }
    .peel__step, .peel__step:nth-child(even) { align-self: start; }
    .peel__svg { display: none; }
    .core__inner { grid-template-columns: 1fr; }
    .depth { display: none; }
  }
  @media (max-width: 760px) {
    .site-header { grid-template-columns: auto 1fr auto; }
    .header__tag, .header__cta { display: none; }
    .hero__cut { right: -60vw; top: 20%; width: 130vw; }
    .hero__foot { grid-template-columns: 1fr; }
    .hero__scroll { justify-self: start; }
    .about, .cut, .faq, .contact { grid-template-columns: 1fr; }
    .about__aside { position: static; }
    .faq h2 { position: static; }
    .peel__steps { grid-template-columns: 1fr; }
    .skin:nth-child(2) { transform: rotate(1.5deg); }
    .core { clip-path: polygon(0 3vw, 100% 0, 100% 100%, 0 100%); }
  }
  
  /* ---------- reduce-motion ---------- */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .hero__title .w, .hero__sub, .hero__foot, .reveal, .cut__item { opacity: 1; transform: none; }
    .hero__rings circle { stroke-dashoffset: 0; }
    .peel__path { stroke-dashoffset: 0; }
    .hero__cut { transform: translateY(-50%); }
    html { scroll-behavior: auto; }
  }