/* Silverium.uz — design tokens and shared styles */
:root {
  --navy: #0F1C3F;
  --navy-deep: #0B1533;
  --navy-light: #17274F;
  --cream: #FEFAEE;
  --silver: #AEB4C2;
  --muted: #7F8797;
  --muted-card: #6E7585;
  --soft: #C9CED8;
  --ink: #0F1C3F;
  --ink-soft: #1C2A4E;
  --teal: #1F6F68;
  --line: rgba(254, 250, 238, 0.12);
  --line-strong: rgba(254, 250, 238, 0.28);
  --line-card: rgba(15, 28, 63, 0.18);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cream); text-decoration: none; }
a:hover { color: #D7DBE3; }
button { font: inherit; color: inherit; }
svg { display: block; }

.ground {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: radial-gradient(130% 70% at 50% 0%, var(--navy-light) 0%, var(--navy) 50%, var(--navy-deep) 100%);
}
.container { width: 100%; max-width: 560px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ---------- Header ---------- */
.site-header { height: 64px; display: flex; align-items: center; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-left: 20px; padding-right: 20px; }
.wordmark { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.wordmark__name { font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: 0.03em; line-height: 1; color: var(--cream); }
.wordmark__city { font-size: 7px; letter-spacing: 0.42em; line-height: 1; color: var(--silver); padding-left: 2px; text-transform: uppercase; }
.header-right { display: flex; align-items: center; gap: 6px; }
.lang { display: flex; align-items: center; height: 44px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; }
.lang__btn { background: none; border: 0; padding: 0 8px; line-height: 24px; color: var(--muted); cursor: pointer; border-bottom: 1px solid transparent; }
.lang__btn[aria-pressed="true"] { color: var(--cream); border-bottom-color: var(--cream); }
.icon-link { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }

/* ---------- Typography ---------- */
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 0.32em; color: var(--silver); text-transform: uppercase; }
.h1 { font-family: var(--serif); font-weight: 500; font-size: 42px; line-height: 1.08; margin: 0; color: var(--cream); text-wrap: pretty; }
.h2 { font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.1; margin: 0; color: var(--cream); text-wrap: pretty; }
.lead { font-size: 15px; line-height: 1.6; color: var(--soft); margin: 0; text-wrap: pretty; }
.text { font-size: 14px; line-height: 1.55; color: var(--silver); margin: 0; text-wrap: pretty; }
.hint { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 0; }

/* ---------- Sections ---------- */
.section { padding: 44px 0; }
.section > .container { display: flex; flex-direction: column; gap: 22px; }
.section__head { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Ornaments ---------- */
.flourish { width: 200px; height: 24px; color: var(--silver); opacity: 0.55; }
.divider { display: flex; align-items: center; justify-content: center; padding: 6px 24px; }
.hero-flourish {
  position: absolute; top: 132px; right: -84px; width: 340px; height: 136px;
  color: var(--silver); opacity: 0.32; transform: rotate(-8deg); pointer-events: none;
}
@media (min-width: 640px) { .hero-flourish { right: calc(50% - 400px); } }

/* ---------- Hero ---------- */
.hero { padding: 44px 0 40px; position: relative; }
.hero .container { display: flex; flex-direction: column; gap: 18px; }

/* ---------- Code form ---------- */
.code-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.code-field {
  display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 16px;
  border: 1px solid var(--line-strong); background: rgba(254, 250, 238, 0.05); border-radius: 3px;
}
.code-field:focus-within { border-color: rgba(254, 250, 238, 0.6); }
.code-field__no { font-family: var(--serif); font-size: 20px; line-height: 1; color: var(--silver); }
.code-field input {
  flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 0;
  font-family: var(--sans); font-size: 15px; font-weight: 500; letter-spacing: 0.18em; color: var(--cream);
  text-transform: uppercase;
}
.code-field input::placeholder { color: var(--muted); }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 12px; height: 54px; padding: 0 18px;
  background: var(--cream); color: var(--ink); border: 1px solid var(--cream); border-radius: 3px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: #F3EFE1; color: var(--ink); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn--outline { background: transparent; color: var(--cream); border-color: rgba(254, 250, 238, 0.4); }
.btn--outline:hover { background: rgba(254, 250, 238, 0.06); color: var(--cream); }
.btn--between { justify-content: space-between; }
.btn__left { display: flex; align-items: center; gap: 12px; }
.btn__meta { font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--silver); }
.btn--small { height: 48px; padding: 0 22px; }

/* ---------- Steps ---------- */
.steps { display: flex; flex-direction: column; }
.step { display: flex; gap: 18px; padding: 20px 0 22px; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step__n { font-family: var(--serif); font-size: 26px; line-height: 1; color: var(--silver); width: 34px; flex-shrink: 0; padding-top: 2px; }
.step__body { display: flex; flex-direction: column; gap: 6px; }
.step__title { font-size: 16px; font-weight: 600; color: var(--cream); }

/* ---------- Certificate card ---------- */
.cert { background: var(--cream); color: var(--ink); padding: 9px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4); }
.cert__inner { border: 1px solid rgba(15, 28, 63, 0.28); padding: 34px 24px 26px; display: flex; flex-direction: column; gap: 24px; }
.cert__head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.cert__eyebrow { font-size: 9px; font-weight: 600; letter-spacing: 0.34em; color: var(--muted-card); text-transform: uppercase; }
.cert__mark { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: 0.03em; line-height: 1; color: var(--ink); margin-top: 10px; }
.cert__city { font-size: 8px; letter-spacing: 0.42em; line-height: 1; color: var(--muted-card); text-transform: uppercase; }
.cert__flourish { width: 200px; height: 24px; color: var(--ink); opacity: 0.5; margin: 0 auto; }
.cert__flourish--small { width: 120px; height: 16px; opacity: 0.4; }
.cert__row { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.cert__code { font-size: 13px; letter-spacing: 0.16em; font-weight: 600; color: var(--ink); }
.cert__verified { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted-card); white-space: nowrap; }
.cert__verified::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.cert__field { display: flex; flex-direction: column; gap: 5px; }
.cert__label { font-size: 10px; letter-spacing: 0.26em; font-weight: 600; color: var(--muted-card); text-transform: uppercase; }
.cert__name { font-family: var(--serif); font-style: italic; font-size: 34px; line-height: 1.1; color: var(--ink); overflow-wrap: anywhere; }
.cert__date { font-family: var(--serif); font-size: 20px; line-height: 1.2; color: var(--ink); }
.cert__rule { height: 1px; background: var(--line-card); }
.cert__message { font-family: var(--serif); font-size: 21px; line-height: 1.4; color: var(--ink-soft); text-wrap: pretty; white-space: pre-line; overflow-wrap: anywhere; }
.cert__foot { display: flex; align-items: center; justify-content: space-between; margin-top: -8px; }
.cert__stamp { font-size: 10px; letter-spacing: 0.18em; color: var(--muted-card); text-transform: uppercase; }
.seal { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(15, 28, 63, 0.35); display: flex; align-items: center; justify-content: center; }
.seal__inner { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(15, 28, 63, 0.2); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 21px; line-height: 1; color: var(--ink); }
.cert[hidden] { display: none; }

/* compact preview on the landing */
.cert--preview .cert__inner { padding: 26px 22px 22px; gap: 18px; }
.cert--preview .cert__eyebrow { font-size: 8px; }
.cert--preview .cert__mark { font-size: 23px; margin-top: 8px; }
.cert--preview .cert__city { font-size: 7px; }
.cert--preview .cert__flourish { width: 150px; height: 18px; }
.cert--preview .cert__flourish--small { width: 90px; height: 12px; }
.cert--preview .cert__code { font-size: 12px; }
.cert--preview .cert__verified { font-size: 10px; }
.cert--preview .cert__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cert--preview .cert__label { font-size: 9px; }
.cert--preview .cert__name { font-size: 24px; }
.cert--preview .cert__message { font-size: 17px; line-height: 1.35; }
.cert--preview .cert__foot { margin-top: -4px; }
.cert--preview .cert__stamp { font-size: 10px; letter-spacing: 0.1em; text-transform: none; }
.cert--preview .seal { width: 34px; height: 34px; }
.cert--preview .seal__inner { width: 27px; height: 27px; font-size: 16px; }

/* ---------- Why ---------- */
.why { display: flex; flex-direction: column; gap: 12px; }
#why { padding: 32px 0; }
.why__p { font-size: 15px; line-height: 1.6; color: var(--soft); margin: 0; text-wrap: pretty; }
.why__tag { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.4; color: var(--cream); margin: 0; text-wrap: pretty; }

/* ---------- Order ---------- */
.order-actions { display: flex; flex-direction: column; gap: 10px; }
.phone { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--soft); }
.phone a { letter-spacing: 0.04em; }

/* ---------- FAQ / legal (native details) ---------- */
.faq { display: flex; flex-direction: column; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; padding: 14px 0; font-size: 15px; font-weight: 600; color: var(--cream);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex-shrink: 0; color: var(--silver); transition: transform 0.2s; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq .text { padding: 0 0 20px; }
.legal { padding: 36px 0 44px; }
.legal details summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; }
.legal details summary::-webkit-details-marker { display: none; }
.legal details summary svg { flex-shrink: 0; color: var(--silver); transition: transform 0.2s; }
.legal details[open] summary svg { transform: rotate(180deg); }
.legal__body { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.legal__body p { margin: 0; text-wrap: pretty; }
.legal__body a { color: var(--silver); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); padding: 40px 0; margin-top: auto; }
.site-footer .container { display: flex; flex-direction: column; gap: 22px; }
.site-footer .wordmark__name { font-size: 26px; }
.site-footer .wordmark__city { font-size: 8px; }
.footer-links { display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--soft); }
.footer-links a { display: flex; align-items: center; gap: 10px; min-height: 24px; }
.footer-links span { color: var(--muted); }
.copyright { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.footer-strip { margin-top: auto; padding: 22px 0; }
.footer-strip .container { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.footer-strip a { color: var(--silver); }

/* ---------- Certificate page states ---------- */
.cert-page { padding: 28px 0 40px; }
.cert-page .container { display: flex; flex-direction: column; gap: 22px; padding-left: 20px; padding-right: 20px; }
.cert-page .hint { text-align: center; }
.cert-page .hint a { color: var(--silver); }
.state[hidden] { display: none; }
.state--center { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; padding-top: 44px; }
.state__icon { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; color: var(--silver); }
.state__title { font-family: var(--serif); font-weight: 500; font-size: 36px; line-height: 1.1; margin: 0; }
.state__text { max-width: 320px; }
.state .code-form { width: 100%; }
.help { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.help .hint { font-size: 13px; }
.skeleton { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 60px 0; color: var(--muted); font-size: 13px; letter-spacing: 0.08em; }
.skeleton::before { content: ''; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); border-top-color: var(--cream); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-inline { font-size: 13px; color: #E6B8B8; text-align: center; }

/* ---------- Larger screens ---------- */
@media (min-width: 768px) {
  body { font-size: 16px; }
  .h1 { font-size: 52px; }
  .h2 { font-size: 34px; }
  .lead { font-size: 17px; }
  .text { font-size: 15px; }
  .hero { padding: 72px 0 56px; }
  .section { padding: 56px 0; }
  .hero-flourish { top: 150px; }
}
