*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--outer);color:var(--ink);font-family:Arial,Helvetica,sans-serif}.page{background:var(--bg);overflow:hidden}img{display:block;width:100%}a{color:inherit}.hero{min-height:760px;display:grid;grid-template-columns:1fr 1fr}.hero-photo{min-height:760px;background-size:cover;background-position:center;clip-path:polygon(0 0,100% 0,88% 100%,0 100%)}.hero-copy{padding:70px 7vw 70px 3vw;display:flex;flex-direction:column;justify-content:center;position:relative}.kicker,.section-label{font-size:12px;letter-spacing:.22em;text-transform:uppercase;font-weight:700;color:var(--accent)}.hero h1,.section h2{font-family:Georgia,serif;font-weight:500}.hero h1{font-family:"Snell Roundhand","Segoe Script","Apple Chancery","Brush Script MT",cursive;font-size:clamp(78px,10vw,150px);line-height:.86;font-weight:400;margin:20px 0;letter-spacing:-.04em}.hero p,.section p{font-size:17px;line-height:1.8}.stamp{position:absolute;right:28px;top:26px;width:130px;height:130px;border:3px double currentColor;border-radius:50%;display:grid;place-items:center;text-align:center;font-size:10px;letter-spacing:.11em;text-transform:uppercase;color:var(--accent);transform:rotate(12deg)}.hero-date{display:grid;grid-template-columns:auto auto;grid-template-rows:auto auto;gap:6px 22px;align-items:end;margin-top:34px;width:max-content;max-width:100%}.hero-date__day{grid-row:1/3;font:500 clamp(106px,10vw,156px)/.78 Georgia,serif;color:var(--accent);letter-spacing:-.07em}.hero-date__month{font:italic 500 clamp(50px,5vw,72px)/.95 Georgia,serif}.hero-date__year{font-size:16px;letter-spacing:.3em;opacity:.65;padding-bottom:9px}.hero-date__city{grid-column:1/-1;margin-top:24px;padding-top:17px;border-top:1px solid color-mix(in srgb,var(--ink) 18%,transparent);font-size:13px;letter-spacing:.22em;text-transform:uppercase}.section{padding:96px 7vw;border-top:1px solid color-mix(in srgb,var(--ink) 14%,transparent)}.section-head{display:grid;grid-template-columns:1.2fr .8fr;gap:40px;align-items:end;margin-bottom:46px}.section h2{font-size:clamp(42px,6vw,84px);line-height:.96;letter-spacing:-.04em;margin:0}.story-postcard{display:grid;grid-template-columns:1.1fr .9fr;min-height:610px;border:1px solid color-mix(in srgb,var(--ink) 20%,transparent);background:var(--paper);box-shadow:0 24px 70px rgba(0,0,0,.1)}.story-postcard img{height:100%;min-height:610px;object-fit:cover}.story-letter{padding:72px 56px;display:flex;flex-direction:column;justify-content:center}.story-letter h3{font:italic 500 clamp(36px,4vw,58px)/1.02 Georgia,serif;margin:18px 0}.story-sign{margin-top:22px;padding-top:18px;border-top:1px solid color-mix(in srgb,var(--ink) 20%,transparent);font:italic 500 25px/1 Georgia,serif;color:var(--accent)}.program-mail{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.program-card{min-height:410px;padding:34px 28px;border:1px solid color-mix(in srgb,var(--ink) 18%,transparent);background:color-mix(in srgb,var(--bg) 88%,white);position:relative}.program-card:nth-child(even){transform:translateY(24px)}.program-icon{width:118px;height:118px;margin-bottom:40px;color:var(--accent)}.program-icon img{width:100%;height:100%;object-fit:contain}.program-card time{font-size:28px;font-weight:700;color:var(--accent)}.program-card h3{font:500 30px/1.05 Georgia,serif;margin:12px 0}.program-number{position:absolute;right:20px;top:15px;font:500 58px/1 Georgia,serif;color:color-mix(in srgb,var(--accent) 13%,transparent)}.locations-wrap{display:grid;grid-template-columns:1fr 1fr;gap:24px}.location-card{border:1px solid color-mix(in srgb,var(--ink) 16%,transparent);background:var(--paper);box-shadow:0 22px 60px rgba(0,0,0,.09);overflow:hidden}.location-card img{height:360px;object-fit:cover}.location-content{padding:34px}.location-content h3{font:500 38px/1.04 Georgia,serif;margin:10px 0}.btn{display:inline-flex;padding:15px 20px;border:1px solid currentColor;text-decoration:none;text-transform:uppercase;letter-spacing:.14em;font-size:11px;margin-top:18px}.dc-board{display:grid;gap:22px}.dc-palette-card{padding:34px;border:1px solid color-mix(in srgb,var(--ink) 15%,transparent);background:var(--paper)}.dc-color-row{display:grid;grid-template-columns:repeat(5,1fr);gap:14px}.dc-mark{height:118px;position:relative}.dc-mark:before{content:"";position:absolute;inset:13px 7px 12px;background:var(--c);border-radius:48% 52% 45% 55%;transform:rotate(var(--r));box-shadow:8px 10px 0 var(--shadow)}.dc-color{text-align:center}.dc-color b{font:500 16px/1.25 Georgia,serif}.dc-tips{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.dc-tip{padding:28px 24px;border:1px solid color-mix(in srgb,var(--ink) 14%,transparent);background:var(--paper)}.dc-tip h4{font:500 24px/1.05 Georgia,serif;margin:0 0 10px}.gallery-grid{display:grid;grid-template-columns:1.2fr .8fr .8fr;gap:18px}.gallery-grid img{height:420px;object-fit:cover}.rsvp{background:var(--accent);color:#fff;display:grid;grid-template-columns:.8fr 1.2fr;gap:60px}.rsvp-form{background:rgba(255,255,255,.08);padding:28px}.details-stage,.contacts-stage{padding:0}.footer{display:flex;justify-content:space-between;gap:20px;padding:54px 7vw;border-top:1px solid color-mix(in srgb,var(--ink) 14%,transparent);font-size:11px;letter-spacing:.18em;text-transform:uppercase}.theme-switcher{position:fixed;right:16px;bottom:16px;z-index:99;background:var(--paper);padding:12px;box-shadow:0 10px 30px rgba(0,0,0,.2)}.theme-options{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-top:8px}.theme-option{padding:8px;border:1px solid #ccc;background:transparent;color:inherit}.theme-option.is-active{outline:2px solid var(--accent)}@media(max-width:1000px){.program-mail{grid-template-columns:repeat(2,1fr)}.program-card:nth-child(even){transform:none}}@media(max-width:820px){.hero{grid-template-columns:1fr}.hero-photo{min-height:56vh;clip-path:none}.hero-copy{padding:48px 24px}.hero h1{font-size:clamp(68px,19vw,108px)}.stamp{width:96px;height:96px}.section{padding:70px 24px}.section-head,.story-postcard,.locations-wrap,.rsvp{grid-template-columns:1fr}.story-postcard img{min-height:430px}.story-letter{padding:46px 28px}.program-mail{grid-template-columns:1fr}.dc-color-row{grid-template-columns:repeat(2,1fr)}.dc-tips{grid-template-columns:1fr}.gallery-grid{grid-template-columns:1fr}.gallery-grid img{height:320px}.footer{flex-direction:column}.location-card img{height:300px}}
/* STORY COMPACT */
.story-section{padding-top:68px;padding-bottom:68px}
.story-section .section-head{margin-bottom:30px}
.story-section .story-postcard{min-height:460px;grid-template-columns:1.04fr .96fr}
.story-section .story-postcard img{min-height:460px;height:460px}
.story-section .story-letter{padding:44px 46px}
.story-section .story-letter h3{font-size:clamp(32px,3.4vw,50px);margin:12px 0 16px}
.story-section .story-letter p{font-size:16px;line-height:1.65;margin:0}
.story-section .story-sign{margin-top:16px;padding-top:14px;font-size:22px}
@media(max-width:820px){
  .story-section{padding-top:54px;padding-bottom:54px}
  .story-section .section-head{margin-bottom:24px}
  .story-section .story-postcard img{min-height:300px;height:300px}
  .story-section .story-letter{padding:32px 24px}
  .story-section .story-letter h3{font-size:clamp(30px,10vw,44px)}
}

/* Story section: fixed desktop height and no visual duplication */
.story-section{padding-top:68px;padding-bottom:68px}
.story-section .section-head{margin-bottom:30px}
.story-section .story-postcard{height:660px;min-height:660px;grid-template-columns:1.04fr .96fr}
.story-section .story-postcard>img{height:660px;min-height:660px;object-fit:cover}
.story-section .story-letter{height:660px;padding:48px 50px;overflow:auto}
.story-section .story-letter h3{font-size:clamp(34px,3.6vw,54px);margin:12px 0 18px}
.story-section .story-letter p{font-size:16px;line-height:1.65;margin:0}
.story-section .story-sign{margin-top:18px;padding-top:15px;font-size:22px}
@media(max-width:820px){
  .story-section{padding-top:54px;padding-bottom:54px}
  .story-section .section-head{margin-bottom:24px}
  .story-section .story-postcard{height:auto;min-height:0}
  .story-section .story-postcard>img{height:420px;min-height:420px}
  .story-section .story-letter{height:auto;overflow:visible;padding:34px 24px}
}

/* STORY — заголовок из студии + цитата без повторов */
.story-section .story-heading{
  grid-template-columns:minmax(0,1fr);
  margin-bottom:38px;
}
.story-section .story-heading h2{
  max-width:1180px;
}
.story-section .story-postcard--quote{
  height:660px;
  min-height:660px;
  grid-template-columns:.78fr 1.22fr;
}
.story-section .story-postcard--quote>img{
  order:2;
  width:100%;
  height:660px;
  min-height:660px;
  object-fit:cover;
}
.story-section .story-quote{
  order:1;
  position:relative;
  padding:72px 64px 64px;
  justify-content:center;
  overflow:hidden;
}
.story-section .story-quote__mark{
  position:absolute;
  left:38px;
  top:14px;
  font:italic 500 180px/.9 Georgia,serif;
  color:color-mix(in srgb,var(--accent) 14%,transparent);
  pointer-events:none;
}
.story-section .story-quote blockquote{
  position:relative;
  z-index:1;
  margin:0;
  font:italic 500 clamp(24px,2.25vw,37px)/1.45 Georgia,serif;
  letter-spacing:-.015em;
  color:var(--ink);
}
.story-section .story-quote .story-sign{
  position:relative;
  z-index:1;
  margin-top:34px;
  padding-top:22px;
  font-size:25px;
}
@media(max-width:820px){
  .story-section .story-heading{margin-bottom:28px}
  .story-section .story-postcard--quote{
    height:auto;
    min-height:0;
    grid-template-columns:1fr;
  }
  .story-section .story-postcard--quote>img{
    order:1;
    height:420px;
    min-height:420px;
  }
  .story-section .story-quote{
    order:2;
    padding:58px 28px 42px;
  }
  .story-section .story-quote__mark{
    left:18px;
    top:8px;
    font-size:126px;
  }
  .story-section .story-quote blockquote{
    font-size:clamp(22px,7vw,30px);
  }
}


/* =========================================================
   STORY: WITH PHOTO / WITHOUT PHOTO
========================================================= */
.story-section .story-postcard--quote.has-photo{
  grid-template-columns:.78fr 1.22fr;
}

.story-section .story-postcard--quote.no-photo{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  min-height:520px;
  height:auto;
  overflow:hidden;
  background:
    linear-gradient(135deg, color-mix(in srgb,var(--paper) 96%,white), var(--paper));
}

.story-section .story-postcard--quote.no-photo:before{
  content:"";
  position:absolute;
  inset:22px;
  border:1px dashed color-mix(in srgb,var(--accent) 32%,transparent);
  pointer-events:none;
}

.story-section .story-postcard--quote.no-photo .story-quote{
  width:min(980px,calc(100% - 120px));
  min-height:520px;
  height:auto;
  margin:0 auto;
  padding:86px 88px 72px;
  text-align:center;
  align-items:center;
  overflow:visible;
}

.story-section .story-quote__eyebrow{
  display:none;
  position:relative;
  z-index:1;
  margin-bottom:24px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--accent);
}

.story-section .story-postcard--quote.no-photo .story-quote__eyebrow{
  display:block;
}

.story-section .story-postcard--quote.no-photo .story-quote__mark{
  left:50%;
  top:8px;
  transform:translateX(-50%);
  font-size:210px;
  opacity:.8;
}

.story-section .story-postcard--quote.no-photo blockquote{
  max-width:850px;
  font-size:clamp(27px,2.6vw,44px);
  line-height:1.42;
}

.story-section .story-postcard--quote.no-photo .story-sign{
  min-width:min(520px,80%);
  margin-top:38px;
}

.story-no-photo-decor{
  position:absolute;
  inset:0;
  pointer-events:none;
}

.story-no-photo-stamp{
  position:absolute;
  right:46px;
  top:42px;
  width:118px;
  height:118px;
  border:2px solid color-mix(in srgb,var(--accent) 42%,transparent);
  border-radius:50%;
  display:grid;
  place-items:center;
  text-align:center;
  font-size:10px;
  line-height:1.45;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--accent);
  transform:rotate(9deg);
  opacity:.65;
}

.story-no-photo-lines{
  position:absolute;
  left:42px;
  bottom:44px;
  width:160px;
  height:54px;
  border-top:1px solid color-mix(in srgb,var(--accent) 28%,transparent);
  border-bottom:1px solid color-mix(in srgb,var(--accent) 28%,transparent);
}

.story-no-photo-lines:after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:50%;
  border-top:1px solid color-mix(in srgb,var(--accent) 28%,transparent);
}

/* =========================================================
   LOCATIONS: WITH PHOTO / WITHOUT PHOTO
========================================================= */
.location-section .locations-wrap{
  align-items:stretch;
}

.location-card{
  display:flex;
  flex-direction:column;
  min-height:610px;
}

.location-card.has-photo .location-media{
  position:relative;
  height:360px;
  overflow:hidden;
}

.location-card.has-photo .location-media img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.location-media__label{
  position:absolute;
  left:22px;
  top:20px;
  padding:9px 12px;
  background:color-mix(in srgb,var(--paper) 92%,transparent);
  color:var(--ink);
  font-size:10px;
  font-weight:700;
  letter-spacing:.16em;
  text-transform:uppercase;
  backdrop-filter:blur(8px);
}

.location-card.no-photo{
  position:relative;
  background:
    linear-gradient(145deg,
      color-mix(in srgb,var(--paper) 96%,white),
      color-mix(in srgb,var(--soft) 52%,var(--paper))
    );
}

.location-visual-empty{
  position:relative;
  min-height:300px;
  overflow:hidden;
  border-bottom:1px solid color-mix(in srgb,var(--ink) 12%,transparent);
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb,var(--accent) 10%,transparent), transparent 44%),
    repeating-linear-gradient(
      0deg,
      transparent 0 31px,
      color-mix(in srgb,var(--ink) 5%,transparent) 31px 32px
    );
}

.location-visual-empty:before,
.location-visual-empty:after{
  content:"";
  position:absolute;
  border:1px solid color-mix(in srgb,var(--accent) 22%,transparent);
  border-radius:50%;
}

.location-visual-empty:before{
  width:250px;
  height:250px;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
}

.location-visual-empty:after{
  width:166px;
  height:166px;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
}

.location-pin{
  position:absolute;
  left:50%;
  top:50%;
  width:94px;
  height:94px;
  transform:translate(-50%,-55%);
  color:var(--accent);
  z-index:2;
}

.location-pin svg{
  width:100%;
  height:100%;
  stroke:currentColor;
  stroke-width:2;
}

.location-route-line{
  position:absolute;
  left:25px;
  right:25px;
  bottom:28px;
  height:1px;
  background:color-mix(in srgb,var(--accent) 34%,transparent);
}

.location-route-line:before,
.location-route-line:after{
  content:"";
  position:absolute;
  top:50%;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--accent);
  transform:translateY(-50%);
}

.location-route-line:before{left:0}
.location-route-line:after{right:0}

.location-empty-label{
  position:absolute;
  left:22px;
  top:20px;
  padding:8px 11px;
  border:1px solid color-mix(in srgb,var(--accent) 35%,transparent);
  font-size:10px;
  font-weight:700;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--accent);
}

.location-content{
  display:flex;
  flex-direction:column;
  flex:1;
}

.location-address{
  display:grid;
  grid-template-columns:70px 1fr;
  gap:18px;
  margin:12px 0 18px;
  padding:15px 0;
  border-top:1px solid color-mix(in srgb,var(--ink) 12%,transparent);
  border-bottom:1px solid color-mix(in srgb,var(--ink) 12%,transparent);
}

.location-address span{
  font-size:10px;
  font-weight:700;
  letter-spacing:.15em;
  text-transform:uppercase;
  color:var(--accent);
}

.location-address strong{
  font-size:15px;
  line-height:1.5;
}

.location-note{
  margin:0;
  font-size:15px !important;
  line-height:1.65 !important;
}

.location-content .btn{
  margin-top:auto;
  align-self:flex-start;
}

.location-card.no-photo .location-content{
  padding-top:38px;
}

.location-card.no-photo .location-content h3{
  font-size:clamp(38px,4vw,56px);
  max-width:540px;
}

@media(max-width:820px){
  .story-section .story-postcard--quote.no-photo{
    min-height:0;
  }

  .story-section .story-postcard--quote.no-photo .story-quote{
    width:100%;
    min-height:440px;
    padding:74px 28px 54px;
  }

  .story-section .story-postcard--quote.no-photo blockquote{
    font-size:clamp(23px,7vw,32px);
  }

  .story-section .story-postcard--quote.no-photo .story-sign{
    min-width:0;
    width:100%;
  }

  .story-no-photo-stamp{
    width:82px;
    height:82px;
    right:18px;
    top:18px;
    font-size:8px;
  }

  .story-no-photo-lines{
    display:none;
  }

  .location-card{
    min-height:0;
  }

  .location-card.has-photo .location-media{
    height:300px;
  }

  .location-visual-empty{
    min-height:250px;
  }

  .location-card.no-photo .location-content h3{
    font-size:clamp(34px,10vw,48px);
  }
}


/* =========================================================
   DRESSCODE: CLEAN PRESET-DRIVEN VERSION
========================================================= */
.dresscode-section{
  position:relative;
}

.dresscode-layout{
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);
  gap:64px;
  align-items:end;
  margin-bottom:42px;
}

.dresscode-heading h2{
  max-width:980px;
}

.dresscode-note{
  position:relative;
  min-height:170px;
  padding:34px 34px 30px 58px;
  border-left:2px solid color-mix(in srgb,var(--accent) 58%,transparent);
  background:color-mix(in srgb,var(--paper) 74%,transparent);
}

.dresscode-note__mark{
  position:absolute;
  left:18px;
  top:8px;
  font:500 86px/.8 Georgia,serif;
  color:color-mix(in srgb,var(--accent) 28%,transparent);
}

.dresscode-note__text{
  position:relative;
  z-index:1;
  font:italic 500 clamp(18px,1.45vw,25px)/1.55 Georgia,serif;
  color:var(--ink);
}

.dc-palette-card--clean{
  padding:34px 38px 30px;
  background:color-mix(in srgb,var(--paper) 96%,white);
  box-shadow:0 18px 48px rgba(0,0,0,.06);
}

.dc-palette-card--clean .dc-color-row{
  align-items:center;
}

.dc-palette-card--clean .dc-color{
  min-width:0;
}

.dc-palette-card--clean .dc-mark{
  height:132px;
}

.dc-palette-card--clean .dc-mark:before{
  inset:18px 8px 16px;
  border-radius:54% 46% 58% 42% / 48% 57% 43% 52%;
  box-shadow:9px 11px 0 var(--shadow);
}

/* remove old secondary advice cards from layout if legacy markup appears */
.dresscode-section .dc-tips,
.dresscode-section .dc-tip{
  display:none !important;
}

@media(max-width:980px){
  .dresscode-layout{
    grid-template-columns:1fr;
    gap:28px;
  }
  .dresscode-note{
    max-width:760px;
  }
}

@media(max-width:820px){
  .dresscode-layout{
    margin-bottom:28px;
  }
  .dresscode-note{
    min-height:0;
    padding:28px 22px 24px 46px;
  }
  .dresscode-note__mark{
    left:10px;
    top:8px;
    font-size:66px;
  }
  .dresscode-note__text{
    font-size:18px;
  }
  .dc-palette-card--clean{
    padding:24px 18px 20px;
  }
  .dc-palette-card--clean .dc-color-row{
    grid-template-columns:repeat(2,1fr);
  }
  .dc-palette-card--clean .dc-color:last-child{
    grid-column:1/-1;
    width:50%;
    justify-self:center;
  }
  .dc-palette-card--clean .dc-mark{
    height:104px;
  }
}


/* Нумерация цветов дресс-кода */
.dc-palette-card--clean .dc-color{
  display:flex;
  flex-direction:column;
  align-items:center;
}

.dc-color-number{
  margin-top:8px;
  font-size:11px;
  font-weight:700;
  line-height:1;
  letter-spacing:.22em;
  color:var(--accent);
  opacity:.68;
}

.dc-color-number:before{
  content:"";
  display:block;
  width:26px;
  height:1px;
  margin:0 auto 9px;
  background:color-mix(in srgb,var(--accent) 38%,transparent);
}

@media(max-width:820px){
  .dc-color-number{
    margin-top:5px;
    font-size:10px;
  }
}

/* FIX: keep palette marks visible after numbering */
.dc-palette-card--clean .dc-mark{
  width:100%;
  flex:0 0 auto;
  display:block;
}

.dc-palette-card--clean .dc-color{
  width:100%;
}


/* =========================================================
   GALLERY: FULL-WIDTH PROPORTIONAL MOSAIC
   Ряды заполняют всю ширину. Вертикальные фото не режутся.
========================================================= */
.gallery-grid{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:18px;
  width:100%;
}

.gallery-grid > a{
  --gallery-card-height:430px;
  position:relative;
  display:block;
  flex:0 0 auto;
  min-width:0;
  height:var(--gallery-card-height);
  overflow:hidden;
  isolation:isolate;
  background:var(--paper);
  border:1px solid color-mix(in srgb,var(--ink) 12%,transparent);
}

.gallery-grid > a:before{
  content:"";
  position:absolute;
  inset:-18px;
  z-index:-2;
  background-image:var(--gallery-bg);
  background-size:cover;
  background-position:center;
  filter:blur(16px) saturate(.72);
  opacity:.34;
  transform:scale(1.08);
}

.gallery-grid > a:after{
  content:attr(data-photo-number);
  position:absolute;
  right:14px;
  bottom:12px;
  min-width:34px;
  padding:7px 8px;
  z-index:3;
  background:color-mix(in srgb,var(--paper) 88%,transparent);
  color:var(--ink);
  font-size:10px;
  font-weight:700;
  line-height:1;
  letter-spacing:.15em;
  text-align:center;
  backdrop-filter:blur(8px);
}

.gallery-grid > a img{
  position:relative;
  z-index:1;
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  transition:transform .45s ease;
}

.gallery-grid > a:hover img{
  transform:scale(1.018);
}

/* Когда пропорции ряда позволяют, фон полностью перекрывается самим фото. */
.gallery-grid > a.is-exact img{
  object-fit:cover;
}

@media(max-width:1100px){
  .gallery-grid{
    gap:14px;
  }
}

@media(max-width:820px){
  .gallery-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:14px;
  }

  .gallery-grid > a{
    width:100% !important;
    height:auto !important;
    aspect-ratio:var(--photo-ratio,4/5);
  }

  .gallery-grid > a img{
    object-fit:cover;
  }
}

/* =========================================================
   GALLERY: CLEAN THREE-COLUMN STRIP
   Три кадра в одну линию, без обрезки и без размытого фона.
========================================================= */
.gallery-grid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:18px !important;
  width:100%;
  align-items:stretch;
}

.gallery-grid > a{
  width:100% !important;
  height:clamp(430px,34vw,620px) !important;
  min-width:0;
  overflow:hidden;
  position:relative;
  display:block;
  background:color-mix(in srgb,var(--paper) 88%,var(--bg));
  border:1px solid color-mix(in srgb,var(--ink) 12%,transparent);
}

.gallery-grid > a:before{
  content:none !important;
}

.gallery-grid > a img,
.gallery-grid > a.is-exact img{
  width:100%;
  height:100%;
  object-fit:contain !important;
  object-position:center;
  background:transparent;
  transform:none;
}

.gallery-grid > a:hover img{
  transform:scale(1.012);
}

@media(max-width:1050px){
  .gallery-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .gallery-grid > a:last-child:nth-child(odd){
    grid-column:1/-1;
    width:min(58%,720px) !important;
    justify-self:center;
  }
}

@media(max-width:820px){
  .gallery-grid{
    grid-template-columns:1fr !important;
    gap:14px !important;
  }

  .gallery-grid > a,
  .gallery-grid > a:last-child:nth-child(odd){
    grid-column:auto;
    width:100% !important;
    height:auto !important;
    aspect-ratio:var(--photo-ratio,4/5);
  }

  .gallery-grid > a img,
  .gallery-grid > a.is-exact img{
    object-fit:contain !important;
  }
}

/* =========================================================
   GALLERY: POSTAL DECOR IN SIDE MARGINS
   Декор виден только в свободных полях вокруг object-fit:contain.
========================================================= */
.gallery-grid > a{
  isolation:isolate;
  background-color:color-mix(in srgb,var(--paper) 93%,var(--bg));
  background-image:
    radial-gradient(circle at 10% 18%, transparent 0 28px, color-mix(in srgb,var(--accent) 20%,transparent) 29px 30px, transparent 31px),
    radial-gradient(circle at 10% 18%, transparent 0 40px, color-mix(in srgb,var(--accent) 11%,transparent) 41px 42px, transparent 43px),
    repeating-linear-gradient(0deg, transparent 0 14px, color-mix(in srgb,var(--ink) 5%,transparent) 14px 15px),
    linear-gradient(135deg, color-mix(in srgb,var(--accent) 5%,transparent), transparent 38% 62%, color-mix(in srgb,var(--accent) 4%,transparent));
}

.gallery-grid > a:before{
  content:"CARTE POSTALE\A IVILOVE • 2027" !important;
  white-space:pre;
  position:absolute;
  left:18px;
  bottom:18px;
  width:auto;
  height:auto;
  inset:auto auto 18px 18px;
  z-index:0;
  background:none !important;
  filter:none !important;
  transform:none !important;
  opacity:.46 !important;
  color:var(--accent);
  font-size:9px;
  font-weight:700;
  line-height:1.6;
  letter-spacing:.16em;
  text-transform:uppercase;
  writing-mode:vertical-rl;
  text-orientation:mixed;
  pointer-events:none;
}

.gallery-grid > a:nth-child(even):before{
  left:auto;
  right:18px;
  bottom:18px;
  transform:rotate(180deg) !important;
}

.gallery-grid > a img,
.gallery-grid > a.is-exact img{
  position:relative;
  z-index:1;
}

.gallery-grid > a:after{
  z-index:3;
}

@media(max-width:820px){
  .gallery-grid > a{
    background-image:none;
  }

  .gallery-grid > a:before{
    display:none;
  }
}


/* =========================================================
   GALLERY: EDITORIAL COLLAGE
   Один горизонтальный кадр автоматически становится главным.
========================================================= */
.gallery-editorial{
  display:grid;
  grid-template-columns:minmax(0,1.62fr) minmax(320px,.88fr);
  grid-template-rows:repeat(2,minmax(260px,1fr));
  gap:18px;
  min-height:720px;
  width:100%;
}

.gallery-editorial__item{
  position:relative;
  display:block;
  min-width:0;
  min-height:0;
  overflow:hidden;
  background:color-mix(in srgb,var(--paper) 88%,var(--soft));
  border:1px solid color-mix(in srgb,var(--ink) 12%,transparent);
  isolation:isolate;
}

.gallery-editorial__item.is-featured{
  grid-column:1;
  grid-row:1 / span 2;
}

.gallery-editorial__item:not(.is-featured):nth-of-type(2),
.gallery-editorial__item:not(.is-featured):nth-of-type(3){
  grid-column:2;
}

.gallery-editorial__item img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  transition:transform .55s cubic-bezier(.22,.61,.36,1);
}

.gallery-editorial__item.is-portrait:not(.is-featured) img{
  object-position:center 34%;
}

.gallery-editorial__item:hover img{
  transform:scale(1.025);
}

.gallery-editorial__item:before{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  background:linear-gradient(180deg,transparent 68%,rgba(20,14,12,.22));
  pointer-events:none;
}

.gallery-editorial__number{
  position:absolute;
  right:14px;
  bottom:13px;
  z-index:2;
  min-width:38px;
  padding:8px 9px;
  background:color-mix(in srgb,var(--paper) 90%,transparent);
  color:var(--ink);
  font-size:10px;
  font-weight:700;
  line-height:1;
  letter-spacing:.16em;
  text-align:center;
  backdrop-filter:blur(8px);
}

.gallery-editorial__item:nth-child(n+4){
  display:none;
}

.gallery-editorial.is-single{
  display:block;
  min-height:0;
}
.gallery-editorial.is-single .gallery-editorial__item{
  display:block;
  aspect-ratio:16/9;
}

.gallery-editorial.is-two{
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:minmax(520px,68vh);
  min-height:0;
}
.gallery-editorial.is-two .gallery-editorial__item,
.gallery-editorial.is-two .gallery-editorial__item.is-featured{
  grid-column:auto;
  grid-row:auto;
}

@media(max-width:1000px){
  .gallery-editorial{
    grid-template-columns:minmax(0,1.25fr) minmax(260px,.75fr);
    min-height:620px;
  }
}

@media(max-width:760px){
  .gallery-editorial,
  .gallery-editorial.is-two{
    display:grid;
    grid-template-columns:1fr;
    grid-template-rows:none;
    min-height:0;
    gap:12px;
  }
  .gallery-editorial__item,
  .gallery-editorial__item.is-featured,
  .gallery-editorial.is-two .gallery-editorial__item,
  .gallery-editorial.is-two .gallery-editorial__item.is-featured{
    grid-column:auto;
    grid-row:auto;
    height:auto;
    aspect-ratio:4/5;
  }
  .gallery-editorial__item.is-landscape{
    aspect-ratio:16/10;
  }
  .gallery-editorial__item:nth-child(n+4){
    display:block;
  }
}


/* =========================================================
   GALLERY: COMPACT STAGGERED CARDS
   Компактная композиция под вертикальные и горизонтальные фото.
========================================================= */
.gallery-section{
  padding-top:78px;
  padding-bottom:82px;
}

.gallery-section .section-head{
  margin-bottom:34px;
}

.gallery-editorial{
  display:grid !important;
  grid-template-columns:minmax(0,1.08fr) minmax(0,.82fr) minmax(0,.82fr) !important;
  grid-template-rows:none !important;
  gap:24px !important;
  align-items:start !important;
  width:min(1220px,100%) !important;
  min-height:0 !important;
  margin:0 auto !important;
}

.gallery-editorial__item,
.gallery-editorial__item.is-featured,
.gallery-editorial.is-two .gallery-editorial__item,
.gallery-editorial.is-two .gallery-editorial__item.is-featured{
  display:block !important;
  grid-column:auto !important;
  grid-row:auto !important;
  position:relative;
  min-width:0;
  min-height:0 !important;
  height:auto !important;
  aspect-ratio:auto !important;
  overflow:visible !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  isolation:isolate;
}

.gallery-editorial__item:nth-child(1){
  margin-top:22px;
}
.gallery-editorial__item:nth-child(2){
  margin-top:70px;
}
.gallery-editorial__item:nth-child(3){
  margin-top:0;
}

.gallery-editorial__item:nth-child(n+4){
  display:none !important;
}

.gallery-editorial__item:before{
  content:"";
  position:absolute;
  inset:10px -10px -10px 10px;
  z-index:-1;
  background:color-mix(in srgb,var(--accent) 8%,var(--paper));
  border:1px solid color-mix(in srgb,var(--accent) 14%,transparent);
  pointer-events:none;
}

.gallery-editorial__item:after{
  content:none !important;
}

.gallery-editorial__item img,
.gallery-editorial__item.is-featured img,
.gallery-editorial__item.is-exact img{
  display:block;
  width:100%;
  height:auto !important;
  min-height:0 !important;
  max-height:460px;
  object-fit:cover;
  object-position:center;
  border:1px solid color-mix(in srgb,var(--ink) 10%,transparent);
  background:var(--paper);
  box-shadow:0 18px 42px rgba(34,24,21,.09);
  transition:transform .35s ease,box-shadow .35s ease;
}

.gallery-editorial__item.is-landscape img{
  aspect-ratio:4/3;
  max-height:330px;
}

.gallery-editorial__item.is-square img{
  aspect-ratio:1/1;
  max-height:390px;
}

.gallery-editorial__item.is-portrait img{
  aspect-ratio:3/4;
  max-height:460px;
}

.gallery-editorial__item:hover img{
  transform:translateY(-5px);
  box-shadow:0 24px 52px rgba(34,24,21,.13);
}

.gallery-editorial__number{
  right:10px;
  bottom:10px;
  min-width:36px;
  padding:7px 8px;
  background:color-mix(in srgb,var(--paper) 92%,transparent);
  border:1px solid color-mix(in srgb,var(--ink) 10%,transparent);
  color:var(--ink);
  font-size:9px;
  letter-spacing:.16em;
  backdrop-filter:blur(8px);
}

.gallery-editorial.is-single{
  display:block !important;
  width:min(620px,100%) !important;
}
.gallery-editorial.is-single .gallery-editorial__item{
  margin:0 !important;
}
.gallery-editorial.is-single .gallery-editorial__item img{
  max-height:520px;
}

.gallery-editorial.is-two{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  width:min(920px,100%) !important;
}
.gallery-editorial.is-two .gallery-editorial__item:nth-child(1){margin-top:18px}
.gallery-editorial.is-two .gallery-editorial__item:nth-child(2){margin-top:56px}

@media(max-width:980px){
  .gallery-editorial{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:16px !important;
  }
  .gallery-editorial__item:nth-child(1){margin-top:14px}
  .gallery-editorial__item:nth-child(2){margin-top:42px}
  .gallery-editorial__item img,
  .gallery-editorial__item.is-portrait img{
    max-height:390px;
  }
}

@media(max-width:700px){
  .gallery-section{
    padding-top:64px;
    padding-bottom:64px;
  }
  .gallery-editorial,
  .gallery-editorial.is-two{
    grid-template-columns:1fr !important;
    gap:18px !important;
    width:100% !important;
  }
  .gallery-editorial__item,
  .gallery-editorial__item:nth-child(1),
  .gallery-editorial__item:nth-child(2),
  .gallery-editorial__item:nth-child(3),
  .gallery-editorial.is-two .gallery-editorial__item:nth-child(1),
  .gallery-editorial.is-two .gallery-editorial__item:nth-child(2){
    margin-top:0 !important;
  }
  .gallery-editorial__item:nth-child(n+4){
    display:block !important;
  }
  .gallery-editorial__item img,
  .gallery-editorial__item.is-landscape img,
  .gallery-editorial__item.is-square img,
  .gallery-editorial__item.is-portrait img{
    width:100%;
    height:auto !important;
    max-height:520px;
    aspect-ratio:auto;
    object-fit:contain;
  }
  .gallery-editorial__item:before{
    inset:7px -7px -7px 7px;
  }
}


/* =========================================================
   GALLERY: FINAL HEIGHT 660PX
========================================================= */
@media(min-width:981px){
  .gallery-editorial{
    height:660px !important;
    min-height:660px !important;
    align-items:start !important;
  }

  .gallery-editorial__item:nth-child(1){
    margin-top:22px !important;
  }

  .gallery-editorial__item:nth-child(2){
    margin-top:72px !important;
  }

  .gallery-editorial__item:nth-child(3){
    margin-top:0 !important;
  }

  .gallery-editorial__item:nth-child(1) img{
    height:590px !important;
    max-height:none !important;
    aspect-ratio:auto !important;
    object-fit:cover;
  }

  .gallery-editorial__item:nth-child(2) img{
    height:535px !important;
    max-height:none !important;
    aspect-ratio:auto !important;
    object-fit:cover;
  }

  .gallery-editorial__item:nth-child(3) img{
    height:610px !important;
    max-height:none !important;
    aspect-ratio:auto !important;
    object-fit:cover;
  }
}


/* =========================================================
   CONTACTS — PISMO O GLAVNOM
   Override for /views/blocks/contacts.php
========================================================= */

.contacts-stage{
  padding:0 !important;
  background:var(--bg);
  border-top:1px solid color-mix(in srgb,var(--ink) 12%,transparent);
}

.contacts-stage .ivi-contacts{
  --ivi-contacts-bg:var(--bg);
  --ivi-contacts-card:var(--paper);
  --ivi-contacts-text:var(--ink);
  --ivi-contacts-muted:color-mix(in srgb,var(--ink) 62%,transparent);
  --ivi-contacts-accent:var(--accent);
  --ivi-contacts-line:color-mix(in srgb,var(--ink) 14%,transparent);

  padding:clamp(76px,8vw,118px) 5vw !important;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb,var(--accent2) 10%,transparent),
      transparent 34%
    ),
    var(--bg) !important;
}

.contacts-stage .ivi-contacts::before{
  content:"";
  position:absolute;
  inset:28px;
  border:1px dashed color-mix(in srgb,var(--accent) 22%,transparent);
  pointer-events:none;
}

.contacts-stage .ivi-contacts__inner{
  width:min(1320px,100%) !important;
}

.contacts-stage .ivi-contacts__head{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);
  gap:52px;
  align-items:end;
  max-width:none !important;
  margin:0 0 54px !important;
  text-align:left !important;
}

.contacts-stage .ivi-contacts__kicker{
  grid-column:1;
  margin:0 0 12px !important;
  color:var(--accent) !important;
  font:700 11px/1.25 Arial,sans-serif !important;
  letter-spacing:.2em !important;
}

.contacts-stage .ivi-contacts__title{
  grid-column:1;
  margin:0 !important;
  max-width:780px;
  color:var(--ink) !important;
  font-family:Georgia,"Times New Roman",serif !important;
  font-size:clamp(54px,7vw,102px) !important;
  font-weight:500 !important;
  line-height:.92 !important;
  letter-spacing:-.055em !important;
}

.contacts-stage .ivi-contacts__text{
  grid-column:2;
  grid-row:1 / span 2;
  align-self:end;
  max-width:520px !important;
  margin:0 !important;
  padding:24px 0 4px 28px;
  border-left:2px solid color-mix(in srgb,var(--accent) 44%,transparent);
  color:var(--ink) !important;
  font:italic 500 clamp(19px,1.8vw,27px)/1.55 Georgia,serif !important;
  opacity:.9;
}

.contacts-stage .ivi-contacts__grid{
  grid-template-columns:repeat(var(--ivi-contacts-count,1),minmax(0,1fr)) !important;
  gap:20px !important;
}

.contacts-stage .ivi-contact{
  position:relative;
  min-height:390px;
  align-items:flex-start !important;
  padding:38px 34px 32px !important;
  text-align:left !important;
  background:var(--paper) !important;
  border:1px solid color-mix(in srgb,var(--ink) 14%,transparent) !important;
  border-radius:0 !important;
  box-shadow:10px 12px 0 color-mix(in srgb,var(--accent) 10%,transparent) !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  overflow:hidden;
}

.contacts-stage .ivi-contact::before{
  content:"";
  position:absolute;
  inset:14px;
  border:1px dashed color-mix(in srgb,var(--accent) 26%,transparent);
  pointer-events:none;
}

.contacts-stage .ivi-contact::after{
  content:"CARTE POSTALE";
  position:absolute;
  right:20px;
  top:22px;
  color:var(--accent);
  font:700 9px/1 Arial,sans-serif;
  letter-spacing:.18em;
  writing-mode:vertical-rl;
  opacity:.55;
}

.contacts-stage .ivi-contact__avatar{
  position:relative;
  z-index:1;
  width:76px !important;
  height:76px !important;
  margin:0 0 28px !important;
  color:var(--accent) !important;
  background:color-mix(in srgb,var(--accent) 8%,transparent) !important;
  border:1px solid color-mix(in srgb,var(--accent) 35%,transparent) !important;
  border-radius:50% !important;
}

.contacts-stage .ivi-contact__avatar svg{
  width:32px !important;
  height:32px !important;
  stroke-width:1.5 !important;
}

.contacts-stage .ivi-contact__name{
  position:relative;
  z-index:1;
  margin:0 !important;
  padding-right:24px;
  color:var(--ink) !important;
  font-family:Georgia,"Times New Roman",serif !important;
  font-size:clamp(34px,3.4vw,48px) !important;
  font-weight:500 !important;
  line-height:1 !important;
  letter-spacing:-.035em;
}

.contacts-stage .ivi-contact__role{
  position:relative;
  z-index:1;
  margin:10px 0 0 !important;
  color:var(--accent) !important;
  font:700 11px/1.4 Arial,sans-serif !important;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.contacts-stage .ivi-contact__phone{
  position:relative;
  z-index:1;
  margin:28px 0 0 !important;
  color:var(--ink) !important;
  font:500 clamp(17px,1.8vw,22px)/1.3 Georgia,serif !important;
  text-decoration:none !important;
}

.contacts-stage .ivi-contact__phone:hover{
  color:var(--accent) !important;
}

.contacts-stage .ivi-contact__actions{
  position:relative;
  z-index:1;
  justify-content:flex-start !important;
  gap:9px !important;
  width:100%;
  margin-top:auto !important;
  padding-top:30px !important;
}

.contacts-stage .ivi-contact__action{
  min-height:44px !important;
  padding:11px 15px !important;
  color:var(--ink) !important;
  background:transparent !important;
  border:1px solid color-mix(in srgb,var(--ink) 16%,transparent) !important;
  border-radius:0 !important;
  font:700 11px/1 Arial,sans-serif !important;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.contacts-stage .ivi-contact__action:hover{
  transform:translateY(-2px) !important;
  color:#fff !important;
  border-color:var(--accent) !important;
  background:var(--accent) !important;
}

.contacts-stage .ivi-contact__action svg{
  width:15px !important;
  height:15px !important;
}

@media(max-width:980px){
  .contacts-stage .ivi-contacts__head{
    grid-template-columns:1fr;
    gap:24px;
  }

  .contacts-stage .ivi-contacts__text{
    grid-column:1;
    grid-row:auto;
    max-width:720px !important;
  }

  .contacts-stage .ivi-contacts__grid{
    grid-template-columns:1fr !important;
  }

  .contacts-stage .ivi-contact{
    width:100% !important;
    max-width:none !important;
    min-height:340px;
    margin:0 !important;
  }
}

@media(max-width:700px){
  .contacts-stage .ivi-contacts{
    padding:68px 20px !important;
  }

  .contacts-stage .ivi-contacts::before{
    inset:14px;
  }

  .contacts-stage .ivi-contacts__head{
    margin-bottom:34px !important;
  }

  .contacts-stage .ivi-contacts__title{
    font-size:clamp(46px,15vw,68px) !important;
  }

  .contacts-stage .ivi-contacts__text{
    padding:18px 0 0 !important;
    border-left:0 !important;
    border-top:1px solid color-mix(in srgb,var(--accent) 35%,transparent);
    font-size:19px !important;
  }

  .contacts-stage .ivi-contact{
    min-height:0;
    padding:32px 26px 28px !important;
  }

  .contacts-stage .ivi-contact__actions{
    display:grid !important;
    grid-template-columns:1fr 1fr;
  }

  .contacts-stage .ivi-contact__action{
    width:100%;
  }
}


/* =========================================================
   DETAILS — PISMO O GLAVNOM
   Override for /views/blocks/details.php
========================================================= */

.details-stage{
  padding:0 !important;
  background:var(--bg);
  border-top:1px solid color-mix(in srgb,var(--ink) 12%,transparent);
}

.details-stage .ivi-details{
  position:relative;
  width:100%;
  padding:clamp(78px,8vw,120px) 5vw;
  color:var(--ink);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb,var(--accent2) 10%,transparent),
      transparent 32%
    ),
    var(--bg);
  overflow:hidden;
}

.details-stage .ivi-details::before{
  content:"";
  position:absolute;
  inset:28px;
  border:1px dashed color-mix(in srgb,var(--accent) 22%,transparent);
  pointer-events:none;
}

.details-stage .ivi-details__inner{
  position:relative;
  z-index:1;
  width:min(1320px,100%);
  margin:0 auto;
}

.details-stage .ivi-details__head{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);
  gap:52px;
  align-items:end;
  margin-bottom:56px;
}

.details-stage .ivi-details__kicker{
  grid-column:1;
  margin:0 0 12px;
  color:var(--accent);
  font:700 11px/1.25 Arial,sans-serif;
  letter-spacing:.2em;
  text-transform:uppercase;
}

.details-stage .ivi-details__title{
  grid-column:1;
  margin:0;
  max-width:800px;
  color:var(--ink);
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(54px,7vw,102px);
  font-weight:500;
  line-height:.92;
  letter-spacing:-.055em;
}

.details-stage .ivi-details__text{
  grid-column:2;
  grid-row:1 / span 2;
  align-self:end;
  margin:0;
  max-width:520px;
  padding:24px 0 4px 28px;
  border-left:2px solid color-mix(in srgb,var(--accent) 42%,transparent);
  color:color-mix(in srgb,var(--ink) 82%,transparent);
  font:italic 500 clamp(19px,1.8vw,27px)/1.55 Georgia,serif;
}

.details-stage .ivi-details__grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px;
  align-items:stretch;
}

.details-stage .ivi-detail{
  position:relative;
  min-height:300px;
  padding:42px 34px 34px;
  background:var(--paper);
  border:1px solid color-mix(in srgb,var(--ink) 14%,transparent);
  box-shadow:10px 12px 0 color-mix(in srgb,var(--accent) 10%,transparent);
  overflow:hidden;
}

.details-stage .ivi-detail:nth-child(2n){
  transform:translateY(22px);
}

.details-stage .ivi-detail:nth-child(3n){
  transform:translateY(-10px);
}

.details-stage .ivi-detail::before{
  content:"";
  position:absolute;
  inset:14px;
  border:1px dashed color-mix(in srgb,var(--accent) 24%,transparent);
  pointer-events:none;
}

.details-stage .ivi-detail::after{
  content:"";
  position:absolute;
  right:-34px;
  top:-34px;
  width:120px;
  height:120px;
  border:1px solid color-mix(in srgb,var(--accent) 22%,transparent);
  border-radius:50%;
}

.details-stage .ivi-detail__number{
  position:relative;
  z-index:1;
  margin-bottom:38px;
  color:var(--accent);
  font:700 12px/1 Arial,sans-serif;
  letter-spacing:.22em;
}

.details-stage .ivi-detail__number::after{
  content:"";
  display:block;
  width:46px;
  height:1px;
  margin-top:12px;
  background:color-mix(in srgb,var(--accent) 42%,transparent);
}

.details-stage .ivi-detail__title{
  position:relative;
  z-index:1;
  margin:0 0 16px;
  color:var(--ink);
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(30px,3vw,44px);
  font-weight:500;
  line-height:1.02;
  letter-spacing:-.035em;
}

.details-stage .ivi-detail__text{
  position:relative;
  z-index:1;
  margin:0;
  color:color-mix(in srgb,var(--ink) 72%,transparent);
  font-size:15px;
  line-height:1.72;
}

@media(max-width:1000px){
  .details-stage .ivi-details__head{
    grid-template-columns:1fr;
    gap:24px;
  }

  .details-stage .ivi-details__text{
    grid-column:1;
    grid-row:auto;
    max-width:720px;
  }

  .details-stage .ivi-details__grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .details-stage .ivi-detail,
  .details-stage .ivi-detail:nth-child(2n),
  .details-stage .ivi-detail:nth-child(3n){
    transform:none;
  }
}

@media(max-width:700px){
  .details-stage .ivi-details{
    padding:68px 20px;
  }

  .details-stage .ivi-details::before{
    inset:14px;
  }

  .details-stage .ivi-details__head{
    margin-bottom:34px;
  }

  .details-stage .ivi-details__title{
    font-size:clamp(46px,15vw,68px);
  }

  .details-stage .ivi-details__text{
    padding:18px 0 0;
    border-left:0;
    border-top:1px solid color-mix(in srgb,var(--accent) 34%,transparent);
    font-size:19px;
  }

  .details-stage .ivi-details__grid{
    grid-template-columns:1fr;
  }

  .details-stage .ivi-detail{
    min-height:0;
    padding:34px 28px 30px;
  }

  .details-stage .ivi-detail__number{
    margin-bottom:28px;
  }
}


/* =========================================================
   STORY TEXT — REFINED
========================================================= */

/* Базовый текст цитаты: легче, меньше, аккуратнее */
.story-section .story-quote blockquote{
  margin:0;
  max-width:760px;
  color:var(--ink);
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(24px,2.15vw,36px) !important;
  font-style:italic;
  font-weight:400 !important;
  line-height:1.48 !important;
  letter-spacing:-.018em;
  text-wrap:pretty;
}

/* Подпись пары */
.story-section .story-sign{
  margin-top:28px !important;
  padding-top:18px !important;
  border-top:1px solid color-mix(in srgb,var(--ink) 16%,transparent);
  color:var(--accent);
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(20px,1.8vw,27px) !important;
  font-style:italic;
  font-weight:400 !important;
  line-height:1.35;
}

/* С фото: даём тексту нормальную ширину и не зажимаем колонку */
.story-section .story-postcard--quote.has-photo{
  grid-template-columns:minmax(0,.92fr) minmax(420px,1.08fr) !important;
}

.story-section .story-postcard--quote.has-photo .story-letter{
  padding:64px 56px 54px !important;
  align-items:flex-start;
  justify-content:center;
}

.story-section .story-postcard--quote.has-photo .story-quote__mark{
  font-size:118px !important;
  top:18px !important;
  left:34px !important;
  opacity:.34 !important;
}

/* Без фото: текст остаётся центральным, но не огромным */
.story-section .story-postcard--quote.no-photo blockquote{
  max-width:880px;
  font-size:clamp(24px,2.25vw,38px) !important;
  line-height:1.5 !important;
}

/* Планшет */
@media(max-width:980px){
  .story-section .story-postcard--quote.has-photo{
    grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr) !important;
  }

  .story-section .story-postcard--quote.has-photo .story-letter{
    padding:48px 34px 42px !important;
  }

  .story-section .story-quote blockquote{
    font-size:clamp(22px,3vw,30px) !important;
    line-height:1.5 !important;
  }
}

/* Телефон: фото сверху, текст снизу на всю ширину */
@media(max-width:700px){
  .story-section .story-postcard--quote.has-photo{
    display:grid !important;
    grid-template-columns:1fr !important;
    height:auto !important;
    min-height:0 !important;
  }

  .story-section .story-postcard--quote.has-photo img{
    grid-row:1;
    width:100%;
    height:320px !important;
    object-fit:cover;
    object-position:center;
  }

  .story-section .story-postcard--quote.has-photo .story-letter{
    grid-row:2;
    width:100%;
    min-width:0;
    padding:44px 24px 38px !important;
  }

  .story-section .story-quote blockquote{
    width:100%;
    max-width:none;
    font-size:22px !important;
    line-height:1.55 !important;
    letter-spacing:-.01em;
  }

  .story-section .story-sign{
    width:100%;
    margin-top:24px !important;
    font-size:20px !important;
  }

  .story-section .story-postcard--quote.no-photo .story-quote{
    padding:64px 24px 46px !important;
  }

  .story-section .story-postcard--quote.no-photo blockquote{
    font-size:22px !important;
    line-height:1.55 !important;
  }

  .story-section .story-quote__mark{
    font-size:92px !important;
    top:10px !important;
    left:22px !important;
  }
}
