/* ==========================================================================
   mskerba.com — core stylesheet
   Palette derived from the real app icons:
     Aura     cream #F2E8DA / ink #1B1815 / marketing violet #8B5CF6
     Poised   amber #EDA841 / navy #11182D
     Plateful orange #EA712E / cream #FAF2E3
   Shell is deliberately COOL grey so the warm icons stay the loudest thing
   on the page.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  --paper:        #EEF0F3;
  --paper-deep:   #E4E7EC;
  --card:         #FFFFFF;
  --ink:          #0F1216;
  --ink-soft:     #3A414B;
  --muted:        #5A626E;
  --line:         #D9DEE5;
  --line-soft:    #E8EBEF;

  --aura:         #8B5CF6;
  --aura-wash:    #F5F1FE;
  --poised:       #D9922E;
  --poised-wash:  #FCF5E9;
  --plateful:     #EA712E;
  --plateful-wash:#FEF3EC;

  --accent:       var(--ink);
  --wash:         var(--paper-deep);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
          "Inter", "Roboto", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Menlo", monospace;

  --measure: 68ch;
  --shell: 1140px;
  --radius: 18px;

  --shadow-sm: 0 1px 2px rgba(15,18,22,.05), 0 2px 8px rgba(15,18,22,.04);
  --shadow-md: 0 2px 4px rgba(15,18,22,.05), 0 12px 32px rgba(15,18,22,.09);

  --step: clamp(1rem, .6rem + 1.6vw, 1.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #0D0F12;
    --paper-deep: #14171C;
    --card:       #16191F;
    --ink:        #EEF1F5;
    --ink-soft:   #C2C8D2;
    --muted:      #949CAA;
    --line:       #262B33;
    --line-soft:  #1E222A;

    --aura-wash:     #1A1428;
    --poised-wash:   #211B10;
    --plateful-wash: #23150D;
    --wash:          var(--paper-deep);

    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 2px 4px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.45);
  }
}

/* --- 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: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* --- Type scale --------------------------------------------------------- */
h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 1.4rem + 4.4vw, 4.35rem); }
h2 { font-size: clamp(1.6rem, 1.15rem + 1.9vw, 2.5rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); letter-spacing: -0.02em; }
h4 { font-size: 1.02rem; letter-spacing: -0.01em; font-weight: 700; }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.08rem, 1rem + .5vw, 1.35rem);
  line-height: 1.5;
  color: var(--ink-soft);
  letter-spacing: -0.012em;
  max-width: 46ch;
  text-wrap: pretty;
}

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.1rem;
  font-weight: 500;
}

/* --- Layout ------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.5rem);
}
.band { padding-block: clamp(3.2rem, 7vw, 6.5rem); }
.band--tight { padding-block: clamp(2.2rem, 4vw, 3.4rem); }
.band--sunken { background: var(--paper-deep); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: .7rem 1.1rem; z-index: 100; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

:where(a, button, summary, input, textarea):focus-visible {
  outline: 2.5px solid var(--aura);
  outline-offset: 3px;
  border-radius: 6px;
}

/* --- Masthead ----------------------------------------------------------- */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.masthead__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; height: 62px;
}
.wordmark {
  font-weight: 800; font-size: 1.06rem; letter-spacing: -0.035em;
  text-decoration: none; display: inline-flex; align-items: center; gap: .5rem;
}
.wordmark__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); flex: none;
}
.navlinks { display: flex; align-items: center; gap: clamp(.9rem, 2.4vw, 1.7rem); }
.navlinks a {
  text-decoration: none; font-size: .93rem; font-weight: 500;
  color: var(--muted); transition: color .18s ease;
}
.navlinks a:hover { color: var(--ink); }
.navlinks a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .55rem;
  font: inherit; font-size: .96rem; font-weight: 600; letter-spacing: -0.01em;
  padding: .78rem 1.35rem;
  border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .16s ease, box-shadow .18s ease,
              background-color .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--ink); color: var(--paper);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn--brand {
  background: var(--accent); color: #fff; box-shadow: var(--shadow-sm);
}
.btn--brand:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn--ghost {
  background: transparent; color: var(--ink); border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink); background: var(--card); }
.btn__ico { width: 18px; height: 18px; flex: none; }
.btnrow { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }

/* --- Status pill -------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-size: .68rem; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase;
  padding: .32rem .68rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
  background: var(--card); white-space: nowrap;
}
.pill__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill--live { color: #15803D; border-color: #BBF7D0; background: #F0FDF4; }
.pill--soon { color: var(--muted); }
@media (prefers-color-scheme: dark) {
  .pill--live { color: #4ADE80; border-color: #14532D; background: #08160D; }
}

/* --- Hero shelf (signature element) ------------------------------------- */
.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem); }
.hero h1 { max-width: 15ch; }
.hero .lede { margin-top: 1.4rem; }

.shelf {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(.7rem, 2.4vw, 1.6rem);
  margin-top: clamp(2.6rem, 6vw, 4.2rem);
  list-style: none; padding: 0;
}
.shelf__item { position: relative; }
.shelf__link {
  display: flex; flex-direction: column; align-items: center;
  gap: .85rem; text-decoration: none; padding: 1rem .4rem;
  border-radius: var(--radius);
  transition: transform .22s cubic-bezier(.2,.7,.3,1);
}
.shelf__link:hover { transform: translateY(-6px); }
.shelf__glow {
  position: relative; width: clamp(74px, 17vw, 116px); aspect-ratio: 1;
}
.shelf__glow::after {
  content: ""; position: absolute; inset: 14% 8% -14% 8%;
  background: var(--accent); filter: blur(26px); opacity: .34;
  border-radius: 50%; z-index: 0;
  transition: opacity .25s ease;
}
.shelf__link:hover .shelf__glow::after { opacity: .6; }
.shelf__glow img, .shelf__glow svg {
  position: relative; z-index: 1; width: 100%; height: 100%;
  border-radius: 23%;
  box-shadow: 0 1px 1px rgba(15,18,22,.16), 0 10px 26px rgba(15,18,22,.16);
}
.shelf__name {
  font-weight: 700; font-size: clamp(.86rem, .78rem + .35vw, 1.02rem);
  letter-spacing: -0.02em; color: var(--ink);
}

/* --- App cards ---------------------------------------------------------- */
.cards { display: grid; gap: clamp(1rem, 2.2vw, 1.5rem); }

.card {
  position: relative; overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3.4vw, 2.4rem);
  transition: border-color .2s ease, box-shadow .22s ease, transform .22s ease;
}
.card::before {
  content: ""; position: absolute; inset: 0 auto auto 0;
  height: 3px; width: 0; background: var(--accent);
  transition: width .4s cubic-bezier(.2,.7,.3,1);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card:hover::before, .card:focus-within::before { width: 100%; }

.card--app { background: var(--wash); border-color: transparent; }
.card__top {
  display: flex; align-items: flex-start; gap: 1.1rem; margin-bottom: 1.15rem;
}
.card__icon { width: 58px; height: 58px; border-radius: 23%; flex: none;
              box-shadow: 0 1px 1px rgba(15,18,22,.14), 0 6px 16px rgba(15,18,22,.12); }
.card__head { flex: 1; min-width: 0; }
.card__title {
  display: flex; align-items: center; gap: .65rem; flex-wrap: wrap;
  margin-bottom: .3rem;
}
.card__title h3 a { text-decoration: none; }
.card__title h3 a::after {
  content: ""; position: absolute; inset: 0; /* full-card click target */
}
.card__kicker {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.card__body { max-width: 58ch; color: var(--ink-soft); }
.card .btnrow { margin-top: 1.35rem; position: relative; z-index: 2; }

.feats { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: .5rem; }
.feats li {
  display: flex; gap: .6rem; align-items: baseline;
  font-size: .95rem; color: var(--ink-soft);
}
.feats li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); flex: none; transform: translateY(-2px);
}

/* --- Generic grid ------------------------------------------------------- */
.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.5rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

.tile {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.25rem, 2.6vw, 1.7rem);
}
.tile h3 { margin-bottom: .5rem; }
.tile p { color: var(--ink-soft); font-size: .96rem; margin-bottom: 0; }

.split {
  display: grid; gap: clamp(1.5rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 860px) {
  .split { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.sticky-head { position: sticky; top: 94px; }
@media (max-width: 859px) { .sticky-head { position: static; } }

/* --- App page hero ------------------------------------------------------ */
.apphero { padding-block: clamp(2.6rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem); }
.apphero__icon {
  width: clamp(88px, 20vw, 128px); border-radius: 23%;
  box-shadow: 0 2px 3px rgba(15,18,22,.15), 0 16px 40px rgba(15,18,22,.2);
  margin-bottom: 1.8rem;
}
.apphero h1 { max-width: 13ch; }
.apphero .lede { margin-top: 1.3rem; }
.apphero .btnrow { margin-top: 2rem; }

.tint { background: var(--wash); }

/* --- Prose (legal / docs) ----------------------------------------------- */
.prose { max-width: var(--measure); }
.prose h2 {
  font-size: clamp(1.32rem, 1.1rem + 1vw, 1.7rem);
  margin: 2.6rem 0 .85rem; padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.prose > h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 2rem; }
.prose h3 { margin: 1.9rem 0 .55rem; font-size: 1.06rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul, .prose ol { padding-left: 1.15rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--muted); }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose__meta {
  font-family: var(--mono); font-size: .78rem; color: var(--muted);
  letter-spacing: .02em;
}

.callout {
  background: var(--wash); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 4px var(--radius) var(--radius) 4px;
  padding: 1.2rem 1.4rem; margin: 1.6rem 0;
}
.callout p { margin-bottom: .6rem; }
.callout p:last-child { margin-bottom: 0; }
.callout h3 { margin-top: 0; }

.datatable { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .92rem; }
.datatable th, .datatable td {
  text-align: left; padding: .8rem .9rem;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.datatable th { font-weight: 700; color: var(--ink); font-size: .8rem;
                letter-spacing: .04em; text-transform: uppercase; }
.datatable td { color: var(--ink-soft); }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* --- FAQ ---------------------------------------------------------------- */
.faq { display: grid; gap: .7rem; }
.faq details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 0 1.25rem;
  transition: border-color .2s ease;
}
.faq details[open] { border-color: var(--accent); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.05rem 0;
  font-weight: 650; letter-spacing: -0.015em;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--mono); font-size: 1.3rem;
  color: var(--muted); flex: none; transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 1.15rem; color: var(--ink-soft); font-size: .96rem; }

/* --- Breadcrumb --------------------------------------------------------- */
.crumbs {
  font-size: .84rem; color: var(--muted); padding-block: 1.1rem;
  display: flex; gap: .45rem; flex-wrap: wrap; align-items: center;
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: .5; }

/* --- Contact ------------------------------------------------------------ */
.contact {
  text-align: center; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.4rem);
}
.contact h2 { margin-bottom: .8rem; }
.contact p { color: var(--ink-soft); max-width: 44ch; margin-inline: auto; }
.contact .btnrow { justify-content: center; margin-top: 1.8rem; }

/* --- Footer ------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding-block: 3rem 3.5rem; }
.footer__grid {
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  margin-bottom: 2.6rem;
}
.footer .footcol {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
  margin-bottom: .9rem;
  margin-top: 0;
}
.callout__h {
  font-size: 1.06rem; font-weight: 700; letter-spacing: -0.02em;
  margin: 0 0 .55rem; padding-top: 0; border-top: 0;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer a { text-decoration: none; font-size: .93rem; color: var(--ink-soft); }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer__base {
  display: flex; flex-wrap: wrap; gap: .8rem 1.4rem;
  justify-content: space-between; align-items: center;
  padding-top: 1.8rem; border-top: 1px solid var(--line-soft);
  font-size: .86rem; color: var(--muted);
}

/* --- Utilities ---------------------------------------------------------- */
.stack > * + * { margin-top: var(--step); }
.center { text-align: center; }
.center .lede, .center .card__body { margin-inline: auto; }
.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* --- Small layout utilities --------------------------------------------- */
.contact__icon { border-radius: 23%; margin: 0 auto 1.4rem; }
.h-gap { margin-bottom: 1.8rem; }
.p-gap { margin-bottom: 1rem; }
.band-foot { padding-bottom: clamp(3rem, 7vw, 6rem); }
.faq-gap { margin-top: 1.4rem; }
.tile--featured { border-color: var(--accent); }

/* --- Brand scopes ------------------------------------------------------- */
.t-aura     { --accent: var(--aura);     --wash: var(--aura-wash); }
.t-poised   { --accent: var(--poised);   --wash: var(--poised-wash); }
.t-plateful { --accent: var(--plateful); --wash: var(--plateful-wash); }

/* --- Entrance (respects reduced motion via the block above) ------------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.rise { animation: rise .6s cubic-bezier(.2,.7,.3,1) both; }
.rise-1 { animation-delay: .05s; }
.rise-2 { animation-delay: .13s; }
.rise-3 { animation-delay: .21s; }
.rise-4 { animation-delay: .29s; }

@media print {
  .masthead, .footer, .btnrow, .crumbs { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .prose { max-width: none; }
}
