/* Лендинг «Я Люблю Нас.рф» — перевод дизайна «Я Люблю Нас.dc.html»
   (claude.ai/design, проект «Лендинг фото рамки с оживлением») в чистый CSS. */

:root {
  --cream: #f3ead9;        /* фон страницы */
  --cream-alt: #ebdfc8;    /* чередующиеся секции */
  --ink: #2b211a;          /* тёмное дерево / текст */
  --ink-deep: #241b12;
  --accent: #c99b5f;       /* латунь */
  --accent-hover: #dcb076;
  --muted: #6b5b4c;
  --muted-warm: #5f5142;
  --cream-on-dark: #c8b498;
  --nav-link: #d9c5a6;
  --footer-muted: #a5906f;
  --card: #fffdf8;
  --screen: #171310;
  --serif: 'Playfair Display', serif;
  --sans: 'PT Sans', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); font-family: var(--sans); color: var(--ink); }
a { color: #8a5a3b; text-decoration: none; }
a:hover { color: var(--accent); }

@keyframes kenburns {
  0%   { transform: scale(1) translate(0, 0); }
  50%  { transform: scale(1.09) translate(-10px, 6px); }
  100% { transform: scale(1.16) translate(8px, -8px); }
}
@keyframes sway {
  0%, 100% { transform: rotateX(-8deg) rotateY(-22deg); }
  50%      { transform: rotateX(-3deg) rotateY(26deg); }
}
@keyframes pulse { 0%, 100% { opacity: .9; } 50% { opacity: .35; } }
@keyframes drift { 0% { background-position: 0 0; } 100% { background-position: 0 -240px; } }

/* «Бах»-оживление hero-фото: вспышка, световая волна, ударное кольцо, пружинка бейджа */
@keyframes photo-pop { 0% { transform: scale(1); } 35% { transform: scale(1.035); } 100% { transform: scale(1); } }
@keyframes flash { 0% { opacity: 0; } 18% { opacity: .9; } 100% { opacity: 0; } }
@keyframes sweep-run { to { transform: translateX(120%) skewX(-8deg); } }
@keyframes shockwave {
  0%   { transform: scale(.25); opacity: .85; border-width: 10px; }
  100% { transform: scale(4.2); opacity: 0; border-width: 1px; }
}
@keyframes badge-pop { from { transform: translateY(-10px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

.container { max-width: 1200px; margin: 0 auto; }
.container.narrow { max-width: 520px; display: flex; flex-direction: column; gap: 18px; text-align: center; }

.btn { display: inline-block; border: none; border-radius: 8px; font: 700 17px var(--sans); cursor: pointer; }
.btn-accent { background: var(--accent); color: var(--ink-deep); padding: 11px 22px; font-size: 15px; }
.btn-accent:hover { background: var(--accent-hover); color: var(--ink-deep); }
.btn-big { padding: 17px 36px; font-size: 17px; box-shadow: 0 14px 30px -12px rgba(201, 155, 95, .55); }
.btn-wide { padding: 16px; margin-top: 6px; font-size: 17px; }
.btn-dark { background: var(--ink); color: var(--cream); padding: 16px; border-radius: 10px; }
.btn-dark:hover { background: #40311f; }

.kicker { font: 700 13px var(--sans); letter-spacing: .16em; color: var(--accent); }

/* --- Шапка + hero --- */
.hero { background: var(--ink); padding: 0 clamp(20px, 5vw, 56px) clamp(56px, 8vw, 88px); }
.nav {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 22px 0; border-bottom: 1px solid rgba(201, 155, 95, .25);
}
.logo { font: 500 21px var(--serif); color: var(--cream); white-space: nowrap; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: clamp(14px, 3vw, 28px); align-items: center; font-size: 15px; flex-wrap: wrap; }
.nav-links a { color: var(--nav-link); }
.nav-links a:hover { color: var(--accent); }
.nav-links a.btn-accent { color: var(--ink-deep); }
/* Телефон: в шапке только логотип и кнопка предзаказа, якорные ссылки прячем
   (до секций и так один свайп, а шапка перестаёт переноситься в две строки). */
@media (max-width: 640px) {
  .nav-links a:not(.btn-accent) { display: none; }
}

.hero-body {
  display: flex; flex-direction: column; align-items: center; gap: clamp(18px, 3vw, 26px);
  padding-top: clamp(40px, 6vw, 64px); text-align: center;
}
.hero h1 { font: 500 clamp(34px, 5.5vw, 58px)/1.12 var(--serif); margin: 0; color: #f6efe2; max-width: 18ch; text-wrap: pretty; }
.hero-lead { font-size: clamp(16px, 2.2vw, 19px); line-height: 1.6; color: var(--cream-on-dark); margin: 0; max-width: 56ch; text-wrap: pretty; }

.hero-card {
  display: block; cursor: pointer; width: 640px; max-width: 100%; margin-top: 24px;
  background: linear-gradient(160deg, #4a3722, #33261a); border: none; border-radius: 16px;
  padding: clamp(12px, 3vw, 22px); box-shadow: 0 50px 80px -30px rgba(0, 0, 0, .6);
  font: inherit; text-align: center;
}
.hero-photo { border-radius: 8px; overflow: hidden; position: relative; height: clamp(300px, 55vw, 400px); background: var(--screen); }
.hero-card.alive .hero-photo { animation: photo-pop .55s cubic-bezier(.22, 1.4, .36, 1); }
/* Стоп-кадр слегка выцветший (сепия) — оживление возвращает цвет и движение. */
.hero-photo-media { position: absolute; inset: 0; filter: sepia(.45) contrast(.96) brightness(.9); transition: filter .9s ease .1s; }
.hero-card.alive .hero-photo-media { filter: none; animation: kenburns 12s ease-in-out .25s infinite alternate; }
.hero-photo-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #3d2f1f, #241b12); color: #a5906f; font-size: 15px;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .6s ease .15s; pointer-events: none;
}
.hero-card.alive .hero-video { opacity: 1; }
.sweep {
  position: absolute; inset: -20% -30%; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 250, 238, .38) 50%, transparent 58%);
  transform: translateX(-120%) skewX(-8deg);
}
.hero-card.alive .sweep { animation: sweep-run 1s ease .2s forwards; }
.flash {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 45%, rgba(255, 248, 235, .95), rgba(255, 248, 235, 0) 62%);
}
.hero-card.alive .flash { animation: flash .65s ease-out; }
.shockwave {
  position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px;
  border-radius: 50%; border: 2px solid rgba(243, 234, 217, .9); opacity: 0; pointer-events: none;
}
.hero-card.alive .shockwave { animation: shockwave .9s ease-out .08s; }
.live-badge {
  position: absolute; top: 14px; left: 14px; background: rgba(20, 14, 9, .78); color: var(--cream);
  padding: 5px 12px; border-radius: 999px; font: 700 12px var(--sans); letter-spacing: .08em;
  display: none; align-items: center; gap: 7px; pointer-events: none;
}
.hero-card.alive .live-badge { display: flex; animation: badge-pop .55s cubic-bezier(.34, 1.56, .64, 1) .4s both; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
.play-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 1; transition: opacity .3s ease;
}
.hero-card.alive .play-overlay { opacity: 0; }
.play-btn {
  width: 74px; height: 74px; border-radius: 50%; background: rgba(243, 234, 217, .92);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .4);
}
/* Треугольник CSS-бордерами — шрифтовый «▶» телефоны подменяют на эмодзи. */
.play-btn::before {
  content: ''; width: 0; height: 0; margin-left: 6px;
  border-style: solid; border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent #8a5a3b;
}
.hero-card-hint { font-size: 14px; color: var(--footer-muted); margin-top: 14px; }

/* --- Секции --- */
.section { padding: clamp(56px, 8vw, 80px) clamp(20px, 5vw, 56px); }
.section-alt { background: var(--cream-alt); }
.section-last { padding-bottom: clamp(64px, 9vw, 88px); }
.section-title { font: 500 clamp(28px, 4vw, 38px) var(--serif); margin: 0; color: var(--ink); }
.section-title.centered { text-align: center; margin-bottom: clamp(32px, 5vw, 48px); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px; align-items: center; }

/* Как это работает */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.step { border-top: 1px solid #ded0b8; padding-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.step-num { font: 700 13px var(--sans); letter-spacing: .14em; color: #a8823f; }
.step-title { font: 500 22px var(--serif); color: var(--ink); }
.step-text { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* --- 3D-рамка --- */
.frame-viewer {
  height: 460px; display: flex; align-items: center; justify-content: center;
  perspective: 1300px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.frame-viewer.dragging { cursor: grabbing; }
/* Горизонтальная рамка; экран (inset 22px) = 320×240 — пропорции 4:3, как у
   ЖК-панели iPad 3/4 (9,7″ 2048×1536). Габарит бокса = экран + рамка по 22px. */
.frame3d-box { width: 364px; height: 284px; position: relative; }
.frame3d { position: absolute; inset: 0; transform-style: preserve-3d; animation: sway 10s ease-in-out infinite; }
.frame3d.manual { animation: none; }
.face { position: absolute; }
.face-back { inset: 0; transform: rotateY(180deg) translateZ(16px); background: var(--ink-deep); border-radius: 12px; }
/* Торцы короче на радиус (12px) с каждого конца — иначе на углах они торчат
   прямыми краями поверх скругления передней/задней граней. */
.face-left  { width: 32px; height: 260px; top: 12px; left: 166px; transform: rotateY(90deg) translateZ(182px);  background: #3a2c1d; }
.face-right { width: 32px; height: 260px; top: 12px; left: 166px; transform: rotateY(90deg) translateZ(-182px); background: var(--ink-deep); }
.face-top    { width: 340px; height: 32px; top: 126px; left: 12px; transform: rotateX(90deg) translateZ(142px);  background: #463523; }
.face-bottom { width: 340px; height: 32px; top: 126px; left: 12px; transform: rotateX(90deg) translateZ(-142px); background: #1c140d; }
.face-front {
  inset: 0; transform: translateZ(16px); border-radius: 12px;
  background: linear-gradient(135deg, #4a3722, #33261a 60%, var(--ink-deep));
  box-shadow: inset 0 0 0 2px rgba(201, 155, 95, .25);
}
.screen { position: absolute; inset: 22px; background: var(--screen); border-radius: 5px; overflow: hidden; }
.screen-stripes {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(-8deg, #2b2119 0 26px, #332820 26px 52px);
  animation: drift 16s linear infinite;
}
.screen-caption {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 400 12px/1.6 monospace; color: #c9b394; text-align: center; padding: 12px;
}
.screen-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen-gloss { position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 38%); pointer-events: none; }

.model-text { display: flex; flex-direction: column; gap: 18px; }
.model-text p { font-size: 17px; line-height: 1.6; color: var(--muted-warm); margin: 0; }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.spec { background: var(--cream); border-radius: 10px; padding: 16px 18px; }
.spec-val { font: 700 16px var(--sans); color: var(--ink); }
.spec-cap { font-size: 13px; color: var(--muted); }

/* --- Цена --- */
.price-text { display: flex; flex-direction: column; gap: 16px; }
.price-text p { font-size: 17px; line-height: 1.6; color: var(--muted-warm); margin: 0; }
.price-card {
  background: var(--ink); border-radius: 18px;
  padding: clamp(32px, 5vw, 44px) clamp(24px, 5vw, 48px);
  display: flex; flex-direction: column; gap: 16px; text-align: center;
}
.price-card .kicker { letter-spacing: .14em; }
.price-value { font: 500 clamp(40px, 6vw, 52px) var(--serif); color: #f6efe2; }
.price-note { font-size: 15px; color: var(--cream-on-dark); line-height: 1.6; }

/* --- Форма --- */
.form-lead { font-size: 16px; line-height: 1.6; color: var(--muted); margin: 0; }
.lead-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.lead-form input {
  padding: 15px 20px; border-radius: 10px; border: 1px solid #cdbb9c; background: var(--card);
  color: var(--ink); font: 400 16px var(--sans); outline: none;
}
.lead-form input:focus { border-color: var(--accent); }
.lead-form input.invalid { border-color: #b4552e; }
.form-thanks { background: var(--card); border-radius: 14px; padding: 28px; color: var(--ink); font-size: 17px; line-height: 1.6; margin-top: 8px; }

/* --- Подвал --- */
.footer {
  padding: 24px clamp(20px, 5vw, 56px); display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; background: var(--ink); color: var(--footer-muted); font-size: 14px;
}
.logo-small { font-size: 17px; color: var(--nav-link); }

@media (prefers-reduced-motion: reduce) {
  .frame3d, .screen-stripes, .live-dot,
  .hero-card.alive .hero-photo, .hero-card.alive .hero-photo-media,
  .hero-card.alive .sweep, .hero-card.alive .flash,
  .hero-card.alive .shockwave, .hero-card.alive .live-badge { animation: none !important; }
  .hero-photo-media { transition: none; }
  html { scroll-behavior: auto; }
}
