/* «Мир Porsche» — the new quarter of the-life.ru.
   Layout: full-bleed photo heroes, wide 12-col sections, photo cards; same type family as the 2008 «old town» so the two read as one city. */
:root{
  --bg:#f4f3ee;          /* warm paper, a shade lighter than the old town */
  --bg-2:#e9e8e1;
  --ink:#16171a;
  --ink-soft:#5b5d61;
  --rule:#d3d2c9;
  --red:#c4161c;         /* guards red: the accent of the new quarter */
  --red-ink:#fff;
  --navy:#1c2a8c;        /* the old town's blue, used for links back */
  --bar:#121316; --bar-ink:#f1efe8; --bar-soft:#9a9a94;
  --f-display:"Fira Sans Extra Condensed","Arial Narrow",sans-serif;
  --f-body:"Fira Sans",system-ui,sans-serif;
  --f-serif:"PT Serif",Georgia,serif;
  --f-mono:"PT Mono",ui-monospace,Menlo,monospace;
  --wrap:76rem;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0f1012;--bg-2:#17181b;--ink:#ecebe5;--ink-soft:#a5a59e;--rule:#2b2c30;--red:#ff4b52;--navy:#9fb0ff;color-scheme:dark}}
:root[data-theme="dark"]{--bg:#0f1012;--bg-2:#17181b;--ink:#ecebe5;--ink-soft:#a5a59e;--rule:#2b2c30;--red:#ff4b52;--navy:#9fb0ff;color-scheme:dark}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:400 1.0625rem/1.6 var(--f-body)}
img{max-width:100%;display:block}
a{color:inherit}
a:focus-visible,button:focus-visible{outline:2px solid var(--red);outline-offset:3px}
.wrap{max-width:var(--wrap);margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}

/* top bar */
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:10;background:var(--bar)}
.bar{position:sticky;top:env(safe-area-inset-top,0px);z-index:9;background:var(--bar);color:var(--bar-ink)}
.bar .wrap{display:flex;align-items:center;gap:.5rem 1.5rem;flex-wrap:wrap;padding-block:.6rem}
.brand{font-family:var(--f-display);font-weight:700;font-size:1.35rem;letter-spacing:.08em;text-transform:uppercase;text-decoration:none;color:var(--bar-ink)}
.brand span{color:var(--red)}
.nav{display:flex;gap:.2rem 1.1rem;flex-wrap:wrap;font-family:var(--f-display);font-size:1.05rem;letter-spacing:.03em}
.nav a{text-decoration:none;color:var(--bar-soft);padding:.15rem 0;border-bottom:2px solid transparent}
.nav a:hover{color:var(--bar-ink)}
.nav a[aria-current="page"]{color:var(--bar-ink);border-bottom-color:var(--red)}
.bar__end{margin-left:auto;display:flex;align-items:center;gap:1rem}
.oldtown{font-family:var(--f-serif);font-style:italic;font-size:.95rem;color:#c9cfff;text-decoration:none;white-space:nowrap}
.oldtown:hover{text-decoration:underline}
.theme-toggle{width:2.1rem;height:2.1rem;border-radius:50%;border:1px solid #3a3b40;background:transparent;color:var(--bar-ink);display:inline-grid;place-items:center;cursor:pointer;padding:0}
.theme-toggle:hover{background:#25262b}
.theme-toggle svg{width:1.05rem;height:1.05rem;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .ico-sun{display:none}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .theme-toggle .ico-sun{display:block}:root:not([data-theme="light"]) .theme-toggle .ico-moon{display:none}}
:root[data-theme="dark"] .theme-toggle .ico-sun{display:block}
:root[data-theme="dark"] .theme-toggle .ico-moon{display:none}
@media (max-width:40rem){.bar__end{margin-left:0;width:100%;justify-content:space-between}}

/* hero */
.hero{position:relative;min-height:min(78vh,44rem);display:flex;align-items:flex-end;color:#fff;background:#111 center/cover no-repeat;isolation:isolate}
.hero::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,rgba(0,0,0,.05) 30%,rgba(0,0,0,.72) 100%)}
.hero--short{min-height:min(52vh,30rem)}
.hero .wrap{width:100%;padding-block:3rem 2.5rem}
.eyebrow{font-family:var(--f-mono);font-size:.8rem;letter-spacing:.12em;text-transform:uppercase;opacity:.85;margin:0 0 .6rem}
.hero h1{font-family:var(--f-display);font-weight:700;font-size:clamp(2.8rem,9vw,6.5rem);line-height:.92;margin:0;letter-spacing:-.01em;text-wrap:balance;max-width:16ch}
.hero p.lead{font-size:clamp(1.05rem,2.2vw,1.35rem);max-width:40rem;margin:1rem 0 0;color:#eceae3}
.hero .credit{position:absolute;right:max(16px,env(safe-area-inset-right,0px));bottom:.5rem;font-size:.7rem;font-family:var(--f-mono);color:rgba(255,255,255,.65);text-decoration:none}

/* sections */
section{padding-block:3.5rem}
section + section{border-top:1px solid var(--rule)}
h2{font-family:var(--f-display);font-weight:700;font-size:clamp(2rem,4.5vw,3rem);line-height:1;margin:0 0 .5rem;text-wrap:balance}
h3{font-family:var(--f-display);font-weight:600;font-size:1.6rem;line-height:1.1;margin:0 0 .4rem}
.sub{color:var(--ink-soft);max-width:44rem;margin:0 0 2rem;font-size:1.1rem}
.prose{max-width:42rem}
.prose p{margin:0 0 1rem}

/* cards */
.grid{display:grid;gap:1.5rem;grid-template-columns:repeat(auto-fill,minmax(min(100%,20rem),1fr))}
.card{display:flex;flex-direction:column;background:var(--bg-2);text-decoration:none;color:inherit;min-width:0}
.card__img{aspect-ratio:16/10;overflow:hidden;background:#222}
.card__img img{width:100%;height:100%;object-fit:cover;transition:transform .5s ease}
a.card:hover .card__img img{transform:scale(1.04)}
.card__body{padding:1.1rem 1.2rem 1.3rem;display:flex;flex-direction:column;gap:.4rem;flex:1}
.card__kicker{font-family:var(--f-mono);font-size:.78rem;color:var(--red);letter-spacing:.06em;text-transform:uppercase}
.card__body p{margin:0;color:var(--ink-soft);font-size:.98rem}
.card__more{margin-top:auto;padding-top:.6rem;font-family:var(--f-display);font-size:1.05rem;color:var(--red)}

/* feature rows (photo + text) */
.feature{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:2rem 3rem;align-items:center;padding-block:2.5rem}
.feature + .feature{border-top:1px solid var(--rule)}
.feature:nth-child(even) .feature__img{order:2}
.feature__img{position:relative}
.feature__img img{width:100%;aspect-ratio:3/2;object-fit:cover}
.feature__img figcaption{font-family:var(--f-mono);font-size:.72rem;color:var(--ink-soft);padding-top:.35rem}
.feature__img figcaption a{color:inherit}
.feature__yrs{font-family:var(--f-mono);color:var(--red);font-size:.9rem;letter-spacing:.04em}
.feature h3{font-size:clamp(1.8rem,3.5vw,2.6rem)}
.feature p{margin:.4rem 0 0}
.chips{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:1rem;padding:0;list-style:none}
.chips li{font-family:var(--f-mono);font-size:.8rem;border:1px solid var(--rule);padding:.25rem .55rem;font-variant-numeric:tabular-nums}
.backlink{display:inline-block;margin-top:1rem;font-family:var(--f-serif);font-style:italic;color:var(--navy)}
@media (max-width:52rem){.feature{grid-template-columns:1fr}.feature:nth-child(even) .feature__img{order:0}}

/* timeline strip (911 generations nav) */
.gens{display:flex;gap:.5rem;flex-wrap:wrap;margin:0 0 1rem;padding:0;list-style:none}
.gens a{font-family:var(--f-display);font-size:1.15rem;text-decoration:none;border:1px solid var(--rule);padding:.3rem .8rem}
.gens a:hover{border-color:var(--red);color:var(--red)}

/* numbers */
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,11rem),1fr));gap:1px;background:var(--rule);border:1px solid var(--rule);margin:1rem 0 0}
.stat{background:var(--bg);padding:1.2rem 1.1rem}
.stat b{display:block;font-family:var(--f-display);font-size:2.6rem;line-height:1;color:var(--red);font-variant-numeric:tabular-nums}
.stat span{font-size:.92rem;color:var(--ink-soft)}

/* table */
.specs{overflow-x:auto;margin:1.5rem 0;border-top:2px solid var(--ink)}
.specs table{border-collapse:collapse;width:100%;min-width:36rem;font-family:var(--f-mono);font-size:.88rem;font-variant-numeric:tabular-nums}
.specs th,.specs td{padding:.5rem .6rem;border-bottom:1px solid var(--rule);text-align:left;vertical-align:top}
.specs thead th{font-family:var(--f-display);font-size:1.05rem;font-weight:600}

/* gallery + lightbox */
.mosaic{columns:3 18rem;column-gap:1rem}
.mosaic figure{break-inside:avoid;margin:0 0 1rem;background:var(--bg-2)}
.mosaic button{all:unset;cursor:zoom-in;display:block;width:100%}
.mosaic img{width:100%;height:auto}
.mosaic figcaption{padding:.5rem .7rem .7rem;font-size:.9rem}
.mosaic figcaption small{display:block;font-family:var(--f-mono);font-size:.7rem;color:var(--ink-soft)}
.lb[hidden]{display:none!important}
.lb{position:fixed;inset:0;z-index:50;background:rgba(8,8,10,.94);display:grid;place-items:center;padding:max(16px,env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) max(16px,env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px))}
.lb img{max-width:100%;max-height:82vh;object-fit:contain;margin:0 auto}
.lb img[src=""]{display:none}
.lb p{color:#ddd;text-align:center;margin:.8rem 0 0;font-size:.95rem}
.lb button{position:absolute;top:max(12px,env(safe-area-inset-top,0px));right:max(12px,env(safe-area-inset-right,0px));background:#222;color:#fff;border:0;width:2.6rem;height:2.6rem;border-radius:50%;font-size:1.4rem;cursor:pointer}

/* footer */
footer{background:var(--bar);color:var(--bar-soft);margin-top:2rem}
footer .wrap{display:flex;flex-wrap:wrap;gap:.6rem 2rem;justify-content:space-between;padding-block:1.6rem 2.2rem;font-size:.9rem}
footer a{color:var(--bar-ink)}

@media (prefers-reduced-motion:reduce){*{transition:none!important}}
