/* ====== Hero Section: Ambient Tactile Rail ====== */
.hero-ambient{
  position: relative;
  max-width: 1200px;
  margin: 92px auto 0; /* space for fixed header */
  padding: 32px 16px 40px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 28px;
}

.hero-heading{
  font-family: Playfair, serif;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.18;
  letter-spacing: .2px;
}

.hero-lead, .hero-note{ color: var(--muted); margin-top: 12px; }
.hero-actions{ margin-top: 20px; display: flex; gap: 12px; }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  height:42px; padding: 0 16px; border-radius: 12px; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn.ghost{ color: var(--ink); border: 1px solid var(--line); background: #17191e; }
.btn.ghost:hover{ transform: translateY(-1px); background:#1d2026; }
.btn.solid{ background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #111; font-weight: 600; }
.btn.solid:hover{ transform: translateY(-1px); box-shadow: var(--shadow); }

/* Rail */
.hero-rail{
  display: grid; gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}
.rail-card{
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.2);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, border-color .25s ease;
}
.rail-card:hover{
  transform: translateY(-6px) rotateZ(-.3deg);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
}
.rail-card figcaption{
  margin-top: 8px; color: var(--muted); font-size: 14px;
}

/* Ambient Orbs (pleasant background) */
.orb{
  position: absolute; border-radius: 999px; filter: blur(24px);
  opacity: .35; pointer-events: none; mix-blend-mode: screen;
  animation: orbit 16s linear infinite;
}
.orb-a{ width: 220px; height: 220px; left: -40px; top: -40px; background: radial-gradient(circle at 30% 30%, #ffd6ad, transparent 60%); }
.orb-b{ width: 180px; height: 180px; right: -30px; top: 20px; background: radial-gradient(circle at 60% 40%, #bfe1cf, transparent 60%); animation-duration: 22s; }
.orb-c{ width: 160px; height: 160px; right: 50%; bottom: -40px; background: radial-gradient(circle at 50% 50%, #fff1e0, transparent 60%); animation-duration: 27s; }
@keyframes orbit{
  0% { transform: translate3d(0,0,0) rotate(0deg); }
  50%{ transform: translate3d(0,-8px,0) rotate(180deg); }
  100%{ transform: translate3d(0,0,0) rotate(360deg); }
}

/* ====== Responsive for Section 1 ====== */
@media (max-width: 1100px){
  .hero-ambient{ grid-template-columns: 1fr; }
  .hero-rail{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px){
  .hero-rail{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px){
  .hero-ambient{ padding: 28px 12px 36px; }
  .hero-rail{ grid-template-columns: 1fr; }
  /* On small screens, images go below text naturally by grid order */
}

/* Ensure no horizontal scroll at any size */
html, body{ overflow-x: hidden; }
/* ====== SECTION 2: Material Stories (vertical timeline) ====== */
.materials{
  max-width: 1100px;
  margin: 32px auto 0;
  padding: 16px;
}
.mat-heading{
  font-family: Playfair, serif;
  font-size: clamp(24px, 3vw, 34px);
}
.mat-lead{ color: var(--muted); margin-top: 10px; max-width: 62ch; }

.mat-timeline{
  position: relative;
  margin: 26px 0 0;
  display: grid;
  gap: 22px;
}
.mat-timeline::before{
  content: ""; position: absolute; left: 18px; top: 0; bottom: 0;
  width: 2px; background: var(--line);
}
.mat-node{
  display: grid; grid-template-columns: 52px 1fr; gap: 16px;
  align-items: start;
}
.mat-fig{
  grid-column: 1 / -1;
  margin-left: 0; /* mobile: image full width before text */
}
.mat-copy{ background: var(--card); border:1px solid var(--line); border-radius: 14px; padding: 14px; }
.mat-copy h3{ margin: 0 0 6px; font-size: 18px; }

/* timeline marker */
.mat-node::before{
  content: ""; width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 0 4px #191b21;
  position: relative; top: 14px; left: 12px;
}

/* larger screens: alternate layout */
@media (min-width: 860px){
  .mat-timeline{ gap: 30px; }
  .mat-node{
    grid-template-columns: 40px 1fr 1fr;
    align-items: center;
  }
  .mat-fig{ grid-column: 2; }
  .mat-copy{ grid-column: 3; }
  .mat-node:nth-child(even) .mat-fig{ grid-column: 3; }
  .mat-node:nth-child(even) .mat-copy{ grid-column: 2; }
}

/* ====== SECTION 3: Low-Light Shelf (stepped grid + tilt) ====== */
.shelf{
  max-width: 1200px; margin: 40px auto 0; padding: 16px;
}
.shelf-heading{
  font-family: Playfair, serif;
  font-size: clamp(24px, 3vw, 34px);
}
.shelf-lead{ color: var(--muted); margin-top: 10px; max-width: 62ch; }

.shelf-grid{
  margin-top: 18px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  transform-style: preserve-3d;
}
.s-card{
  background: linear-gradient(180deg, #171a20, #15171c);
  border: 1px solid var(--line); border-radius: 18px; padding: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, border-color .25s ease;
}
.s-card:hover{
  transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.s-card figcaption{ margin-top: 8px; color: var(--muted); font-size: 14px; }

/* gentle stepped levels */
.s-card:nth-child(1){ transform: translateY(0); }
.s-card:nth-child(2){ transform: translateY(10px); }
.s-card:nth-child(3){ transform: translateY(20px); }
.s-card:nth-child(4){ transform: translateY(0); }
.s-card:nth-child(5){ transform: translateY(10px); }
.s-card:nth-child(6){ transform: translateY(20px); }

@media (max-width: 980px){
  .shelf-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s-card:nth-child(n){ transform: none; } /* step offsets off on smaller screens */
}
@media (max-width: 560px){
  .shelf-grid{ grid-template-columns: 1fr; }
}

/* ====== SECTION 4: Warmth Meter (animated bars) ====== */
.warmth{ max-width: 1100px; margin: 40px auto 0; padding: 16px; }
.warm-heading{
  font-family: Playfair, serif;
  font-size: clamp(24px, 3vw, 34px);
}
.warm-lead{ color: var(--muted); margin-top: 10px; max-width: 62ch; }

.warm-grid{
  margin-top: 18px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.warm-card{
  background: var(--card); border:1px solid var(--line);
  border-radius: 16px; padding: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
.warm-card h3{ margin: 0 0 6px; font-size: 18px; }
.warm-card p{ color: var(--muted); margin: 0 0 10px; }

/* bar meter */
.bar{
  --fill: 0%;
  position: relative; height: 10px; border-radius: 999px; overflow: hidden;
  background: #1a1d23; border: 1px solid var(--line);
}
.bar i{
  display: block; height: 100%;
  width: var(--fill);
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width .9s cubic-bezier(.2,.8,.2,1);
}
.bar-note{ display:block; margin-top: 6px; color: var(--muted); font-size: 12px; }

@media (max-width: 1100px){
  .warm-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px){
  .warm-grid{ grid-template-columns: 1fr; }
}

/* Safety: no horizontal scroll */
html, body{ overflow-x: hidden; }
/* ---------- MOBILE FIXES (≤ 600px) ---------- */
@media (max-width: 600px){
  /* Материалы: один столбец без узкой левой колонки */
  .mat-timeline{
    gap: 18px;
    margin-top: 18px;
  }
  .mat-timeline::before{ display: none; }        /* прячем вертикальный спайн */
  .mat-node{
    grid-template-columns: 1fr !important;       /* один столбец */
    gap: 10px;
    position: relative;
  }
  .mat-node::before{ display: none; }            /* прячем маркер-«пулю» */
  .mat-fig{ grid-column: 1 !important; }
  .mat-copy{
    grid-column: 1 !important;
    padding: 12px;
    border-radius: 12px;
  }

  /* читабельность заголовков и текста */
  .mat-heading,
  .shelf-heading,
  .warm-heading{ font-size: 22px; }
  .mat-copy h3,
  .warm-card h3{ font-size: 16px; }
  .mat-lead,
  .shelf-lead,
  .warm-lead{ font-size: 14.5px; line-height: 1.55; }
  .mat-copy p{ line-height: 1.55; }

  /* картинки точно не шире контейнера */
  .cap-img{ width: 100%; max-width: 350px; }

  /* кнопка наверх — не перекрывает контент */
  .backtotop{ right: 12px; bottom: 12px; }
}

/* страхуемся от любых сжатий текста */
.materials, .shelf, .warmth, .mat-copy, .warm-card{
  word-break: normal;
  overflow-wrap: anywhere; /* переносим слова по необходимости, но не по буквам */
}
/* ====== SECTION 5: Fold Lab ====== */
.foldlab{ max-width: 1100px; margin: 40px auto 0; padding: 16px; }
.fold-heading{ font-family: Playfair, serif; font-size: clamp(24px,3vw,34px); }
.fold-lead{ color: var(--muted); margin-top: 10px; max-width: 62ch; }

.fold-grid{
  margin-top: 18px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(3, minmax(0,1fr));
}
.fold-card{
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .25s ease;
}
.fold-card:hover{
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
}
.fold-card::before,
.fold-card::after{
  content:""; position:absolute; inset: -30% -10%;
  background:
    repeating-linear-gradient( 125deg,
      rgba(255,255,255,.055) 0px,
      rgba(255,255,255,.055) 2px,
      transparent 2px,
      transparent 10px);
  transform: rotate(0deg);
  opacity: .25; pointer-events: none; mix-blend-mode: screen;
  animation: foldflow 10s linear infinite;
}
.fold-card::after{ animation-duration: 14s; opacity: .18; }
@keyframes foldflow{
  from{ transform: translateX(-3%) rotate(0deg); }
  to{   transform: translateX(3%)  rotate(0deg); }
}
.fold-card figcaption{ margin-top: 8px; color: var(--muted); font-size: 14px; }

@media (max-width: 980px){
  .fold-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px){
  .fold-grid{ grid-template-columns: 1fr; }
}

/* ====== SECTION 6: Quiet Palette ====== */
.palette{ max-width: 1100px; margin: 40px auto 0; padding: 16px; }
.pal-heading{ font-family: Playfair, serif; font-size: clamp(24px,3vw,34px); }
.pal-lead{ color: var(--muted); margin-top: 10px; max-width: 62ch; }

.pal-wrap{
  margin-top: 18px;
  display: grid; gap: 16px;
  grid-template-columns: 1.2fr .8fr;
}
.preview-card{
  background: linear-gradient(120deg, var(--pal-a, #d6a97b), var(--pal-b, #1b1e23));
  border: 1px solid var(--line); border-radius: 18px;
  padding: 16px; display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
  transition: background .35s ease;
}

.pal-swatches{ display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; align-content: start; }
.sw{
  height: 56px; border-radius: 14px; border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  background: linear-gradient(120deg, var(--sw-a, #d6a97b), var(--sw-b, #1b1e23));
  color: #0f1115; font-weight: 600;
}
.sw:hover, .sw:focus-visible{
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
  box-shadow: 0 12px 32px rgba(0,0,0,.32);
}

/* color demo for each sw from its data-colors via inline var set in JS */
.sw[data-active="true"]{ outline: 2px solid var(--brand); }

@media (max-width: 900px){
  .pal-wrap{ grid-template-columns: 1fr; }
  .pal-swatches{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 560px){
  .pal-swatches{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* ====== SECTION 7: Evening Table (horizontal snap) ====== */
.evening{ max-width: 1200px; margin: 40px auto 0; padding: 16px; }
.eve-heading{ font-family: Playfair, serif; font-size: clamp(24px,3vw,34px); }
.eve-lead{ color: var(--muted); margin-top: 10px; max-width: 62ch; }

.eve-scroller{
  margin-top: 18px; display: grid; grid-auto-flow: column; gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding-bottom: 8px;
}
.eve-card{
  scroll-snap-align: start;
  min-width: min(84vw, 360px);
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.24);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .25s ease;
}
.eve-card:hover{
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
}
.eve-card figcaption{ margin-top: 8px; color: var(--muted); font-size: 14px; }

/* controls */
.eve-controls{
  display: flex; justify-content: center; gap: 10px; margin-top: 12px;
}
.eve-nav{
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #111; font-weight: 700; box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.eve-nav:hover{ transform: translateY(-1px); }

/* mobile tweaks */
@media (max-width: 560px){
  .eve-card{ min-width: 82vw; }
}
/* ====== SECTION 8: Grain Map ====== */
.grainmap{ max-width: 1100px; margin: 40px auto 0; padding: 16px; }
.gm-heading{ font-family: Playfair, serif; font-size: clamp(24px,3vw,34px); }
.gm-lead{ color: var(--muted); margin-top: 10px; max-width: 62ch; }

.gm-grid{
  margin-top: 18px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(2, minmax(0,1fr));
}
.gm-card{
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
.gm-card figcaption{ margin-top: 8px; color: var(--muted); font-size: 14px; }

/* ping markers (no inline styles; positions via per-map classes) */
.gm-pings{ position: absolute; inset: 0; pointer-events: none; }
.gm-pings li{
  position: absolute; width: 10px; height: 10px; border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #ffd6ad, #d6a97b 60%);
  box-shadow: 0 0 0 6px rgba(20,22,26,.55);
  animation: ping 2.8s ease-out infinite;
  opacity: .9;
}
@keyframes ping{
  0%{ transform: scale(.9); opacity: .9; }
  70%{ transform: scale(1.4); opacity: .25; }
  100%{ transform: scale(1.6); opacity: .0; }
}

/* oak positions */
.gm-oak li:nth-child(1){ left: 18%; top: 28%; }
.gm-oak li:nth-child(2){ left: 56%; top: 18%; animation-delay: .3s; }
.gm-oak li:nth-child(3){ left: 72%; top: 54%; animation-delay: .6s; }
.gm-oak li:nth-child(4){ left: 32%; top: 70%; animation-delay: .9s; }

/* cotton positions */
.gm-cotton li:nth-child(1){ left: 22%; top: 34%; }
.gm-cotton li:nth-child(2){ left: 48%; top: 26%; animation-delay: .25s; }
.gm-cotton li:nth-child(3){ left: 66%; top: 58%; animation-delay: .5s; }
.gm-cotton li:nth-child(4){ left: 30%; top: 74%; animation-delay: .75s; }

@media (max-width: 860px){
  .gm-grid{ grid-template-columns: 1fr; }
}

/* ====== SECTION 9: Shelf Builder ====== */
.builder{ max-width: 1200px; margin: 40px auto 0; padding: 16px; }
.build-heading{ font-family: Playfair, serif; font-size: clamp(24px,3vw,34px); }
.build-lead{ color: var(--muted); margin-top: 10px; max-width: 62ch; }

.build-presets{ margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.preset{
  height: 40px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #171a20; color: var(--ink);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.preset:hover, .preset:focus-visible{
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
  background: #1d2026;
}
.preset[data-active="true"]{ outline: 2px solid var(--brand); }

.build-grid{
  margin-top: 16px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(3, minmax(0,1fr));
}
.b-card{
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .25s ease;
}
.b-card:hover{
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
}
.b-card figcaption{ margin-top: 8px; color: var(--muted); font-size: 14px; }

/* layout presets via container class */
.layout-cozy{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.layout-gallery{ grid-template-columns: repeat(4, minmax(0,1fr)); }
.layout-narrow{ grid-template-columns: repeat(2, minmax(0,1fr)); }

@media (max-width: 1000px){
  .layout-gallery{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 760px){
  .layout-cozy, .layout-gallery{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px){
  .layout-cozy, .layout-gallery, .layout-narrow{ grid-template-columns: 1fr; }
}

/* ====== SECTION 10: Scent Trails ====== */
.scent{ max-width: 1100px; margin: 40px auto 60px; padding: 16px; }
.scent-heading{ font-family: Playfair, serif; font-size: clamp(24px,3vw,34px); }
.scent-lead{ color: var(--muted); margin-top: 10px; max-width: 62ch; }

.scent-grid{
  margin-top: 18px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(3, minmax(0,1fr));
}
.s-card{
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .25s ease;
}
.s-card:hover{
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
}
.s-card figcaption{ margin-top: 8px; color: var(--muted); font-size: 14px; }
.s-desc{ color: var(--muted); margin-top: 8px; }

/* glow ribbons */
.s-card::before, .s-card::after{
  content:""; position:absolute; inset: -40% -10%;
  background: radial-gradient(60% 40% at 40% 50%, rgba(214,169,123,.25), transparent 60%),
              radial-gradient(40% 60% at 70% 60%, rgba(155,182,167,.22), transparent 60%);
  filter: blur(22px); mix-blend-mode: screen; opacity: .35; pointer-events: none;
  animation: drift 18s linear infinite;
}
.s-card::after{ animation-duration: 26s; opacity: .25; }
@keyframes drift{
  0%{ transform: translate3d(-3%, -1%, 0) rotate(0deg); }
  50%{ transform: translate3d(3%, 2%, 0) rotate(180deg); }
  100%{ transform: translate3d(-3%, -1%, 0) rotate(360deg); }
}

/* different color accents per item */
.glow-a::before{ background: radial-gradient(60% 40% at 40% 50%, rgba(255,206,164,.28), transparent 60%),
                              radial-gradient(40% 60% at 70% 60%, rgba(182,191,174,.22), transparent 60%); }
.glow-b::before{ background: radial-gradient(60% 40% at 45% 55%, rgba(219,182,156,.28), transparent 60%),
                              radial-gradient(40% 60% at 65% 60%, rgba(155,182,167,.22), transparent 60%); }
.glow-c::before{ background: radial-gradient(60% 40% at 48% 50%, rgba(255,225,190,.28), transparent 60%),
                              radial-gradient(40% 60% at 60% 62%, rgba(171,194,183,.22), transparent 60%); }

@media (max-width: 980px){
  .scent-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px){
  .scent-grid{ grid-template-columns: 1fr; }
}

/* safety: no horizontal scroll */
html, body{ overflow-x: hidden; }
/* ====== SECTION 11: Craft Index (tabs; 1 image) ====== */
.craft{ max-width: 1100px; margin: 40px auto 0; padding: 16px; }
.craft-heading{ font-family: Playfair, serif; font-size: clamp(24px,3vw,34px); }
.craft-lead{ color: var(--muted); margin-top: 10px; max-width: 62ch; }

.craft-tabs{ margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.tab{
  height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: #171a20; color: var(--ink);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.tab:hover, .tab:focus-visible{ transform: translateY(-1px); background:#1d2026; border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.tab[aria-selected="true"]{ outline: 2px solid var(--brand); }

.craft-panels{ margin-top: 14px; }
.panel{ display: none; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.panel.is-active{ display: block; animation: fadeIn .35s ease both; }
@keyframes fadeIn{ from{ opacity:.6; transform: translateY(6px);} to{ opacity:1; transform:none;} }

.craft-fig{ margin-top: 10px; }
.craft-fig figcaption{ color: var(--muted); margin-top: 6px; font-size: 14px; }

/* ====== SECTION 12: Room Notes (ribbon quotes) ====== */
.notes{ max-width: 1100px; margin: 40px auto 0; padding: 16px; }
.notes-heading{ font-family: Playfair, serif; font-size: clamp(24px,3vw,34px); }
.notes-lead{ color: var(--muted); margin-top: 10px; max-width: 62ch; }

.notes-list{ margin-top: 16px; display: grid; gap: 14px; }
.note{
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 16px 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
.note::before{
  content:""; position:absolute; left: -8px; top: 14px; width: 10px; height: 26px; border-radius: 3px;
  background: linear-gradient(120deg, var(--brand), var(--brand-2)); box-shadow: var(--shadow);
}
.note blockquote{ margin: 0; line-height: 1.6; }
.note cite{ display:block; margin-top: 8px; color: var(--muted); font-style: normal; font-size: 14px; }

/* ====== SECTION 13: Care Steps (CSS pictograms) ====== */
.care{ max-width: 1100px; margin: 40px auto 60px; padding: 16px; }
.care-heading{ font-family: Playfair, serif; font-size: clamp(24px,3vw,34px); }
.care-lead{ color: var(--muted); margin-top: 10px; max-width: 62ch; }

.care-steps{ margin-top: 16px; display: grid; gap: 12px; }
.c-step{
  display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px;
}
.c-copy h3{ margin: 0 0 6px; font-size: 18px; }
.c-copy p{ margin: 0; color: var(--muted); }

/* pictograms */
.ico{
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  position: relative; box-shadow: var(--shadow);
}
.ico::after{
  content:""; position:absolute; inset: 10px; border-radius: 8px; background: #111; opacity: .9;
}
/* wipe: small diagonal stroke */
.ico.wipe::before{
  content:""; position:absolute; left: 10px; right: 10px; top: 18px; height: 2px; background: #fff; transform: rotate(-25deg);
}
/* shade: tiny sun with shade arc */
.ico.shade::before{
  content:""; position:absolute; width: 8px; height: 8px; border-radius: 50%; background:#fff; left: 8px; top: 8px;
}
.ico.shade::after{
  content:""; position:absolute; right: 6px; bottom: 8px; width: 16px; height: 8px; border-radius: 10px 10px 0 0; background:#fff; opacity:.8;
}
/* rest: pause symbol */
.ico.rest::before, .ico.rest::after{
  content:""; position:absolute; top: 10px; width: 4px; height: 20px; background:#fff; border-radius: 2px;
}
.ico.rest::before{ left: 12px; }
.ico.rest::after{ left: 22px; }

/* responsive tune-ups */
@media (max-width: 760px){
  .c-step{ grid-template-columns: 40px 1fr; }
}
@media (max-width: 560px){
  .craft-tabs{ gap: 6px; }
  .tab{ height: 38px; padding: 0 12px; }
}
/* ====== SECTION 14: Design Tenets (no images) ====== */
.tenets{ max-width: 1200px; margin: 40px auto 0; padding: 16px; }
.tenets-heading{ font-family: Playfair, serif; font-size: clamp(24px,3vw,34px); }
.tenets-lead{ color: var(--muted); margin-top: 10px; max-width: 62ch; }

/* decorative silk line */
.tenets-silk{ margin-top: 10px; }
.silk{ width: 100%; height: 60px; display: block; }
.silk path{
  fill: none; stroke: color-mix(in srgb, var(--brand) 55%, var(--brand-2) 45%);
  stroke-width: 1.2; opacity: .5; filter: drop-shadow(0 6px 12px rgba(0,0,0,.25));
  stroke-dasharray: 6 10; animation: glide 9s linear infinite;
}
@keyframes glide{
  to{ stroke-dashoffset: -320; }
}

.tenets-grid{
  margin-top: 16px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(3, minmax(0,1fr));
}
.t-card{
  position: relative;
  background: #15181d;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.26);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .25s ease, box-shadow .25s ease;
}
.t-card h3{ margin: 0 0 6px; font-size: 18px; }
.t-card p{ color: var(--muted); }

/* animated corner accents */
.t-card::before, .t-card::after{
  content:""; position:absolute; width: 22px; height: 22px;
  border-radius: 6px; opacity: .6; mix-blend-mode: screen; filter: blur(6px);
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  transition: transform .25s ease, opacity .25s ease;
}
.t-card::before{ left: 10px; top: 10px; }
.t-card::after{ right: 10px; bottom: 10px; }
.t-card:hover{
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
  box-shadow: 0 16px 40px rgba(0,0,0,.38);
}
.t-card:hover::before{ transform: translateY(-2px); opacity: .9; }
.t-card:hover::after{ transform: translateY(2px); opacity: .9; }

@media (max-width: 980px){
  .tenets-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px){
  .tenets-grid{ grid-template-columns: 1fr; }
}

/* ====== SECTION 15: Quiet FAQ (accordion; no images) ====== */
.qfaq{ max-width: 1100px; margin: 40px auto 60px; padding: 16px; }
.faq-heading{ font-family: Playfair, serif; font-size: clamp(24px,3vw,34px); }
.faq-lead{ color: var(--muted); margin-top: 10px; max-width: 62ch; }

.faq-list{ margin-top: 16px; display: grid; gap: 10px; }
.faq-item{
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
.faq-q{
  width: 100%; text-align: left;
  padding: 14px 44px 14px 14px;
  color: var(--ink); background: transparent; border: 0;
  border-radius: 16px;
  position: relative;
  transition: background .2s ease;
}
.faq-q::after{
  content:""; position:absolute; right: 14px; top: 50%; transform: translateY(-50%) rotate(0deg);
  width: 14px; height: 14px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  opacity: .8; transition: transform .2s ease, opacity .2s ease;
}
.faq-q[aria-expanded="true"]::after{ transform: translateY(-50%) rotate(45deg); opacity: 1; }
.faq-q:hover, .faq-q:focus-visible{ background: #1b1e24; }

.faq-a{
  padding: 0 14px 14px 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  animation: accFade .25s ease;
}
@keyframes accFade{
  from{ opacity: .6; transform: translateY(-2px); }
  to{ opacity: 1; transform: none; }
}

@media (max-width: 560px){
  .faq-q{ padding: 12px 40px 12px 12px; }
}
/* === ROOT page — Section 1 image fix === */
/* Сетка первой секции */
:where(main > section:first-of-type) .hero-grid{
  display: grid;
  grid-template-columns: repeat( auto-fit, minmax(220px, 1fr) );
  gap: 16px;
  align-items: start;
}

/* Единая карточка */
:where(main > section:first-of-type) figure{
  /* одинаковая пропорция у всех карточек */
  aspect-ratio: 4 / 3;
  max-width: 350px;              /* требование: не больше 350px */
  width: 100%;
  margin: 0 auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 10px 30px rgba(0,0,0,.26);
  overflow: hidden;
  display: grid;
}

/* Само изображение — без искажений */
:where(main > section:first-of-type) figure > img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;              /* обрезаем края, не растягиваем */
  object-position: center;
}

/* Подпись под фото */
:where(main > section:first-of-type) figure > figcaption{
  align-self: end;
  margin-top: 8px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 14px;
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(6px);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

/* На узких — одна колонка и центр */
@media (max-width: 560px){
  :where(main > section:first-of-type) .hero-grid{
    grid-template-columns: 1fr;
    justify-items: center;
  }
  :where(main > section:first-of-type) figure{
    max-width: min(350px, 92vw);
  }
}
