/* Hallmark Atelier: warm paper, deep ink, hairlines, and restrained slate. */
:root {
  --paper: #f2efe8;
  --paper-2: #e8e3d9;
  --white: #faf8f3;
  --ink: #302b25;
  --muted: #71695f;
  --blue: #455d6a;
  --atelier-rule: #c9c1b4;
  --atelier-card: #f8f6f0;
  --nav-height: 76px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
}

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 10px);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  touch-action: auto;
}

::selection {
  background: #d7d2c7;
  color: var(--ink);
}

:focus-visible {
  outline-color: var(--blue);
  outline-offset: 4px;
}

.top {
  position: sticky;
  top: 0;
  z-index: 100;
  isolation: isolate;
  min-height: var(--nav-height);
  padding: 10px clamp(20px, 5vw, 72px);
  color: var(--ink);
  background: var(--paper);
  border-bottom: 1px solid var(--atelier-rule);
  pointer-events: auto;
}

.top.light {
  color: var(--ink);
}

.top .logo,
.top.light .logo {
  height: 38px;
  filter: invert(1);
}

.top nav {
  gap: clamp(16px, 3vw, 36px);
  font-size: 0.88rem;
}

.top nav a {
  color: var(--muted);
  opacity: 1;
  text-underline-offset: 5px;
}

.top nav a:hover,
.top nav a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.menu-toggle {
  display: none;
}

.menu-icon {
  display: grid;
  gap: 4px;
  width: 16px;
}

.menu-icon i {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform 180ms ease;
}

.menu-open .menu-icon i:first-child {
  transform: translateY(2.5px) rotate(45deg);
}

.menu-open .menu-icon i:last-child {
  transform: translateY(-2.5px) rotate(-45deg);
}

.top .buy,
.top.light .buy:hover {
  border-radius: 3px;
  border-color: var(--ink);
  padding: 9px 15px;
  color: var(--ink);
  background: transparent;
}

.top .buy:hover {
  color: var(--paper);
  background: var(--ink);
}

.dots {
  display: none;
}

.prog {
  position: fixed;
  top: 0;
  height: 2px;
  background: var(--blue);
  z-index: 90;
}

.page,
.page.dark,
.page.light {
  position: relative;
  display: block;
  min-height: 0;
  padding: clamp(68px, 9vw, 124px) clamp(20px, 6vw, 88px);
  overflow: visible;
  color: var(--ink);
  background: var(--paper);
}

.page.dark::before {
  display: none;
}

.hero::after {
  display: none;
}

.hero .badge i {
  background: var(--blue);
  box-shadow: none;
  animation: none;
}

.page.hero {
  min-height: 0;
  padding-block: clamp(44px, 5vw, 72px);
}

.page .wrap {
  width: 100%;
  max-width: 1280px;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 7vw, 112px);
  align-items: center;
}

.page .wrap.flip {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}

.page h1,
.page h2,
.page h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.page h1 {
  max-width: 11ch;
  font-size: clamp(3.2rem, 7.4vw, 7.2rem);
}

.page h2 {
  max-width: 16ch;
  font-size: clamp(2.5rem, 5vw, 5rem);
}

.page h3 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.page .lead {
  max-width: 48ch;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.75;
  opacity: 1;
}

.page .chip {
  font-size: 0.9rem;
}

.page .hint {
  color: var(--muted);
  font-size: 0.9rem;
  opacity: 1;
}

.page .price-note,
.page .feat span,
.page .dt span,
.page .steps span,
.page .daycard span,
.page .ans p,
.page .buycard p.sm {
  opacity: 1;
}

.page .glab {
  font-size: 0.9rem;
  opacity: 1;
}

.page .steps li:not(.on) {
  opacity: 0.82;
}

.page .counter small {
  font-size: 0.9rem;
  opacity: 0.78;
}

.page .loopcap {
  color: var(--muted);
  font-size: 0.9rem;
  opacity: 1;
}

.page .cmp .cap,
.page .ba .cap {
  font-size: 0.9rem;
}

.page .appgrid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.page .tile {
  min-width: 0;
  min-height: 44px;
  overflow-wrap: anywhere;
  white-space: normal;
  font-size: 0.9rem;
}

.page p {
  color: var(--muted);
}

.hero {
  min-height: 0;
  display: flex;
  align-items: center;
  padding-block: clamp(52px, 6vw, 88px);
  background: var(--paper);
}

.hero .wrap {
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
}

.hero .unit {
  max-width: 820px;
}

.hero .route-bg {
  display: none;
}

.js .live.hero h1 .w:first-child {
  color: var(--ink);
  background: none;
  -webkit-text-fill-color: currentColor;
  animation: wordUp 0.85s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.price-row {
  gap: 18px;
  margin-top: 34px;
}

.price,
.buycard .big,
.total b {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.price {
  font-size: clamp(3.6rem, 7vw, 6.4rem);
}

.price-note {
  max-width: 15ch;
  color: var(--muted);
}

.badge {
  margin-top: 20px;
  color: var(--blue);
  font-size: 0.92rem;
}

.btns {
  gap: 12px;
  margin-top: 28px;
}

.page .btn,
.page .btn.solid,
.page.light .btn.solid {
  min-height: 50px;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 3px;
  padding: 11px 20px;
  color: var(--ink);
  background: transparent;
  font-size: 0.94rem;
  font-weight: 400;
  transition: color 180ms ease, background-color 180ms ease;
}

.page .btn:hover,
.page .btn.solid:hover,
.page.light .btn.solid:hover,
.page.light .btn.ghost:hover {
  color: var(--paper);
  background: var(--ink);
}

.page .btn.ghost,
.page.light .btn.ghost {
  border-color: var(--atelier-rule);
}

.page .btn.ghost:hover,
.page.light .btn.ghost:hover {
  border-color: var(--ink);
}

.screen {
  border-radius: 2.4cqw;
  box-shadow: 0 18px 44px rgba(48, 43, 37, 0.18), 0 0 0 1px rgba(48, 43, 37, 0.16);
}

.unit {
  perspective: none;
}

.tilt {
  transform: none !important;
}

.sdstage,
.camstage,
.appstage,
.cmp,
.ba,
.pvis,
.dscene,
.speech,
.filmScreen {
  box-shadow: none;
}

.chip,
.tabs,
.tabs button,
.opt,
.powtabs button,
.camptabs button,
.vchips button,
.dmtabs button {
  border-radius: 3px;
}

.light .chip {
  border-color: var(--atelier-rule);
}

.light .tabs {
  border-color: var(--atelier-rule);
}

.light .tabs button[aria-selected="true"] {
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 -2px var(--blue);
}

.specs {
  border-top-color: var(--ink);
}

.specs li {
  border-bottom-color: var(--atelier-rule);
}

.specs li:hover {
  background: rgba(48, 43, 37, 0.035);
}

.steps li {
  border-color: var(--atelier-rule);
}

.steps li.on {
  border-color: var(--blue);
  background: rgba(69, 93, 106, 0.06);
}

.box svg path {
  stroke: var(--blue);
}

.page.dark .hint,
.light .hint {
  color: var(--muted);
}

.buycard {
  position: relative;
  max-width: 480px;
  padding: clamp(28px, 4vw, 48px);
  color: var(--ink);
  background: linear-gradient(155deg, #fbf9f4, var(--atelier-card) 58%, #f0ede5);
  border: 1px solid #e1dbd0;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(48, 43, 37, 0.06), 0 18px 48px rgba(48, 43, 37, 0.1), inset 1px 1px 0 rgba(255, 255, 255, 0.8);
}

.buycard::before {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(201, 193, 180, 0.8);
  content: "";
  pointer-events: none;
}

.buycard > * {
  position: relative;
}

.buycard .big {
  font-size: clamp(3.5rem, 6vw, 5rem);
  line-height: 1;
}

.buycard p.sm {
  color: var(--muted);
  font-size: 0.92rem;
}

.qty {
  border-top-color: var(--atelier-rule);
}

.stepper {
  border-color: var(--atelier-rule);
  border-radius: 3px;
}

.stepper button {
  border-radius: 2px;
  color: var(--ink);
}

.stepper button:hover {
  color: var(--paper);
  background: var(--ink);
}

.stepper output {
  color: var(--ink);
}

.total b {
  font-size: 2rem;
}

.chk {
  color: var(--ink);
}

.chk input {
  accent-color: var(--blue);
}

.pfrow select {
  min-height: 42px;
  border: 1px solid var(--atelier-rule);
  border-radius: 3px;
  color: var(--ink);
  background: transparent;
}

.buycard .btn,
.buycard .btn:hover {
  width: 100%;
  margin-top: 20px;
}

.buycard .btn:hover {
  color: var(--paper);
  background: var(--ink);
}

.foot {
  position: relative;
  inset: auto;
  flex-wrap: wrap;
  margin: clamp(28px, 5vw, 64px) auto 0;
  color: var(--muted);
  opacity: 1;
  font-size: 0.9rem;
}

.foot img {
  filter: invert(1);
}

.foot a,
.foot button {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--atelier-rule);
  text-underline-offset: 4px;
}

.fab {
  right: clamp(16px, 3vw, 36px);
  bottom: clamp(16px, 3vw, 36px);
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 4px 16px rgba(48, 43, 37, 0.12);
  font-size: 0.86rem;
  font-weight: 400;
}

.fab:hover {
  transform: translateY(-2px);
  color: var(--paper);
  background: var(--ink);
}

.fab svg {
  filter: grayscale(1);
}

.toast {
  border: 1px solid var(--atelier-rule);
  border-radius: 3px;
  color: var(--ink);
  background: var(--atelier-card);
}

@media (max-width: 959px) {
  .page,
  .page.dark,
  .page.light {
    padding-block: clamp(56px, 10vw, 88px);
  }

  .page .wrap,
  .page .wrap.flip,
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .hero {
    min-height: 0;
  }

  .hero .wrap > div:first-child {
    max-width: 700px;
  }

  .page h1 {
    max-width: 12ch;
    font-size: clamp(3rem, 11vw, 5.6rem);
  }

  .page h2 {
    max-width: 18ch;
  }

  .foot {
    position: relative;
    margin-top: 36px;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 11px;
    border: 1px solid var(--atelier-rule);
    color: var(--ink);
    background: var(--paper);
    font-size: 0.86rem;
  }

  .top nav,
  .top.menu-open nav {
    position: absolute;
    top: 100%;
    right: 16px;
    left: 16px;
    z-index: 2;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px 16px;
    border: 1px solid var(--atelier-rule);
    background: var(--paper);
  }

  .top.menu-open nav {
    display: flex;
  }

  .top nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--atelier-rule);
  }

  .top nav a:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-height: 64px;
  }

  .top {
    min-height: var(--nav-height);
    padding-inline: 16px;
  }

  .top .logo {
    height: 32px;
  }

  .page .appgrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .top .buy {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 8px 11px;
    font-size: 0.88rem;
  }

  .page,
  .page.dark,
  .page.light {
    padding-inline: 20px;
  }

  .page .wrap,
  .page .wrap.flip,
  .hero .wrap {
    gap: 28px;
  }

  .price-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    margin-top: 26px;
  }

  .btns {
    align-items: stretch;
    flex-direction: column;
  }

  .page .btn {
    width: 100%;
  }

  .buycard {
    padding: 30px 24px;
  }

  .foot {
    gap: 12px;
  }

  .fab {
    right: 12px;
    bottom: 12px;
    padding: 10px;
  }

  .fab span {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .page .btn,
  .fab,
  .top nav a {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-delay: 0ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
