/* Страница home-v1. Токены, сброс, кнопки и ссылки — в css/base.css */

.hero{min-height:880px;background:var(--sand);color:var(--cream);overflow:hidden}
.hero-inner{position:relative;width:min(var(--container) + 2 * var(--gutter),100%);height:880px;margin:0 auto;padding:0 var(--gutter)}
.site-nav{position:relative;z-index:8;display:flex;align-items:center;justify-content:space-between;height:94px}
.brand{display:flex;position:relative;flex-direction:column;align-items:flex-start;min-width:190px;padding-bottom:var(--space-5)}
.brand-name{font-size:38px;font-weight:600;letter-spacing:-2.4px;line-height:.9}
.brand-name span{color:var(--yellow)}
.brand-caption{position:absolute;bottom:0;left:1px;font-size:var(--fs-caption);letter-spacing:1.4px;line-height:1.2}
.primary-nav{display:flex;align-items:center;gap:var(--space-6);margin-left:var(--space-10);font-size:var(--fs-body)}
.primary-nav a{padding:var(--space-3) 0;border-bottom:1px solid transparent;transition:border-color 180ms ease,color 180ms ease}
.primary-nav a:hover{border-color:currentColor;color:var(--yellow)}

.hero-word{position:absolute;z-index:1;top:74px;left:50%;width:100vw;transform:translateX(-50%);overflow:hidden;color:var(--cream);font-family:var(--font-display);font-size:410px;font-weight:300;letter-spacing:20px;line-height:1;text-align:center;white-space:nowrap;pointer-events:none}
.hero-copy{position:absolute;z-index:5;top:438px;left:var(--gutter);width:352px}
.eyebrow,.section-kicker{font-size:var(--fs-caption);letter-spacing:1.2px;line-height:1.4}
.hero-copy h1{margin-top:var(--space-4);font-family:var(--font-serif);font-size:45px;letter-spacing:-1.8px;line-height:1}
.hero-copy h1 em,.story h2 em,.contacts h2 em,.booking-dialog h2 em{font-style:italic;color:var(--yellow)}
/* Dialogs sit on --paper: accent must be the light-surface one, not yellow. */
.booking-dialog h2 em,.dish-dialog h2 em{color:var(--olive-soft)}
.hero-description{max-width:300px;margin-top:var(--space-5);font-size:var(--fs-body);line-height:1.6;color:rgba(255,253,242,.8);text-wrap:pretty}
.menu-cta{margin-top:var(--space-5)}

.hero-scene{position:absolute;z-index:2;top:236px;left:18%;width:73%;height:570px;pointer-events:none}
.hero-scene img{width:100%;height:100%;object-fit:contain;object-position:center bottom}
.hero-card{position:absolute;z-index:6;top:486px;right:var(--gutter);display:flex;flex-direction:column;align-items:center;width:132px;padding:var(--space-1) var(--space-1) var(--space-3);background:var(--cream);color:var(--ink);text-align:center;box-shadow:0 11px 24px rgba(67,49,27,.08);border-radius:var(--radius)}
.hero-card img{width:122px;height:85px;border-radius:var(--radius-sm);object-fit:cover}
.hero-card p{margin-top:var(--space-3);font-size:var(--fs-caption);letter-spacing:.2px;line-height:1.35}
.hero-card strong{font-weight:600}
.hero-card-line{display:block;width:38px;height:1px;margin-top:var(--space-3);background:var(--olive);transform:rotate(-20deg)}
.hero-bottom{position:absolute;z-index:6;right:var(--gutter);bottom:27px;left:var(--gutter);display:flex;align-items:flex-end;justify-content:space-between}
.hero-address{font-size:var(--fs-body);letter-spacing:.8px;line-height:1.7;text-wrap:pretty}
.hero-summary{text-align:center;font-size:var(--fs-body);line-height:1.7;text-wrap:pretty}

.story{padding-block:var(--section-y)}
.story-intro{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,360px);gap:var(--space-8);align-items:start}
.story-title-wrap .section-kicker{color:var(--olive)}
.story-intro h2,.menu-preview h2,.contacts h2{font-family:var(--font-serif);font-size:52px;letter-spacing:-2.2px;line-height:1.08}
.story-intro h2{max-width:720px;margin-top:var(--space-5)}
.story-intro h2 em{color:var(--olive-soft)}
.story-intro-side{padding-top:var(--space-1)}
.story-intro-side>p{color:var(--muted);font-size:var(--fs-body);line-height:1.65;text-wrap:pretty}
.story-link{margin-top:var(--space-5)}

.story-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));height:640px;gap:var(--grid-gap);margin-top:var(--head-gap)}
.story-feature-card,.story-card{position:relative;min-width:0;overflow:hidden;border-radius:var(--radius)}

/* Колонка 1: фото + крупная цифра */
.story-feature-card{margin:0;background:var(--dark);color:var(--cream)}
.story-feature-card img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center bottom;transition:transform 420ms ease}
.story-feature-card:hover img{transform:scale(1.04)}
.story-feature-card::after{position:absolute;inset:0;background:linear-gradient(180deg,rgba(28,32,25,.9) 0%,rgba(28,32,25,.55) 34%,transparent 58%,rgba(28,32,25,.35) 100%);content:''}
.story-hours{position:relative;z-index:1;padding:var(--space-5)}
.story-hours-bar{position:relative;width:100%;height:1px;margin-top:var(--space-1);background:rgba(255,253,242,.38)}
.story-hours-bar::before{position:absolute;top:0;left:0;width:var(--hours-progress,0%);height:1px;background:var(--yellow);content:'';transition:width 240ms ease}
.story-hours-bar span{position:absolute;top:50%;left:var(--hours-progress,0%);width:7px;height:7px;border-radius:50%;background:var(--yellow);transform:translate(-50%,-50%);transition:left 240ms ease}
.story-hours-value{margin-top:var(--space-6);font-family:var(--font-serif);font-size:84px;font-variant-numeric:tabular-nums;letter-spacing:-3.5px;line-height:.95}
.story-hours-label{margin-top:var(--space-3);color:rgba(255,253,242,.85);font-size:var(--fs-body)}
.story-feature-card figcaption{position:absolute;z-index:1;inset:0;pointer-events:none}
.story-tag{position:absolute;padding-bottom:var(--space-1);border-bottom:1px solid rgba(255,253,242,.55);font-size:11px;letter-spacing:1px;line-height:1.2}
.story-tag--one{bottom:24px;left:24px}
.story-tag--two{right:24px;bottom:72px}
.story-note{position:absolute;z-index:2;right:26px;bottom:26px;color:var(--yellow);font-family:var(--font-serif);font-size:25px;font-style:italic;line-height:1;transform:rotate(-8deg);text-shadow:0 2px 14px rgba(35,39,28,.35)}

/* Колонка 2: большая песочная карточка + светлая */
.story-point-stack{display:grid;grid-template-rows:minmax(0,1.9fr) minmax(0,1fr);gap:var(--grid-gap);min-width:0}
.story-card{display:flex;flex-direction:column;align-items:flex-start;padding:var(--space-6)}
.story-card-label{color:var(--terracotta);font-size:var(--fs-caption);letter-spacing:1px;line-height:1.4}
.story-card h3{margin-top:var(--space-4);font-size:var(--fs-h3);font-weight:600;letter-spacing:-.5px;line-height:1.2}
.story-card p{max-width:340px;margin-top:auto;color:var(--muted);font-size:var(--fs-body);line-height:1.6;text-wrap:pretty}
/* угловая «вырубка» с квадратом, как в референсе */
.story-card--sand{background:var(--sand-soft);color:var(--dark)}
.story-card--sand h3{max-width:340px;margin-top:var(--space-6);font-family:var(--font-serif);font-size:44px;font-weight:400;letter-spacing:-1.8px;line-height:1.06}
.story-card--sand p{color:rgba(48,56,43,.75)}
.story-card--paper{border:1px solid rgba(51,55,43,.12);background:var(--cream);color:var(--ink)}
.story-card--paper h3{margin-top:var(--space-4)}
.story-card--paper p{margin-top:var(--space-2);font-size:15px}

/* Колонка 3: тёмная фото-карточка */
.story-card--image{padding:0;background:var(--dark);color:var(--cream)}
.story-card--image>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;opacity:.62;transition:transform 420ms ease,opacity 420ms ease}
.story-card--image:hover>img{opacity:.72;transform:scale(1.04)}
.story-card--image::after{position:absolute;inset:0;background:linear-gradient(180deg,rgba(28,32,25,.88) 0%,rgba(28,32,25,.5) 55%,rgba(28,32,25,.82));content:''}
.story-image-card-content{position:relative;z-index:1;display:flex;flex-direction:column;align-items:flex-start;height:100%;padding:var(--space-6)}
.story-image-card-content .story-card-label{color:rgba(255,253,242,.7)}
.story-image-card-content h3{max-width:260px;margin-top:var(--space-4);color:var(--yellow);font-family:var(--font-serif);font-size:38px;font-weight:400;letter-spacing:-1.4px;line-height:1.08}
.story-points{display:grid;gap:var(--space-5);max-width:280px;margin:var(--space-7) 0 0}
.story-points dt{color:var(--yellow);font-size:17px;font-weight:600}
.story-points dd{margin:var(--space-2) 0 0;color:rgba(255,253,242,.8);font-size:15px;line-height:1.55;text-wrap:pretty}
.story-book{margin-top:auto}

.menu-preview{padding-block:var(--section-y);background:var(--stone)}
.menu-preview-inner{margin-inline:auto}
.menu-preview-inner{display:flex;align-items:flex-end;justify-content:space-between}
.menu-preview h2{margin-top:var(--space-4)}

.contacts{display:flex;align-items:center;justify-content:space-between;min-height:315px;margin:var(--section-y) auto var(--space-8);padding:var(--space-7);border-radius:var(--radius);background:var(--yellow)}
.contacts h2{margin-top:var(--space-4);font-size:49px}
.contacts h2 em{color:var(--olive)}
.site-footer{display:flex;justify-content:space-between;margin:0 auto;padding:var(--space-6) 0 var(--space-5);border-top:1px solid var(--line);color:var(--muted);font-size:var(--fs-caption)}

dialog{border:0;border-radius:var(--radius);background:var(--paper);color:var(--ink);box-shadow:var(--shadow-lg)}
dialog::backdrop{background:rgba(35,39,28,.68)}
.booking-dialog{position:relative;width:min(540px,calc(100% - 40px));padding:var(--space-7)}
.dialog-close{position:absolute;top:14px;right:14px;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:var(--radius-pill);background:transparent;font-size:26px;line-height:1;transition:background 180ms ease,transform 180ms ease}
.dialog-close:hover{background:#e8e4d8}
.dialog-close:active{transform:scale(.96)}
.booking-dialog h2{margin-top:var(--space-4);font-family:var(--font-serif);font-size:37px;letter-spacing:-1.2px;line-height:1.13}
.booking-dialog>p:not(.section-kicker){margin-top:var(--space-5);color:var(--muted);font-size:var(--fs-body);line-height:1.65}
.dialog-phone{margin-top:var(--space-6)}
.dialog-link{margin-top:var(--space-5)}

@media (max-width:1050px){
  .primary-nav{gap:var(--space-5);margin-left:var(--space-6)}
  .hero-summary{margin-left:var(--space-8)}
  .story-intro{gap:var(--space-7)}
  .story-intro h2{font-size:45px}
  .story-grid{grid-template-columns:repeat(2,minmax(0,1fr));height:auto;grid-auto-rows:auto;}
  .story-feature-card{min-height:560px}
  .story-point-stack{grid-template-rows:auto auto}
  .story-card--sand{min-height:360px}
  .story-card--paper{min-height:180px}
  .story-card--image{grid-column:1 / -1;min-height:460px}
}

@media (max-width:760px){
  .hero{min-height:760px}
  .hero-inner{height:760px}
  .site-nav{height:80px}
  .brand{min-width:auto}
  .brand-name{font-size:31px}
  .primary-nav{display:none}
  .hero-word{top:125px;font-size:170px;letter-spacing:5px;text-align:left}
  .hero-copy{top:390px;width:260px}
  .hero-copy h1{font-size:34px}
  .hero-description{font-size:var(--fs-body)}
  .hero-scene{top:196px;left:7%;width:92%;height:420px}
  .hero-card{top:468px;width:108px}
  .hero-card img{width:98px;height:65px}
  .hero-card p{font-size:var(--fs-caption)}
  .hero-bottom{bottom:18px;align-items:flex-start}
  .hero-summary{display:none}
  .story{display:block}
  .story-intro{display:block}
  .story-intro h2,.menu-preview h2{font-size:34px;letter-spacing:-1.4px}
  .story-intro-side{margin-top:var(--space-5);padding-top:0}
  .story-grid{grid-template-columns:1fr;gap:var(--grid-gap)}
  .story-point-stack{gap:var(--grid-gap)}
  .story-feature-card{min-height:480px}
  .story-hours-value{font-size:64px}
  .story-card{padding:var(--space-5)}
  .story-card--sand{min-height:320px}
  .story-card--sand h3{font-size:36px}
  .story-card--image{grid-column:auto;min-height:520px}
  .story-image-card-content{padding:var(--space-5)}
  .story-image-card-content h3{font-size:32px}
  .menu-preview-inner{display:block}
  .menu-preview-inner .link-arrow{margin-top:var(--space-5)}
  .contacts{display:block;min-height:0;padding:var(--space-6) var(--space-5)}
  .contacts h2{font-size:39px}
  .contacts .btn{margin-top:var(--space-6)}
  .site-footer{font-size:var(--fs-caption)}
}

/* Fit the big word to the content column: ink edges of «Г» and «О» line up with
   the logo and the booking button. 3.037em = ink width of ГРЕКО incl. letter-spacing,
   .07em = left side bearing of «Г» (Manrope 300). */
@media (min-width:761px){
  .hero-inner{container-type:inline-size}
  .hero-word{left:var(--gutter);width:auto;margin-left:calc(100cqw / 3.037 * -.07);transform:none;overflow:visible;font-size:calc(100cqw / 3.037);letter-spacing:.0488em;text-align:left}
  /* Text block starts a fixed gap below the word's baseline (.8822em from its top). */
  .hero-copy{top:calc(74px + 100cqw / 3.037 * .8822 + var(--space-7));width:260px}
  .hero-description{max-width:200px}
  .hero-copy h1{margin-top:var(--space-5)}
  .hero-description{margin-top:var(--space-5)}
  .menu-cta{margin-top:var(--space-6)}
  /* Grow the hero so the copy never runs into the address row:
     word baseline + 40px + copy (~323px) + ~64px gap + address row (81px). .2905 = .8822 / 3.037 */
  .hero-inner{height:max(880px, calc(590px + .2905 * min(var(--container), 100vw - 2 * var(--gutter))))}
  /* Dish scene centred under the big word (design size 855x570, shrinks on narrower screens). */
  .hero-scene{left:50%;right:auto;width:min(855px, 100% - 2 * var(--gutter));transform:translateX(-50%)}
}

/* Phone hero: normal flow instead of fixed coordinates, so the copy, card and
   address row can never overlap whatever length the CMS texts have. */
@media (max-width:760px){
  .hero,.hero-inner{min-height:0;height:auto}
  .hero-inner{display:flex;flex-direction:column;padding-bottom:var(--space-6)}
  .brand-caption{white-space:nowrap}
  .hero-scene{position:relative;top:auto;left:auto;order:1;width:calc(100% + var(--gutter));height:300px;margin-top:var(--space-10)}
  .hero-card{top:330px;right:var(--gutter)}
  .hero-copy{position:relative;top:auto;left:auto;order:2;width:auto;max-width:340px;margin-top:var(--space-5)}
  .hero-copy h1{margin-top:var(--space-4)}
  .hero-description{margin-top:var(--space-4)}
  .menu-cta{margin-top:var(--space-5)}
  .hero-bottom{position:relative;right:auto;bottom:auto;left:auto;order:3;align-items:center;margin-top:var(--space-7);padding-top:var(--space-5);border-top:1px solid rgba(255,253,242,.3)}
  .hero-address{font-size:13px}
  .scroll-link{display:none}
}
