/* nfunds · страницата с добавките и пакета
   Трите продукта са бижута в кадифе, както на началната страница: петрол (Материали),
   кехлибар (Бонуси) и оникс (Всичко за салона). Текстът стои на перлен етикет с бодове. */

/* ——— първият екран ——— */
.dhero { position: relative; z-index: 1; padding: calc(76px + clamp(36px, 7vh, 84px)) 0 clamp(70px, 9vw, 120px); }
.dhero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(80% 50% at 22% 18%, rgba(14, 10, 7, 0.55), rgba(14, 10, 7, 0) 70%);
}
.dhero__head { max-width: 1100px; }
.dhero h1 { font-size: clamp(44px, 5.4vw, 84px); margin: 22px 0 24px; }
.dhero h1 .g {
  display: block;
  background: linear-gradient(100deg, #F6E3B4 0%, #D8B26A 38%, #F3DCA0 55%, #B8873A 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dhero .lead { color: var(--cream-2); max-width: 36em; margin: 0; }

/* ——— трите карти ——— */
.dcards { margin-top: clamp(50px, 7vw, 92px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 1.8vw, 26px); align-items: stretch; }
.dcard {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  border-radius: 30px; overflow: hidden; color: var(--cream);
  background-color: #17120F; background-position: center top; background-size: cover; background-repeat: no-repeat;
  border: 1px solid rgba(233, 207, 147, 0.26);
  box-shadow: 0 60px 100px -56px rgba(0, 0, 0, 0.95), 0 18px 40px -26px rgba(0, 0, 0, 0.7);
  transition: transform var(--dur-slow) var(--ease-emph), box-shadow var(--dur-slow) var(--ease-out), border-color var(--dur-base);
}
.dcard--mt { background-image: url(../assets/velvet/card-petrol.jpg); --tone: #A6D9DB; }
.dcard--bn { background-image: url(../assets/velvet/card-amber.jpg); --tone: #F2CD92; }
.dcard--all { background-image: url(../assets/velvet/card-onyx.jpg); --tone: var(--gold-2); border-color: rgba(233, 207, 147, 0.5); }
/* светлината следва показалеца — като по кадифе */
.dcard::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(380px circle at var(--mx, 70%) var(--my, 12%), rgba(255, 238, 205, 0.2), rgba(255, 238, 205, 0) 62%);
  transition: opacity var(--dur-slow) var(--ease-out);
}
.dcard:hover::before { opacity: 1; }
/* появяването: анимация само „назад“, за да не пречи на движението при посочване */
.dcard.rv:not(.in) { opacity: 0; }
.dcard.rv.in { opacity: 1; animation: nf-label 1000ms var(--ease-emph) backwards; }
.dcard.rv.in[data-d="1"] { animation-delay: 140ms; }
.dcard.rv.in[data-d="2"] { animation-delay: 280ms; }
.dcard.rv[data-d] { transition-delay: 0s; }
.dcard:hover { transform: translateY(-8px); border-color: rgba(233, 207, 147, 0.6); box-shadow: 0 70px 110px -54px rgba(0, 0, 0, 1), 0 24px 50px -28px rgba(0, 0, 0, 0.75); }

/* горната част: бележката на свой ред, иконата под нея — нищо не се застъпва */
.dcard__top { position: relative; z-index: 1; display: grid; grid-template-rows: 44px auto; justify-items: center; align-items: center; row-gap: 32px; padding: 28px 22px 36px; }
.dcard__icon {
  width: min(54%, 184px); height: auto; aspect-ratio: 1; border-radius: 24%;
  box-shadow: 0 40px 60px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(233, 207, 147, 0.2);
  animation: float 9s var(--ease-out) infinite alternate;
  transition: transform var(--dur-slow) var(--ease-emph);
}
.dcard--bn .dcard__icon { animation-delay: -3s; }
.dcard:hover .dcard__icon { transform: rotate(-3deg) scale(1.04); }
.dcard__hand {
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--hand); font-weight: 700; font-size: 29px; line-height: 1.25; letter-spacing: 0.015em; color: var(--tone);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45); transform: rotate(-2deg);
}
.dcard__tag {
  white-space: nowrap;
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: #2A1A0E;
  padding: 7px 14px; border-radius: 999px; background: linear-gradient(160deg, #F5E3B0, #D9B670);
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.6);
}

/* пакетът: трите бижута на ветрило */
.fan { position: relative; width: min(54%, 184px); aspect-ratio: 1; }
.fan img { position: absolute; border-radius: 24%; box-shadow: 0 30px 50px -26px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(233, 207, 147, 0.22); transition: transform var(--dur-slower) var(--ease-emph); }
.fan__c { inset: 0; width: 100%; height: auto; aspect-ratio: 1; z-index: 2; }
.fan__l, .fan__r { width: 62%; height: auto; aspect-ratio: 1; top: 22%; z-index: 1; }
.fan__l { left: -22%; transform: rotate(-12deg); }
.fan__r { right: -22%; transform: rotate(12deg); }
.dcard--all:hover .fan__l { transform: translateX(-10%) rotate(-17deg); }
.dcard--all:hover .fan__r { transform: translateX(10%) rotate(17deg); }
.dcard--all:hover .fan__c { transform: translateY(-6px) scale(1.03); }

/* перленият етикет */
.dcard__label {
  position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column;
  margin: 0 12px 12px; padding: 30px clamp(22px, 2vw, 30px) 26px; border-radius: 20px; color: var(--ink);
  background:
    repeating-linear-gradient(0deg, rgba(140, 106, 46, 0.035) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(140, 106, 46, 0.03) 0 1px, transparent 1px 3px),
    linear-gradient(128deg, #FCF8F1 0%, #F4EADC 42%, #FBF5EB 58%, #EFE3D1 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset, 0 20px 40px -26px rgba(0, 0, 0, 0.7);
}
.stitch { position: absolute; left: 9px; top: 9px; width: calc(100% - 18px); height: calc(100% - 18px); overflow: visible; pointer-events: none; }
.stitch rect { fill: none; stroke: rgba(168, 128, 62, 0.62); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 8 6; }
.dcard__kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-deep); }
.dcard__name { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 2.7vw, 42px); line-height: 1.02; margin: 10px 0 10px; }
.dcard__what { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.dcard__feats { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 11px; }
.dcard__feats li { position: relative; padding-left: 24px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.dcard__feats li::before { content: '✦'; position: absolute; left: 2px; top: 2px; font-size: 12px; color: var(--gold); }
.dcard__feats--set li { padding-right: 52px; }
.dcard__feats--set li span { position: absolute; right: 0; top: 0; font-family: var(--display); font-size: 17px; color: var(--muted); }
.dcard__feats b { font-weight: 600; color: var(--ink); }
.dcard__buy {
  margin-top: auto; padding-top: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  background: repeating-linear-gradient(90deg, rgba(168, 128, 62, 0.5) 0 8px, transparent 8px 14px) top / 100% 1.4px no-repeat;
}
.dcard__price { font-family: var(--display); font-size: 40px; line-height: 1; display: flex; align-items: baseline; gap: 8px; }
.dcard__price small { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.dcard__price s { font-family: var(--sans); font-size: 16px; color: var(--muted); }
.dcard__founders { font-size: 13.5px; font-weight: 600; color: #2A1A0E; padding: 7px 13px; border-radius: 999px; background: linear-gradient(160deg, #F5E3B0, #D9B670); }
.dcard__buy .btn { min-height: 46px; padding: 0 22px; font-size: 15px; }
.dcard--all .dcard__buy .btn { flex: 1 0 100%; }
.dnote { margin: 30px 0 0; font-size: 15px; color: var(--cream-3); text-align: center; }
.dnote::before { content: '✦'; color: var(--gold); margin-right: 10px; font-size: 11px; }

/* ——— сметката ——— */
.smetka { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: clamp(36px, 6vw, 100px); align-items: start; }
.smetka h2 { font-size: clamp(40px, 4.6vw, 68px); margin: 18px 0 20px; }
.smetka .lead { color: var(--ink-2); max-width: 30em; margin: 0; }
.howto { list-style: none; counter-reset: h; margin: 40px 0 0; padding: 0; display: grid; gap: 18px; max-width: 30em; }
.howto li { counter-increment: h; display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: baseline; color: var(--ink-2); font-size: 16.5px; }
.howto li::before { content: counter(h); font-family: var(--hand); font-weight: 700; font-size: 34px; line-height: 1; color: var(--gold-deep); }
.howto b { color: var(--ink); font-weight: 600; }

.receipt-wrap { filter: drop-shadow(0 30px 34px rgba(60, 40, 20, 0.2)) drop-shadow(0 2px 3px rgba(60, 40, 20, 0.12)); }
.receipt {
  --tooth: 18px;
  position: relative; padding: 30px 30px calc(34px + var(--tooth) / 2);
  background: #FCF9F4; border-radius: 18px 18px 0 0;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--tooth) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--tooth) 100%;
}
.receipt__head { display: flex; align-items: center; gap: 10px; padding-bottom: 18px; margin-bottom: 8px; background: repeating-linear-gradient(90deg, var(--line) 0 7px, transparent 7px 12px) bottom / 100% 1.4px no-repeat; }
.receipt__head img { width: 30px; height: 30px; border-radius: 50%; }
.receipt__brand { font-family: var(--display); font-size: 22px; line-height: 1; }
.receipt__no { margin-left: auto; font-family: var(--hand); font-weight: 700; font-size: 26px; color: var(--gold-deep); }
.receipt fieldset { border: 0; margin: 18px 0 0; padding: 0; min-width: 0; }
.receipt legend { padding: 0; margin-bottom: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.opts { display: grid; gap: 8px; }
.opts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; min-height: 62px;
  padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: #FFFDF9;
  transition: border-color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-base) var(--ease-out);
}
.opt img { grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 8px; }
.opt b { font-weight: 600; font-size: 15px; line-height: 1.2; }
.opt small { grid-column: 2; font-size: 13px; color: var(--muted); }
.opt span:not(:has(img)) b, .opt span:not(:has(img)) small { grid-column: 1 / -1; }
.opt:hover span { border-color: var(--gold); }
.opt input:checked + span { border-color: var(--ink); background: #F6EFE6; box-shadow: 0 0 0 1px var(--ink) inset; }
.opt input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.lines { list-style: none; margin: 24px 0 0; padding: 18px 0 0; display: grid; gap: 10px; min-height: 64px; background: repeating-linear-gradient(90deg, var(--line) 0 7px, transparent 7px 12px) top / 100% 1.4px no-repeat; }
.lines li { display: flex; align-items: baseline; gap: 8px; font-size: 16px; animation: nf-fade 360ms var(--ease-out) both; }
.lines li::after { content: ''; order: 1; flex: 1; border-bottom: 1.5px dotted var(--line); transform: translateY(-4px); }
.lines .l__n { order: 0; }
.lines .l__p { order: 2; font-family: var(--display); font-size: 18px; white-space: nowrap; }
.lines .l__p s { font-family: var(--sans); font-size: 14px; color: var(--muted); margin-right: 6px; }
.lines .l__n small { display: block; font-size: 13px; color: var(--muted); }
.lines .is-set .l__n { font-weight: 600; }
.lines .is-set .l__n::before { content: '✦ '; color: var(--gold); font-size: 12px; }

.total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 22px; padding-top: 16px; border-top: 1.5px solid var(--ink); }
.total__l { font-size: 13px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.total__v { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--display); font-size: 58px; line-height: 1; }
.total__u { font-size: 0.5em; color: var(--gold-deep); }
.rodo { display: inline-flex; overflow: hidden; height: 1em; line-height: 1; }
.rodo__col { display: inline-block; height: 1em; overflow: hidden; }
.rodo__col { transition: opacity var(--dur-base) var(--ease-out); }
.rodo__col.is-blank { opacity: 0; }
.rodo__strip { display: flex; flex-direction: column; will-change: transform; }
.rodo__strip span { height: 1em; line-height: 1; text-align: center; }
.founders { margin: 10px 0 0; text-align: right; font-size: 14px; color: var(--ink-2); }
.founders b { display: inline-block; margin-left: 6px; font-weight: 600; color: #2A1A0E; padding: 4px 11px; border-radius: 999px; background: linear-gradient(160deg, #F5E3B0, #D9B670); }
.hint { margin: 16px 0 0; min-height: 1.3em; font-family: var(--hand); font-weight: 600; font-size: 24px; line-height: 1.2; color: var(--gold-deep); }
.hint button {
  margin-left: 6px; font: 600 14px/1 var(--sans); letter-spacing: 0.02em; color: var(--ink); cursor: pointer;
  background: none; border: 1px solid var(--ink); border-radius: 999px; padding: 7px 12px; vertical-align: 3px;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.hint button:hover { background: var(--ink); color: var(--pearl); }
.receipt__ask { width: 100%; margin-top: 20px; }
.receipt__ask[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }

/* ——— телефон и таблет ——— */
@media (max-width: 1040px) {
  .dcards { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-left: auto; margin-right: auto; }
  .smetka { grid-template-columns: minmax(0, 1fr); }
  .receipt-wrap { max-width: 560px; }
}
@media (max-width: 1040px) {
  .dcard__icon { width: min(50%, 180px); }
}
@media (max-width: 480px) {
  .receipt { padding-left: 20px; padding-right: 20px; }
  .opts--3 { grid-template-columns: minmax(0, 1fr); }
  .opt span { min-height: 52px; }
  .total__v { font-size: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .dcard, .dcard:hover { transform: none; }
}

/* ——— „Как ще ми пишеш?“ — избор вместо директно отваряне на пощата ——— */
.cc { padding: 0; border: 0; background: transparent; max-width: min(460px, calc(100vw - 28px)); width: 100%; color: var(--ink); }
.cc::backdrop { background: rgba(20, 12, 8, 0.62); backdrop-filter: blur(3px); }
.cc[open] { animation: nf-label 380ms var(--ease-emph); }
.cc__card { position: relative; margin: 0; padding: 30px 26px 22px; border-radius: 18px;
  background: repeating-linear-gradient(0deg, rgba(140, 106, 46, 0.035) 0 1px, transparent 1px 3px), linear-gradient(128deg, #FCF8F1 0%, #F4EADC 45%, #FBF5EB 60%, #EFE3D1 100%);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8); }
.cc__stitch { position: absolute; left: 9px; top: 9px; width: calc(100% - 18px); height: calc(100% - 18px); overflow: visible; pointer-events: none; }
.cc__stitch rect { fill: none; stroke: rgba(168, 128, 62, 0.6); stroke-width: 1.4; stroke-dasharray: 8 6; stroke-linecap: round; }
.cc__x { position: absolute; right: 16px; top: 12px; width: 40px; height: 40px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; border-radius: 50%; }
.cc__x:hover { background: rgba(140, 106, 46, 0.1); }
.cc__t { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.1; margin: 0 40px 6px 0; }
.cc__sub { margin: 0 0 14px; font-size: 14.5px; color: var(--muted); }
.cc__msg { margin: 0 0 16px; padding: 12px 14px; max-height: 150px; overflow: auto; white-space: pre-wrap; font: 14px/1.5 var(--sans); color: var(--ink-2);
  background: #FFFDF9; border: 1px solid var(--line); border-radius: 12px; }
.cc__opts { display: grid; gap: 8px; }
.cc__opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 14px; background: #FFFDF9;
  text-align: left; text-decoration: none; color: var(--ink); font: inherit; cursor: pointer; transition: border-color var(--dur-fast), background var(--dur-fast); }
.cc__opt:hover, .cc__opt:focus-visible { border-color: var(--gold); background: #FFF8EC; }
.cc__opt b { display: block; font-size: 15.5px; font-weight: 600; }
.cc__opt small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.cc__ic { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; color: #2A1A0E;
  background: linear-gradient(160deg, #F5E3B0, #D9B670); }
.cc__ic--ig { background: radial-gradient(circle at 30% 110%, #FDF497 0%, #FD5949 45%, #D6249F 60%, #285AEB 90%); }
.cc__ic--ig, .cc__ic--tg { position: relative; }
.cc__ic--ig::before { content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; transform: translate(-50%, -50%); border: 2.2px solid #fff; border-radius: 6px; }
.cc__ic--ig::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; transform: translate(-50%, -50%); border: 2.2px solid #fff; border-radius: 50%; }
.cc__ic--tg { background: #2AABEE; }
.cc__ic--tg::before { content: ''; width: 0; height: 0; border-left: 15px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px; transform: rotate(-24deg); }
.cc__note { margin: 14px 0 0; text-align: center; font-size: 13.5px; color: var(--muted); }
.cc__note.is-ok { color: #3F6B4E; font-weight: 600; }
