/* ============================================================
   Songly — Сервис создания песен-открыток
   Design system
   ============================================================ */

:root {
  /* Palette */
  --paper:      #FBF4EF;   /* warm ivory */
  --paper-2:    #F5E6DE;   /* blush surface */
  --paper-3:    #EFD9CF;   /* deeper blush */
  --ink:        #241726;   /* deep plum-black */
  --ink-soft:   #4A3850;
  --muted:      #7C6672;
  --berry:      #CE3E71;   /* raspberry ribbon */
  --berry-deep: #9E2A55;
  --gold:       #E2A63E;
  --gold-soft:  #F3D28C;
  --line:       rgba(36, 23, 38, 0.12);
  --line-2:     rgba(36, 23, 38, 0.07);
  --white:      #ffffff;

  /* Type */
  --display: "Unbounded", "Onest", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Metrics */
  --wrap: 1160px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 10px rgba(36, 23, 38, 0.06);
  --shadow-md: 0 18px 44px -20px rgba(36, 23, 38, 0.30);
  --shadow-lg: 0 40px 80px -30px rgba(36, 23, 38, 0.45);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -0.01em; margin: 0; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--berry-deep);
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--berry), var(--gold));
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px; border: 0;
  font-weight: 600; font-size: 16px; line-height: 1;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn-primary {
  background: var(--berry); color: #fff;
  box-shadow: 0 10px 24px -10px rgba(206, 62, 113, 0.8);
}
.btn-primary:hover { background: var(--berry-deep); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-lg { padding: 17px 34px; font-size: 17px; }
.btn-gold { background: var(--ink); color: var(--paper); }
.btn-gold:hover { background: #160d18; transform: translateY(-2px); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 244, 239, 0.82);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.nav {
  display: flex; align-items: center; gap: 28px;
  height: 70px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.brand .mark { width: 34px; height: 34px; flex: none; }
.nav-links { display: flex; gap: 26px; margin-left: 10px; }
.nav-links a { font-size: 15px; color: var(--ink-soft); font-weight: 500; position: relative; padding: 6px 0; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--berry); transition: width .25s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; }
.nav-toggle svg { width: 26px; height: 26px; }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; padding: 58px 0 72px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 82% 8%, rgba(226, 166, 62, 0.16), transparent 60%),
    radial-gradient(55% 50% at 8% 92%, rgba(206, 62, 113, 0.14), transparent 60%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 54px; align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 5.2vw, 58px);
  margin: 18px 0 0;
}
.hero h1 .accent { color: var(--berry); }
.hero .lead {
  font-size: clamp(17px, 2vw, 21px); color: var(--ink-soft);
  margin: 22px 0 0; max-width: 30ch;
}
.hero .lead b { color: var(--berry-deep); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-trust {
  display: flex; align-items: center; gap: 18px; margin-top: 28px;
  font-size: 14px; color: var(--muted); flex-wrap: wrap;
}
.hero-trust .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.stars { color: var(--gold); letter-spacing: 2px; }

/* Composer card (signature element) */
.composer {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  padding: 26px;
  position: relative;
}
.composer::after {
  /* ribbon corner */
  content: "♪"; position: absolute; top: -16px; right: 22px;
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--berry); color: #fff; border-radius: 50%;
  font-size: 22px; box-shadow: 0 8px 20px -6px rgba(206,62,113,.7);
}
.composer h2 { font-size: 19px; margin-bottom: 4px; }
.composer .sub { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--paper);
  font-family: inherit; font-size: 15px; color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--berry);
  box-shadow: 0 0 0 3px rgba(206,62,113,.14);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); background: var(--paper);
  border-radius: 999px; padding: 8px 14px; font-size: 13.5px; font-weight: 500;
  color: var(--ink-soft); transition: all .18s var(--ease);
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip:hover { border-color: var(--ink); }
.composer .btn { width: 100%; margin-top: 6px; }
.composer .consent { font-size: 11.5px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.composer .consent a { color: var(--berry-deep); text-decoration: underline; }

/* Song card output */
.songcard {
  margin-top: 16px; border-radius: var(--radius-sm);
  background: linear-gradient(160deg, #2C1B31, #1B1020);
  color: #F6ECEF; padding: 20px 20px 18px; position: relative;
  border: 1px solid rgba(255,255,255,.08);
}
.songcard.is-empty { display: none; }
.songcard .sc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.songcard .sc-tag {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold-soft); font-weight: 600;
}
.songcard .sc-note { color: var(--gold); font-size: 16px; }
.songcard .sc-lyrics { font-size: 16.5px; line-height: 1.8; white-space: pre-line; min-height: 108px; }
.songcard .sc-cursor { display: inline-block; width: 8px; height: 18px; background: var(--gold); margin-left: 2px; vertical-align: -3px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 0%,50%{opacity:1} 51%,100%{opacity:0} }
.songcard .sc-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.songcard .sc-btn {
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06);
  color: #F6ECEF; border-radius: 999px; padding: 9px 16px; font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 7px; transition: background .18s var(--ease);
}
.songcard .sc-btn:hover { background: rgba(255,255,255,.14); }
.songcard .sc-btn.primary { background: var(--berry); border-color: var(--berry); }
.songcard .sc-btn.primary:hover { background: var(--berry-deep); }

/* ============================================================
   Section shell
   ============================================================ */
.section { padding: 84px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.8vw, 42px); margin-top: 14px; }
.section-head p { color: var(--ink-soft); font-size: 18px; margin-top: 14px; }

.section-ink { background: var(--ink); color: var(--paper); }
.section-ink .section-head p { color: rgba(245,239,230,.72); }
.section-ink .eyebrow { color: var(--gold-soft); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 26px; position: relative;
  box-shadow: var(--shadow-sm);
}
.step .num {
  font-family: var(--display); font-weight: 700; font-size: 15px;
  color: #fff; background: var(--berry); width: 40px; height: 40px;
  border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
}
.step:nth-child(2) .num { background: var(--gold); color: var(--ink); }
.step:nth-child(3) .num { background: var(--ink); }
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* ---------- Occasions ---------- */
.occasions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.occ {
  border-radius: var(--radius); padding: 26px 24px; min-height: 172px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--paper-2); border: 1px solid var(--line-2);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
  color: var(--ink);
}
.occ:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.occ .ico { font-size: 26px; }
.occ h3 { font-size: 19px; margin: 14px 0 6px; }
.occ p { font-size: 14px; color: var(--muted); margin: 0; }
.occ .go { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--berry-deep); display: inline-flex; gap: 6px; align-items: center; }
.occ:nth-child(3n+1) { background: linear-gradient(160deg, #FCEBF1, #F8DDE6); }
.occ:nth-child(3n+2) { background: linear-gradient(160deg, #FBF0DC, #F6E3C1); }
.occ:nth-child(3n)   { background: linear-gradient(160deg, #EFE7F4, #E4D6EC); }

/* ---------- Examples ---------- */
.examples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ex {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius); padding: 24px; backdrop-filter: blur(4px);
}
.ex .ex-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ex .genre { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-soft); font-weight: 600; }
.ex .play { width: 40px; height: 40px; border-radius: 50%; background: var(--berry); color:#fff; border:0; display:grid; place-items:center; transition: transform .2s var(--ease); }
.ex .play:hover { transform: scale(1.08); }
.ex .wave { display: flex; align-items: flex-end; gap: 3px; height: 30px; margin-bottom: 14px; }
.ex .wave span { flex: 1; background: linear-gradient(var(--gold), var(--berry)); border-radius: 2px; opacity: .55; }
.ex blockquote { margin: 0; font-size: 15.5px; line-height: 1.75; color: #F1E7EA; white-space: pre-line; }
.ex figcaption { margin-top: 14px; font-size: 13px; color: rgba(245,239,230,.6); }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feat { padding: 4px; }
.feat .fi { width: 46px; height: 46px; border-radius: 13px; background: var(--paper-2); display: grid; place-items: center; margin-bottom: 14px; font-size: 22px; }
.feat h3 { font-size: 18px; margin-bottom: 6px; }
.feat p { font-size: 14.5px; color: var(--muted); margin: 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin-inline: auto; }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--ink);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 26px; font-weight: 400; color: var(--berry); transition: transform .25s var(--ease);
}
.qa[open] summary::after { content: "−"; }
.qa .a { padding: 0 44px 24px 0; color: var(--ink-soft); font-size: 16px; }

/* ---------- Final CTA ---------- */
.cta-band {
  background: linear-gradient(140deg, var(--berry), var(--berry-deep) 70%);
  border-radius: 32px; padding: 56px; color: #fff; text-align: center;
  position: relative; overflow: hidden;
}
.cta-band::before, .cta-band::after {
  content: "♪"; position: absolute; color: rgba(255,255,255,.14); font-size: 120px;
}
.cta-band::before { top: -20px; left: 20px; }
.cta-band::after { bottom: -40px; right: 30px; font-size: 160px; }
.cta-band h2 { font-size: clamp(28px, 4vw, 44px); position: relative; }
.cta-band p { font-size: 18px; opacity: .92; margin: 16px auto 28px; max-width: 46ch; position: relative; }
.cta-band .btn-gold { background: #fff; color: var(--berry-deep); position: relative; }
.cta-band .btn-gold:hover { background: var(--paper); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: #1B1020; color: rgba(245,239,230,.72); padding: 60px 0 34px; font-size: 14.5px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; }
.site-footer .brand { color: var(--paper); margin-bottom: 14px; }
.site-footer .about { max-width: 34ch; color: rgba(245,239,230,.6); font-size: 14px; }
.foot-col h4 { font-family: var(--body); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 14px; }
.foot-col a { display: block; padding: 5px 0; color: rgba(245,239,230,.72); }
.foot-col a:hover { color: #fff; }
.legal {
  margin-top: 40px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.1);
  font-size: 12.5px; color: rgba(245,239,230,.5); line-height: 1.7;
}
.legal .req { background: rgba(255,255,255,.04); border: 1px dashed rgba(255,255,255,.18); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.legal a { color: rgba(245,239,230,.7); text-decoration: underline; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; }

/* ============================================================
   Cookie banner
   ============================================================ */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90;
  max-width: 560px; margin-inline: auto;
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius-sm); padding: 18px 20px;
  box-shadow: var(--shadow-lg); display: none; gap: 14px;
  align-items: center; flex-wrap: wrap;
}
.cookie.show { display: flex; }
.cookie p { margin: 0; font-size: 13.5px; flex: 1 1 260px; color: rgba(245,239,230,.85); }
.cookie a { color: var(--gold-soft); text-decoration: underline; }
.cookie .c-actions { display: flex; gap: 8px; }
.cookie .c-btn { border-radius: 999px; padding: 9px 16px; font-size: 13px; font-weight: 600; border: 1px solid rgba(255,255,255,.22); background: transparent; color: var(--paper); }
.cookie .c-btn.primary { background: var(--berry); border-color: var(--berry); }

/* ============================================================
   Legal (content) pages
   ============================================================ */
.doc { padding: 54px 0 80px; }
.doc .wrap { max-width: 820px; }
.doc a.back { font-size: 14px; color: var(--berry-deep); font-weight: 600; }
.doc h1 { font-size: clamp(30px, 5vw, 44px); margin: 18px 0 8px; }
.doc .updated { color: var(--muted); font-size: 14px; margin-bottom: 30px; }
.doc h2 { font-size: 22px; margin: 34px 0 10px; }
.doc h3 { font-size: 18px; margin: 22px 0 8px; }
.doc p, .doc li { color: var(--ink-soft); font-size: 16px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc .note { background: var(--paper-2); border-left: 3px solid var(--berry); border-radius: 8px; padding: 14px 16px; margin: 18px 0; font-size: 15px; }

/* ============================================================
   Reveal animation
   ============================================================ */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero .lead { max-width: none; }
  .steps, .occasions, .examples, .features { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex; position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--paper);
    border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
  }
  .nav.open .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
  .section { padding: 64px 0; }
  .steps, .occasions, .examples, .features, .foot-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 24px; }
  .hero-cta .btn { flex: 1 1 100%; }
}
@media (max-width: 460px) {
  body { font-size: 16px; }
  .nav-actions .btn { padding: 11px 16px; font-size: 14px; }
}
