/* =========================================================================
   Refinement layer: loaded after site.css and app.css on every page.
   It changes type, surfaces, controls and motion only. Layout, structure
   and the colour palette (charcoal + lavender accent) are left untouched.

   Inspired by kosmosjestdziwny.pl: a geometric display face over a calm
   humanist body face, generous line height, pill controls with a soft
   coloured glow, hairline-bordered cards, star glyph eyebrows, a faint
   star-chart backdrop and slow, eased entrance motion.
   ========================================================================= */

:root {
  --display: "Archivo", "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Sora", "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --lift: 0 22px 46px -30px rgba(0, 0, 0, .8);
  --accent-glow: rgba(228, 217, 255, .55);
  --hair-accent: rgba(228, 217, 255, .34);
}

/* ---------- typography ---------- */
html { scrollbar-color: rgba(228, 217, 255, .32) transparent; scrollbar-width: thin; }
body {
  font-size: 15.5px;
  line-height: 1.7;
  letter-spacing: -.006em;
  font-feature-settings: "kern", "liga", "calt";
  hanging-punctuation: first;
}
::selection { background: rgba(228, 217, 255, .38); color: #fff; }
p { text-wrap: pretty; }

/* display face for every heading-like element */
.display, .title, .pcard h3, .panel h3, .param .name, .req h3, .script-head h3, .art-card h3,
.orbit .core, .price-card .price, .stat .num, .kpi .val, .auth-card h1, .topbar h1, .metric .val,
.plan-hero .plan-name, .product .body h2, .plan .pp, .empty h3, .modal h2, .card-head h2,
.brand b, .sheet a, .marquee-track span, .legal-card h1, .legal-card h2, .section-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 118%; /* Archivo's width axis: the wide, geometric look of the reference */
}
.display { font-weight: 700; font-size: clamp(34px, 5vw, 68px); line-height: 1.06; letter-spacing: -.034em; text-wrap: balance; }
.title { font-size: clamp(26px, 3.3vw, 40px); line-height: 1.12; letter-spacing: -.028em; text-wrap: balance; }
.pcard h3, .product .body h2 { letter-spacing: -.028em; }
.panel h3, .param .name, .req h3, .script-head h3, .art-card h3, .card-head h2, .empty h3, .modal h2 { letter-spacing: -.02em; }
.lead { line-height: 1.75; letter-spacing: -.004em; }
.brand b { font-size: 16px; letter-spacing: .005em; font-weight: 700; }
.price-card .price, .kpi .val, .metric .val, .stat .num, .plan .pp { font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.price-card .price { font-size: 54px; }
.stat .num { font-size: 24px; }
.kpi .val { font-size: 34px; }
.metric .val { font-size: 27px; }
.pcard h3 { font-size: 24px; }
.plan-hero .plan-name { font-size: clamp(26px, 3vw, 36px); }
.topbar h1 { font-size: clamp(26px, 3.2vw, 36px); }
.auth-card h1 { font-size: clamp(28px, 5.4vw, 34px); }
.marquee-track span { font-weight: 600; letter-spacing: -.015em; }
.sheet a { font-weight: 700; letter-spacing: -.02em; }

/* eyebrow: small caps with a star glyph, like the reference */
.kicker {
  font: 600 11.5px/1 var(--sans);
  letter-spacing: .17em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: .75em;
}
.kicker::before {
  content: "✦";
  font-size: 1.15em;
  letter-spacing: 0;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(228, 217, 255, .7);
  animation: twinkle 5s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .95; transform: scale(1); } 50% { opacity: .55; transform: scale(.82) rotate(18deg); } }

.crumbs { font-size: 12.5px; letter-spacing: .03em; }
.crumbs a { transition: color .25s; }
.crumbs a:hover { color: var(--accent-ink); }
.hint, .note, .caption { line-height: 1.65; }
code, kbd { font-family: var(--mono); }
.field label, .field > label { font-weight: 600; letter-spacing: .005em; }

/* ---------- surfaces ---------- */
.glass:not(.btn, .brand, .nav, .menu-btn, .account-pill, .sheet, .seg, .footbar, .chip) {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, 0) 38%);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, .045), var(--lift);
}
.frame.glass, .pcard.glass, .price-card.glass, .auth-card.glass { border-radius: var(--r-xl); }

/* interactive cards: lift, accent hairline and a soft halo */
.pcard, .stat, .art-card, .step, .quick a, .quick button, .kpi, .plan, .tile, .dl, .product, .panel, .param, .faq details {
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), background-color .35s, border-color .35s;
}
.pcard:hover, .stat:hover, .art-card:hover, .step:hover, .kpi:hover, .param:hover {
  box-shadow: inset 0 0 0 1px var(--hair-accent), inset 0 1px 0 rgba(255, 255, 255, .06), 0 28px 56px -32px rgba(228, 217, 255, .32);
}
.quick a:hover, .quick button:hover, .plan:hover { box-shadow: inset 0 0 0 1px var(--hair-accent); }
.faq details { transition: box-shadow .35s var(--ease-out), background-color .35s; }
.faq details[open] { box-shadow: inset 0 0 0 1px var(--hair-accent); }
.faq summary { transition: color .25s; }
.faq summary:hover { color: var(--accent-ink); }
.frame, .ba, .warp-stage { transition: box-shadow .5s var(--ease-out); }
.chip { transition: background-color .3s, box-shadow .3s, transform .3s var(--ease-out); }
.chip:hover { background: rgba(255, 255, 255, .09); }
.badge { letter-spacing: .01em; font-weight: 600; }

/* ---------- buttons and controls ---------- */
.btn, .btn.glass, .btn-sm, .btn-xs { --g-r: 999px; border-radius: 999px; }
.btn {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -.004em;
  transition: transform .32s var(--ease-out), box-shadow .32s var(--ease-out), background-color .3s, color .25s, filter .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.975); }
.btn:focus-visible, .seg button:focus-visible, .cur button:focus-visible, .reveal-btn:focus-visible {
  outline: 2px solid rgba(228, 217, 255, .95);
  outline-offset: 3px;
}
.btn-light {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 58%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 14px 30px -14px var(--accent-glow);
}
.btn-light:hover {
  background-color: #f1eaff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 20px 38px -14px rgba(228, 217, 255, .8);
}
.btn.glass { box-shadow: inset 0 0 0 1px var(--line-2), 0 12px 26px -20px rgba(0, 0, 0, .9); }
.btn.glass:hover { box-shadow: inset 0 0 0 1px var(--hair-accent), 0 16px 32px -18px rgba(228, 217, 255, .3); }
.btn .ico-arrow { transition: transform .3s var(--ease-out); }
.btn:hover .ico-arrow { transform: translate(2px, -2px); }
.btn-danger { box-shadow: inset 0 0 0 1px rgba(239, 106, 98, .4); }
.btn[disabled], .btn:disabled { transform: none; box-shadow: none; filter: saturate(.7); }

.nav ul a, .sheet a, .menu-btn, .account-pill { transition: color .25s, background-color .3s, box-shadow .3s, transform .3s var(--ease-out); }
.nav ul a:hover { background: rgba(255, 255, 255, .06); }
.nav ul a[aria-current=page] { box-shadow: inset 0 0 0 1px rgba(228, 217, 255, .28); }
.brand { transition: background-color .3s, box-shadow .3s; }
.brand:hover { box-shadow: inset 0 0 0 1px var(--hair-accent); }
.brand-mark { transition: transform .5s var(--ease-out); }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.06); }

/* segmented and currency switches */
.seg button, .cur button { transition: color .25s, background-color .3s; }
.seg-ind { transition: transform .45s var(--ease-out), width .45s var(--ease-out); }

/* form controls (account and dashboard) */
.input, .select, select.input, textarea.input {
  border-radius: 14px;
  transition: border-color .25s, box-shadow .3s var(--ease-out), background-color .25s;
}
.input:hover { border-color: rgba(255, 255, 255, .22); }
.input:focus, .input:focus-visible {
  outline: none;
  border-color: rgba(228, 217, 255, .75);
  box-shadow: 0 0 0 4px rgba(228, 217, 255, .16);
}
.check input, input[type=checkbox] { accent-color: var(--accent); }
.reveal-btn { transition: color .25s, background-color .25s; }

/* dashboard navigation */
.side-nav a { transition: color .25s, background-color .3s, box-shadow .3s; }
.side-nav a:hover { background: rgba(255, 255, 255, .05); }
.tabbar a, .side-nav a[aria-current=page] { transition: color .25s, background-color .3s; }
.rows .r { transition: background-color .25s; }
.rows .r:hover { background: rgba(255, 255, 255, .025); }

/* range sliders (warp demo, before/after) */
input[type=range]::-webkit-slider-thumb { transition: transform .25s var(--ease-out), box-shadow .25s; }
input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(228, 217, 255, .28); }
.ba .knob { transition: transform .35s var(--ease-out); }

/* ---------- atmosphere: a very faint star chart behind everything ---------- */
.ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-radial-gradient(circle at 84% 4%, transparent 0 17vmin, rgba(228, 217, 255, .055) calc(17vmin + 1px), transparent calc(17vmin + 2px) 30vmin),
    radial-gradient(rgba(255, 255, 255, .075) 1px, transparent 1.5px) 0 0 / 46px 46px;
  -webkit-mask-image: radial-gradient(75% 65% at 72% 6%, #000 0%, rgba(0, 0, 0, .55) 45%, transparent 78%);
  mask-image: radial-gradient(75% 65% at 72% 6%, #000 0%, rgba(0, 0, 0, .55) 45%, transparent 78%);
  opacity: .9;
}
/* hairline between sections, fading at both ends */
main > section + section {
  background-image: linear-gradient(90deg, transparent, rgba(228, 217, 255, .2) 50%, transparent);
  background-size: min(1100px, 88%) 1px;
  background-repeat: no-repeat;
  background-position: center top;
}
.site-head .wrap, .footbar { transition: transform .4s var(--ease-out); }
footer .footbar { box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, .04); }
.footbar a { transition: color .25s; }
.footbar a:hover { color: var(--accent-ink); }

/* ---------- motion ---------- */
@keyframes rise-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-copy > :not([data-reveal]) { animation: rise-in .95s var(--ease-out) both; }
.hero-copy > :nth-child(2) { animation-delay: .07s; }
.hero-copy > :nth-child(3) { animation-delay: .14s; }
.hero-copy > :nth-child(4) { animation-delay: .21s; }
.hero-copy > :nth-child(5) { animation-delay: .28s; }
.hero-copy > :nth-child(6) { animation-delay: .35s; }
.hero-copy > :nth-child(7) { animation-delay: .42s; }
.auth-card, .legal-card { animation: rise-in .8s var(--ease-out) both; }

@media (max-width: 640px) {
  .display { font-size: clamp(34px, 10vw, 46px); }
  .title { font-size: clamp(26px, 7.4vw, 34px); }
  .price-card .price { font-size: 50px; }
  .ambient::before { opacity: .6; }
}
@media (prefers-reduced-motion: reduce) {
  .kicker::before, .hero-copy > *, .auth-card, .legal-card { animation: none !important; }
  .btn, .pcard, .stat, .brand-mark { transition: none; }
}

/* Sora is wider than the previous body face: keep helper lines in cards compact. */
.quick span { font-size: 12.5px; line-height: 1.45; }
.stat .num + *, .stat small, .kpi .note, .metric .note { font-size: 12.5px; }
.nav ul a { letter-spacing: -.01em; }

/* The footer now carries six links: let them wrap instead of widening the page on phones. */
.footbar nav { flex-wrap: wrap; justify-content: center; gap: 8px 18px; min-width: 0; }
.footbar > * { min-width: 0; max-width: 100%; }

/* Long inline code such as repository URLs must wrap on narrow screens. */
code { overflow-wrap: anywhere; word-break: break-word; }

/* Dashboard tab bar on phones: five equal columns that may shrink below their label width. */
@media (max-width: 900px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .side-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .side-nav a { min-width: 0; font-size: 10.5px; letter-spacing: -.02em; padding-inline: 2px; }
  .side-nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Alerts: text and action wrap together on narrow screens instead of widening the page. */
.alert { flex-wrap: wrap; row-gap: 10px; min-width: 0; }
.alert .grow { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }

/* The wide display face must be allowed to shrink or wrap inside flex rows and grid cards. */
.script, .script > *, .script-head, .script-head > div { min-width: 0; }
.script-head { flex-wrap: wrap; row-gap: 6px; }
.script-head h3, .pcard h3, .panel h3, .art-card h3, .param .name { overflow-wrap: anywhere; min-width: 0; }

/* Currency switch: breathing room above and below */
.price-card .cur { margin: 22px auto 16px; }

/* Price card: calmer list, clearer buttons, roomier note */
.incl { margin-bottom: 30px; }
.incl li { font-size: 14.5px; font-weight: 400; color: var(--ink-2); padding: 13px 0; }
.price-card .btn-block { padding-block: 15px; }
.price-card .btn.glass.btn-block { margin-top: 12px !important; background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.price-card .btn.glass.btn-block:hover { background: rgba(228, 217, 255, .08); }
.price-card .note { margin-top: 20px; font-size: 12.5px; line-height: 1.65; color: var(--ink-3); }
