/* FotoShef landing — dark tech, mobile-first. */

:root {
  /* FotoShef warm-orange palette — синхронизирована с аватаром бота
     (тёплый апельсин + поварской колпак + красное кольцо объектива),
     чтобы не ассоциироваться с «просрочкой/плесенью» от cyan-blue. */
  --bg: #0f0a06;
  --bg-card: #16110b;
  --border: rgb(255 200 150 / 0.10);
  --text: #f5e8dc;
  --muted: #a89684;
  --accent: #f58f30;          /* тёплый апельсин — главный CTA, логотип FS */
  --accent-dim: #c46525;      /* hover/dimmer */
  --accent-light: #ffb070;    /* светлый оранж — для градиента */
  --grad-accent: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.page { max-width: 980px; margin: 0 auto; padding: 24px 16px 64px; }

/* ============ HERO ============ */
.hero {
  text-align: center;
  padding: 32px 0 28px;
}
.hero-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 22px;
  width: fit-content;
}
.hero-mark {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--grad-accent);
  color: #1a0f04;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.hero-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1;
}
.hero-overline {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}
.hero-title {
  font-size: clamp(28px, 7vw, 48px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
}
.hero-sub {
  font-size: clamp(15px, 3.8vw, 18px);
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto 28px;
}

/* ============ CTA ============ */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: var(--grad-accent);
  color: #1a0f04;
  font-weight: 600;
  font-size: 16px;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 32px rgb(245 143 48 / 0.25);
}
.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 40px rgb(245 143 48 / 0.35);
  text-decoration: none;
}
.cta-big { padding: 16px 32px; font-size: 17px; }

.hero-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 14px;
}

/* ============ BEFORE/AFTER TILES (tap-peek) ============ */
/* Default = «После» (full-cover). Hold (touch) или hover/focus-within
   (fine pointer) показывают «До». Мгновенно, без transition. */
.ba-tile {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #000;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  cursor: pointer;
}
.ba-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ba-img--after  { z-index: 1; opacity: 1; transition: opacity 120ms linear; }
.ba-img--before { z-index: 2; opacity: 0; transition: opacity 120ms linear; }

/* JS добавляет .is-peeking при pointerdown/keydown Enter — peek. */
.ba-tile.is-peeking .ba-img--after  { opacity: 0; }
.ba-tile.is-peeking .ba-img--before { opacity: 1; }

/* На устройствах с fine pointer (мышь) — peek через CSS, без JS. */
@media (hover: hover) and (pointer: fine) {
  .ba-tile:hover .ba-img--after,
  .ba-tile:focus-within .ba-img--after  { opacity: 0; }
  .ba-tile:hover .ba-img--before,
  .ba-tile:focus-within .ba-img--before { opacity: 1; }
}

.ba-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.ba-tag {
  position: absolute;
  top: 12px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}
.ba-tag--after  { right: 12px; background: var(--grad-accent); color: #1a0f04; opacity: 1; transition: opacity 120ms linear; }
.ba-tag--before { left: 12px;  background: rgb(0 0 0 / 0.55);  color: #fff;    opacity: 0; transition: opacity 120ms linear; }

.ba-tile.is-peeking .ba-tag--after  { opacity: 0; }
.ba-tile.is-peeking .ba-tag--before { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .ba-tile:hover .ba-tag--after,
  .ba-tile:focus-within .ba-tag--after  { opacity: 0; }
  .ba-tile:hover .ba-tag--before,
  .ba-tile:focus-within .ba-tag--before { opacity: 1; }
}

/* Affordance-индикатор: пульсирующий значок в правом нижнем углу,
   показывает «нажми и удерживай». Скрывается при peek и на десктопе. */
.ba-affordance {
  position: absolute;
  right: 10px; bottom: 10px;
  z-index: 4;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: rgb(0 0 0 / .5);
  border: 1px solid rgb(255 255 255 / .15);
  border-radius: 50%;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
  opacity: .85;
  animation: ba-pulse 2.2s ease-in-out infinite;
}
@keyframes ba-pulse {
  0%, 100% { opacity: .55; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.08); }
}
.ba-tile.is-peeking .ba-affordance,
.ba-tile:focus-within .ba-affordance { opacity: 0; animation: none; }
@media (hover: hover) and (pointer: fine) {
  /* На десктопе hover-эффект сам показывает интерактивность — affordance не нужен. */
  .ba-tile .ba-affordance { display: none; }
}


/* ============ GRID ============ */
.section-title {
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  text-align: center;
}
.grid { margin: 56px 0; }
.grid-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 720px) {
  .grid-items { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 420px) {
  .grid-items { grid-template-columns: 1fr; }
}

.cell {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.cell .ba-tile {
  aspect-ratio: 1 / 1;
  border-radius: 0;
  border: none;
}
.cell figcaption {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ============ HOW ============ */
.how { margin: 56px 0; }
.how-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 720px) {
  .how-list { grid-template-columns: 1fr; }
}
.how-list li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.how-n {
  flex: 0 0 32px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--accent);
  color: #1a0f04;
  font-weight: 700;
  font-size: 15px;
}
.how-list div { font-size: 14px; line-height: 1.5; color: var(--muted); }
.how-list b { color: var(--text); font-weight: 600; }

/* ============ STYLES ============ */
.styles { margin: 56px 0; }
.section-sub {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  margin: -12px 0 24px;
}
.styles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 720px) {
  .styles-grid { grid-template-columns: 1fr; }
}
.style-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.style-card-wide {
  grid-column: 1 / -1;
}
.style-tag {
  display: inline-block;
  align-self: flex-start;
  background: rgb(245 143 48 / 0.14);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
}
.style-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.style-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.style-list li {
  font-size: 14px;
  color: var(--muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.4;
}
.style-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.5;
}
.style-list-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 4px;
}
.style-list-grid li {
  background: rgb(255 255 255 / 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}
.style-list-grid li::before { content: none; }
@media (max-width: 720px) {
  .style-list-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 420px) {
  .style-list-grid { grid-template-columns: repeat(2, 1fr); }
}
.styles-foot {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 24px;
  font-style: italic;
}

/* ============ PRICE ============ */
.price { margin: 56px 0; }
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 720px) {
  .price-grid { grid-template-columns: 1fr; }
}
.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  position: relative;
}
.price-card-pop {
  border-color: var(--accent);
  box-shadow: 0 0 32px rgb(245 143 48 / 0.15);
}
.price-card-pop::before {
  content: 'популярный';
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #1a0f04;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 6px;
}
.price-n { font-size: 36px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.price-k { font-size: 13px; color: var(--muted); margin-top: 2px; }
.price-v { font-size: 22px; font-weight: 700; color: var(--accent); margin-top: 12px; }
.price-u { font-size: 12px; color: var(--muted); margin-top: 4px; }
.price-foot {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
}

/* ============ FINAL ============ */
.final {
  margin: 56px 0 48px;
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(180deg, var(--bg-card) 0%, transparent 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.final-title { font-size: clamp(22px, 5vw, 30px); font-weight: 700; margin: 0 0 8px; }
.final-sub { font-size: 15px; color: var(--muted); margin: 0 0 22px; }

/* ============ FOOT ============ */
.foot {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}
.foot a { color: var(--muted); }
.foot a:hover { color: var(--accent); }
.foot-attr { font-size: 11px; opacity: 0.7; }

/* ============ COOKIE BANNER ============ */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  max-width: 760px;
  margin: 0 auto;
  z-index: 1000;
  background: rgb(11 13 16 / 0.96);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 14px;
  color: var(--text);
  animation: cb-slide-up 0.32s ease-out;
}
@keyframes cb-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.cookie-banner[hidden] { display: none; }
.cookie-text {
  flex: 1 1 280px;
  min-width: 0;
  line-height: 1.45;
  color: var(--muted);
}
.cookie-text b { color: var(--text); font-weight: 600; }
.cookie-text a { color: var(--accent); text-decoration: none; }
.cookie-text a:hover { text-decoration: underline; }
.cookie-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}
.cookie-btn {
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cookie-btn:hover { border-color: var(--accent); }
.cookie-btn-primary {
  background: var(--accent);
  color: #1a0f04;
  border-color: var(--accent);
  font-weight: 600;
}
.cookie-btn-primary:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
}
@media (max-width: 520px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
    left: 12px; right: 12px; bottom: 12px;
  }
  .cookie-actions { justify-content: stretch; }
  .cookie-actions .cookie-btn { flex: 1; }
}