/*
  Paika landing r8 — intro + P·O·S·T accordion cards (2026-10-31).
  Colors come only from the shared tokens (/brand/paika-tokens.css, same file as
  every other page): one ink background, dark by default, the visitor's app theme
  otherwise. Yellow only on the logo, the one primary button, focus and the open card
  border (control/standards/UI-DESIGN-RULES.md). One motion: the card width change
  (off for prefers-reduced-motion).
*/
:root {
  --gutter: clamp(1rem, 4vw, 3rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--font-sans);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }
.site-footer :focus-visible, .pcard :focus-visible { outline-color: var(--brand); }
.pcard { --sub: var(--card-sub); --edge: var(--card-fg); color: var(--card-fg); }
.pcard[data-tone="brand"] :focus-visible { outline-color: var(--card-brand-fg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.shell { width: min(100% - 2 * var(--gutter), 75rem); margin-inline: auto; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  padding: .6rem 1rem; background: var(--text); color: var(--bg); text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand-link { display: block; width: 7.5rem; padding-block: .5rem; }
.nav-list { display: flex; align-items: center; gap: clamp(.75rem, 2.5vw, 1.5rem); font-size: .9375rem; }
.nav-list a:not(.pk-btn) { display: inline-flex; align-items: center; min-height: var(--control-h); color: var(--text); text-decoration: none; }
.nav-list a:not(.pk-btn):hover { text-decoration: underline; text-underline-offset: .3em; }

main { flex: 1; }
main:focus { outline: none; }

.intro { padding-block: clamp(3rem, 9vw, 6rem) clamp(2rem, 5vw, 3.5rem); }
.eyebrow { font: italic 900 .8125rem/1.2 var(--font-brand); letter-spacing: .14em; color: var(--muted); margin-bottom: var(--space-5); }
.intro h1 { font-size: clamp(2.125rem, 6vw, 3.5rem); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.lead { margin-top: var(--space-5); max-width: 36rem; font-size: 1.125rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-7); }

/* P·O·S·T accordion: one card open, the others are narrow strips. */
.products { padding-bottom: clamp(3rem, 8vw, 5rem); }
.acc { display: flex; gap: var(--space-3); height: 27.5rem; }
.pcard {
  position: relative; flex: 0 0 6rem; min-width: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--panel-radius);
  transition: flex-basis .6s cubic-bezier(.22, 1, .36, 1), border-color .2s, transform .35s cubic-bezier(.22, 1, .36, 1);
}
.pcard:hover { border-color: var(--line-strong); }
.pcard[data-tone="brand"] { background: var(--card-brand); color: var(--card-brand-fg); --sub: var(--card-brand-fg); --edge: var(--card-brand-fg); }
.pcard[data-tone="p"] { background: var(--card-p); }
.pcard[data-tone="o"] { background: var(--card-o); }
.pcard[data-tone="s"] { background: var(--card-s); }
.pcard[data-tone="t"] { background: var(--card-t); }
.pcard[data-open="true"] { flex: 1 1 auto; border-color: var(--edge); }
.strip {
  position: absolute; inset: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 1.25rem 0; background: none; border: 0; color: inherit; font: inherit; cursor: pointer;
  transition: opacity .2s;
}
.strip .big { font-size: 3.5rem; font-weight: 800; line-height: 1; transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.vbrand { writing-mode: vertical-rl; transform: rotate(180deg); font: italic 900 1.5rem/1 var(--font-brand); letter-spacing: .03em; margin-block: auto; }
.vbrand u { text-decoration-thickness: .09em; text-underline-offset: .12em; }
.strip .name { writing-mode: vertical-rl; font-size: .8125rem; letter-spacing: .06em; color: var(--sub); transition: letter-spacing .35s, transform .35s cubic-bezier(.22, 1, .36, 1); }
.pcard[data-open="true"] .strip { opacity: 0; pointer-events: none; }
/* The open card's strip is invisible but still the arrow-key anchor: show focus on the card. */
.pcard:has(.strip:focus-visible) { outline: 2px solid var(--text); outline-offset: 2px; }
.pbody {
  position: absolute; inset: 0; min-width: 34rem; padding: 1.75rem 2rem;
  visibility: hidden; opacity: 0; transition: opacity .25s .15s, visibility 0s .4s;
}
.pcard[data-open="true"] .pbody { visibility: visible; opacity: 1; transition: opacity .25s .15s; }
.pbody h3 { font-size: 1.75rem; line-height: 1.25; }
.pbody .sub { margin-top: .25rem; color: var(--sub); }
.chip { display: inline-block; vertical-align: middle; padding: .1rem .65rem; border: 1px solid currentColor; border-radius: 99px; font-size: .75rem; font-weight: 600; color: var(--sub); }
.brand-line { margin-top: var(--space-6); max-width: 34rem; font-size: 1.375rem; line-height: 1.5; }
.hint { margin-top: var(--space-6); font-size: .8125rem; color: var(--sub); }
.feat { margin-top: var(--space-5); }
.feat li { display: flex; gap: .75rem; padding: .55rem 0; border-top: 1px solid currentColor; font-size: .9375rem; }
.feat b { flex: 0 0 8.5rem; font-weight: 600; }
.feat span { color: var(--sub); }
.more { display: inline-block; margin-top: var(--space-4); font-weight: 600; text-underline-offset: .3em; }

.others { margin-top: var(--space-6); font-size: .875rem; color: var(--muted); }
.others a { color: var(--text); text-underline-offset: .3em; }
.status-note { margin-top: var(--space-3); font-size: .8125rem; line-height: 1.55; color: var(--muted); }

.site-footer { background: var(--surface); border-top: 1px solid var(--line); color: var(--text); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block: 1.5rem; }
.footer-note { font-size: .875rem; color: var(--muted); }
.footer-login { font-size: .875rem; font-weight: 600; text-underline-offset: .3em; }

/* Narrow screens: vertical accordion. */
@media (max-width: 46rem) {
  .acc { flex-direction: column; height: auto; gap: var(--space-2); }
  .pcard { flex: none; height: 4rem; transition: height .3s, border-color .2s; }
  .pcard[data-open="true"] { flex: none; height: auto; }
  .strip { flex-direction: row; justify-content: flex-start; gap: var(--space-4); padding: 0 1.25rem; align-items: center; }
  .strip .big { font-size: 2rem; }
  .strip .name { writing-mode: horizontal-tb; }
  .vbrand { writing-mode: horizontal-tb; transform: none; margin: 0; }
  .pbody { position: static; min-width: 0; padding: 1.25rem; display: none; }
  .pcard[data-open="true"] .pbody { display: block; }
  .pcard[data-open="true"] .strip { display: none; }
  .feat li { flex-direction: column; gap: .1rem; }
  .feat b { flex: none; }
}

/* Motion (off under prefers-reduced-motion): staggered entrance, hover/focus reaction, staggered body. */
@media (prefers-reduced-motion: no-preference) {
  .pcard { animation: card-in .7s cubic-bezier(.22, 1, .36, 1) both; }
  .pcard:nth-child(2) { animation-delay: .08s; }
  .pcard:nth-child(3) { animation-delay: .16s; }
  .pcard:nth-child(4) { animation-delay: .24s; }
  .pcard:nth-child(5) { animation-delay: .32s; }
  .pcard[data-open="false"]:hover { transform: translateY(-4px); }
  .pcard[data-open="false"]:hover .big, .strip:focus-visible .big { transform: scale(1.12); }
  .pcard[data-open="false"]:hover .name { letter-spacing: .12em; }
  .pcard[data-open="true"] .pbody > * { animation: rise .55s cubic-bezier(.22, 1, .36, 1) both; }
  .pcard[data-open="true"] .pbody > :nth-child(1) { animation-delay: .12s; }
  .pcard[data-open="true"] .pbody > :nth-child(2) { animation-delay: .2s; }
  .pcard[data-open="true"] .pbody > :nth-child(3) { animation-delay: .28s; }
  .pcard[data-open="true"] .pbody > :nth-child(4) { animation-delay: .36s; }
  .pcard[data-open="true"] .pbody > :nth-child(5) { animation-delay: .44s; }
}
@keyframes card-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .pcard, .pbody, .strip, .strip .big, .strip .name { transition: none; animation: none; }
}

@media (max-width: 30rem) {
  .brand-link { width: 6.25rem; }
}

@media (forced-colors: active) {
  .pcard, .pk-btn { border: 1px solid CanvasText; }
}
