@font-face {
  font-family: "Montserrat";
  src: url("/fonts/Montserrat.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #F5EEE2;
  --paper: #FFFAF2;
  --sand: #EADFCB;
  --sand-2: #DCCDB2;
  --sage: #8BA678;
  --sage-soft: #DCE6D0;
  --green: #3F5B3F;
  --green-2: #56754F;
  --mustard: #E2B65B;
  --peach: #E9A98B;
  --text: #2E3A2B;
  --muted: #6F7A68;
  --radius: 22px;
  --shadow: 0 10px 30px -12px rgba(63, 91, 63, .25);
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(139,166,120,.14) 0 180px, transparent 181px),
    radial-gradient(circle at 92% 30%, rgba(226,182,91,.12) 0 220px, transparent 221px);
  background-attachment: fixed;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--green-2); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Шапка ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 238, 226, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(220, 205, 178, .6);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--green); text-decoration: none; white-space: nowrap; }
.logo .badge { width: 34px; height: 34px; border-radius: 50%; background: var(--sage); color: var(--paper); display: grid; place-items: center; font-weight: 800; }
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  text-decoration: none; color: var(--green); font-weight: 600; font-size: 16px;
  padding: 9px 16px; border-radius: 999px;
}
.nav-links a.active { background: var(--green); color: var(--paper); }
.nav-links a:not(.active):hover { background: var(--sand); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 700; font-size: 18px;
  border: 0; cursor: pointer; text-decoration: none;
  padding: 16px 28px; border-radius: 999px;
  background: var(--green); color: var(--paper);
  box-shadow: 0 6px 0 #2c432c;
  transition: transform .12s ease, box-shadow .12s ease, background .2s;
  min-height: 56px;
}
.btn:hover { background: #355035; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #2c432c; }
.btn.light { background: var(--paper); color: var(--green); box-shadow: 0 6px 0 var(--sand-2); border: 2px solid var(--sand-2); }
.btn.light:hover { background: #fff; }
.btn.small { font-size: 16px; padding: 12px 20px; min-height: 48px; box-shadow: 0 4px 0 #2c432c; }
.btn.small.light { box-shadow: 0 4px 0 var(--sand-2); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }
.link-btn { background: none; border: 0; padding: 6px 0; font: inherit; font-size: 15px; font-weight: 600; color: var(--muted); text-decoration: underline; cursor: pointer; }

/* ---------- Главная ---------- */
.hero { padding: 48px 0 32px; position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hello { display: inline-flex; align-items: center; gap: 8px; background: var(--sage-soft); color: var(--green); font-weight: 700; padding: 8px 16px; border-radius: 999px; font-size: 16px; }
.hero h1 { font-size: clamp(38px, 5vw, 58px); line-height: 1.05; margin: 18px 0 18px; color: var(--green); font-weight: 800; letter-spacing: -.02em; }
.hero h1 .accent { color: var(--sage); }
.hero p.lead { font-size: clamp(18px, 2.1vw, 21px); color: var(--text); margin: 0 0 28px; max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; }

.photo-frame { position: relative; justify-self: center; width: min(420px, 100%); }
.photo-frame .photo {
  position: relative; z-index: 2;
  border-radius: 46% 54% 50% 50% / 44% 44% 56% 56%;
  overflow: hidden; aspect-ratio: 4 / 5;
  border: 10px solid var(--paper);
  box-shadow: var(--shadow);
  background: var(--sand);
}
.photo-frame .photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.photo-frame .blob { position: absolute; inset: 6% -6% -4% 6%; background: var(--sage); border-radius: 50% 46% 52% 48% / 50% 52% 48% 50%; z-index: 1; transform: rotate(-6deg); opacity: .55; }
.photo-frame .deco { position: absolute; z-index: 3; filter: drop-shadow(0 6px 8px rgba(63,91,63,.18)); }
.photo-frame .deco.dino { width: 46%; left: -22%; bottom: 2%; animation: bob 4s ease-in-out infinite; }
.photo-frame .deco.car { width: 40%; right: -16%; top: 6%; animation: bob 4.6s ease-in-out infinite .6s; }
.photo-frame .age {
  position: absolute; z-index: 4; right: -4%; bottom: 10%;
  width: 104px; height: 104px; border-radius: 50%;
  background: var(--mustard); color: var(--green);
  display: grid; place-items: center; text-align: center;
  font-weight: 800; line-height: 1; box-shadow: var(--shadow);
  transform: rotate(10deg);
}
.photo-frame .age b { font-size: 44px; display: block; }
.photo-frame .age span { font-size: 14px; }
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }

.stars img { position: absolute; width: 22px; opacity: .8; }

/* ---------- Карточки-инфо ---------- */
.section { padding: 32px 0 56px; }
.section h2 { font-size: clamp(28px, 3.6vw, 40px); color: var(--green); margin: 0 0 8px; font-weight: 800; letter-spacing: -.01em; }
.section .sub { color: var(--muted); margin: 0 0 28px; font-size: 18px; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.info {
  background: var(--paper); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); border: 1px solid rgba(220,205,178,.6);
}
.info .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: var(--sage-soft); margin-bottom: 14px; }
.info .label { color: var(--muted); font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.info .value { font-size: 21px; font-weight: 700; color: var(--green); margin-top: 4px; }
.info .hint { color: var(--muted); font-size: 15px; margin-top: 6px; }

.countdown { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 22px; background: var(--green); color: var(--paper); border-radius: var(--radius); padding: 22px 26px; }
.countdown .num { font-size: 44px; font-weight: 800; line-height: 1; color: var(--mustard); }
.countdown .txt { font-size: 18px; font-weight: 600; }
.countdown img { width: 88px; margin-left: auto; }

.cta-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  background: var(--sand); border-radius: calc(var(--radius) + 6px); padding: 28px 32px; margin-top: 22px;
}
.cta-card img { width: 120px; }
.cta-card h3 { margin: 0 0 6px; font-size: 24px; color: var(--green); }
.cta-card p { margin: 0; color: var(--text); }

/* ---------- Идеи на главной ---------- */
.ideas { background: var(--sand); border-radius: calc(var(--radius) + 6px); padding: 28px 32px; margin-top: 22px; display: grid; gap: 20px; }
.ideas-head { display: flex; align-items: center; gap: 20px; }
.ideas-head img { width: 90px; flex: none; }
.ideas-head h3 { margin: 0 0 4px; font-size: 24px; color: var(--green); }
.ideas-head p { margin: 0; }
.ideas-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.idea { display: flex; align-items: center; gap: 14px; background: var(--paper); border-radius: 18px; padding: 14px 16px; text-decoration: none; color: var(--text); transition: transform .15s; }
.idea:hover { transform: translateY(-2px); }
.idea-pic { flex: none; width: 54px; height: 54px; border-radius: 14px; background: var(--sage-soft); display: grid; place-items: center; font-size: 30px; }
.idea-body b { display: block; font-size: 17px; line-height: 1.3; }
.idea-meta { color: var(--muted); font-size: 15px; display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; }
.ideas .btn { justify-self: start; }

/* ---------- Приоритет ---------- */
.prio { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--green); }
.hearts { display: inline-flex; gap: 1px; font-size: 16px; line-height: 1; letter-spacing: 0; }
.hearts i { font-style: normal; color: var(--sand-2); }
.hearts i.on { color: #D9785A; }
.card .prio-badge { font-size: 14px; line-height: 1; display: inline-flex; align-items: center; position: absolute; top: 12px; right: 12px; background: rgba(255,250,242,.92); border-radius: 999px; padding: 5px 11px; }
.card .prio-badge.p3 { background: #fff; box-shadow: 0 2px 8px rgba(217,120,90,.25); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 15px; margin-top: 4px; }
.legend .prio { color: var(--muted); font-weight: 600; }

/* ---------- Вишлист ---------- */
.page-head { padding: 40px 0 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(34px, 5vw, 52px); margin: 0; color: var(--green); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.page-head p { margin: 10px 0 0; color: var(--muted); max-width: 36em; }
.page-head .side { display: flex; align-items: center; gap: 14px; }
.page-head .side img { width: 120px; }

.how {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0 8px;
}
.how .step { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border-radius: 18px; padding: 16px 18px; border: 1px solid rgba(220,205,178,.6); }
.how .n { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--sage); color: #fff; font-weight: 800; display: grid; place-items: center; }
.how .t { font-size: 16px; line-height: 1.4; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 26px 0 18px; }
.progress { display: flex; align-items: center; gap: 14px; font-weight: 600; color: var(--green); }
.bar { width: 180px; height: 12px; background: var(--sand); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--sage); border-radius: 99px; transition: width .4s ease; }
.seg { display: inline-flex; background: var(--sand); border-radius: 999px; padding: 4px; }
.seg button { font: inherit; font-size: 16px; font-weight: 700; border: 0; background: none; color: var(--green); padding: 10px 18px; border-radius: 999px; cursor: pointer; min-height: 44px; }
.seg button.on { background: var(--paper); box-shadow: 0 2px 8px rgba(63,91,63,.15); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid rgba(220,205,178,.6);
  display: flex; flex-direction: column; transition: transform .2s ease;
  position: relative;
}
.card:hover { transform: translateY(-3px); }
.card .pic { aspect-ratio: 16 / 10; display: grid; place-items: center; font-size: 72px; position: relative; }
.card .pic img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.card .pic.c0 { background: #DCE6D0; } .card .pic.c1 { background: #F1E3C4; } .card .pic.c2 { background: #E6EBDD; } .card .pic.c3 { background: #F3DED3; }
.card .num { position: absolute; top: 12px; left: 12px; background: rgba(255,250,242,.9); color: var(--green); font-weight: 800; font-size: 14px; border-radius: 999px; padding: 4px 10px; }
.card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { margin: 0; font-size: 19px; line-height: 1.3; color: var(--text); font-weight: 700; }
.card .price { font-weight: 800; color: var(--green-2); font-size: 18px; }
.card .note { font-size: 15px; color: var(--muted); margin: -4px 0 0; }
.card .shop { font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.card .foot { margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 8px; }

.card.booked .pic { filter: grayscale(.7) opacity(.7); }
.card.booked h3, .card.booked .price { color: var(--muted); }
.taken {
  display: flex; align-items: center; gap: 10px;
  background: var(--sand); color: var(--green); border-radius: 14px; padding: 12px 14px; font-weight: 600; font-size: 16px;
}
.taken .who { font-weight: 800; }
.taken.mine { background: var(--sage-soft); }
.ribbon { z-index: 2; box-shadow: 0 2px 6px rgba(0,0,0,.15); position: absolute; top: 14px; right: -36px; transform: rotate(35deg); background: var(--green); color: var(--paper); font-weight: 800; font-size: 13px; letter-spacing: .06em; padding: 6px 44px; text-transform: uppercase; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty img { width: 140px; margin: 0 auto 12px; }

.parents-link { display: flex; align-items: center; gap: 18px; margin: 40px 0 0; background: var(--paper); border: 2px dashed var(--sand-2); border-radius: var(--radius); padding: 20px 24px; text-decoration: none; color: var(--text); }
.parents-link img { width: 64px; }
.parents-link b { color: var(--green); font-size: 19px; display: block; }
.parents-link:hover { border-color: var(--sage); }

/* ---------- Модальное окно ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(46,58,43,.45); display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-bg.open { display: flex; animation: fade .15s ease; }
.modal { background: var(--paper); border-radius: 28px; padding: 28px; width: min(460px, 100%); box-shadow: 0 30px 60px -20px rgba(0,0,0,.35); position: relative; animation: pop .2s ease; }
.modal .m-ico { width: 64px; height: 64px; border-radius: 20px; background: var(--sage-soft); font-size: 34px; display: grid; place-items: center; margin-bottom: 14px; }
.modal h3 { margin: 0 0 6px; font-size: 24px; color: var(--green); }
.modal .gift { font-weight: 600; margin: 0 0 18px; }
.modal label { display: block; font-weight: 700; margin-bottom: 8px; }
.modal input {
  width: 100%; font: inherit; font-size: 19px; padding: 14px 16px; border-radius: 16px;
  border: 2px solid var(--sand-2); background: #fff; color: var(--text); outline: none;
}
.modal input:focus { border-color: var(--sage); }
.modal .help { color: var(--muted); font-size: 15px; margin: 8px 0 20px; }
.modal .row { display: flex; gap: 10px; }
.modal .row .btn { flex: 1; }
.modal .close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--sand); font-size: 22px; cursor: pointer; color: var(--green); }
.modal .err { color: #A3482E; font-weight: 600; font-size: 15px; margin: -8px 0 14px; display: none; }
@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { transform: scale(.94); opacity: 0 } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px); background: var(--green); color: var(--paper); padding: 14px 22px; border-radius: 16px; font-weight: 600; z-index: 60; transition: transform .3s ease; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Страница родителей ---------- */
.letter { background: var(--paper); border-radius: 30px; padding: clamp(24px, 5vw, 48px); box-shadow: var(--shadow); border: 1px solid rgba(220,205,178,.6); }
.letter p { margin: 0 0 14px; }
.letter .sign { font-weight: 700; color: var(--green); margin-top: 18px; }
.steps { counter-reset: s; display: grid; gap: 22px; }
.stepbox { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: center; background: var(--paper); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); border: 1px solid rgba(220,205,178,.6); }
.stepbox h3 { margin: 0 0 8px; color: var(--green); font-size: 22px; display: flex; gap: 12px; align-items: center; }
.stepbox h3 .n { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--sage); color: #fff; display: grid; place-items: center; font-size: 18px; }
.stepbox p { margin: 0; }
.stepbox .shot { border-radius: 18px; overflow: hidden; border: 6px solid var(--sand); background: var(--sand); }
.tips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.tip { background: var(--paper); border-radius: var(--radius); padding: 22px 24px; border: 1px solid rgba(220,205,178,.6); box-shadow: var(--shadow); }
.tip .ico { font-size: 30px; }
.tip h3 { margin: 8px 0 6px; color: var(--green); font-size: 20px; }
.tip p { margin: 0; color: var(--text); }
.placeholder { background: #FFF1C9; border-radius: 6px; padding: 0 4px; }

/* ---------- Подвал ---------- */
footer { padding: 40px 0 48px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--sand-2); padding-top: 24px; }
footer a { color: var(--muted); }
.footprints { display: flex; gap: 10px; opacity: .9; }
.footprints img { width: 18px; }
.footprints img:nth-child(odd) { transform: translateY(6px) rotate(-10deg); }
.footprints img:nth-child(even) { transform: rotate(10deg); }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .ideas-list { grid-template-columns: 1fr; }
  .ideas { padding: 24px 20px; }
  .ideas .btn { justify-self: stretch; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-top: 28px; }
  .hero .text { order: 2; text-align: center; }
  .hero .actions { justify-content: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .photo-frame { width: min(330px, 74%); }
  .info-grid { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr; }
  .stepbox { grid-template-columns: 1fr; }
  .stepbox .shot { max-width: 340px; }
  .tips { grid-template-columns: 1fr; }
  .cta-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .nav .wrap { height: 58px; }
  .logo .name { display: none; }
  .nav-links a { padding: 8px 12px; font-size: 15px; }
  .btn { width: 100%; }
  .hero .actions { flex-direction: column; }
  .page-head .side img { display: none; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .progress { justify-content: space-between; }
  .bar { flex: 1; }
  .seg { width: 100%; }
  .seg button { flex: 1; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .card .pic { aspect-ratio: 16 / 8; font-size: 60px; }
  .countdown img { display: none; }
  .modal { padding: 24px 20px; border-radius: 24px; }
  .modal .row { flex-direction: column-reverse; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
