/* Scoped styles for Getting Started (/welcome/ and localized /[locale]/welcome/). Uses --type-* tokens only. */

.gs-page {
  overflow-wrap: break-word;
}

:lang(ko) .gs-page {
  word-break: keep-all;
}

.gs-hero h1,
.gs-hero h2,
.gs-heading h2,
.gs-card h3 {
  text-wrap: balance;
}

.gs-page main > section {
  width: 100%;
  max-width: none;
  margin: 0;
}

.gs-page [hidden] {
  display: none !important;
}

.gs-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.gs-page kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid #cfc6ba;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #faf7f2;
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: var(--type-caption);
  font-weight: 600;
  line-height: 1.45;
  vertical-align: 1px;
}

/* Conditional post-checkout banner (?checkout=success) */
.gs-payment-band {
  padding: 112px 0 12px;
  background: var(--surface);
}

.gs-payment-card {
  max-width: 820px;
  padding: 32px 36px;
  border: 1px solid rgba(40, 114, 79, 0.24);
  border-top: 3px solid var(--success);
  border-radius: var(--radius-panel);
  background: #f3faf6;
  display: grid;
  gap: 14px;
}

.gs-payment-label {
  margin: 0;
  color: var(--success);
  font-size: var(--type-caption);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gs-payment-card h1,
.gs-payment-card h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: var(--type-title-display);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.gs-payment-lead {
  margin: 0;
  max-width: 66ch;
  color: var(--ink);
  font-size: var(--type-body-large);
  line-height: 1.55;
}

.gs-payment-card .hero-actions {
  margin-top: 4px;
}

.gs-payment-note {
  margin: 4px 0 0;
  max-width: 68ch;
  color: var(--ink-muted);
  font-size: var(--type-caption);
  line-height: 1.6;
}

.gs-payment-note strong {
  color: var(--ink);
}

.gs-payment-note a {
  color: var(--brand-strong);
  font-weight: 600;
}

/* Hero */
.gs-hero {
  padding: 122px 0 48px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

[data-payment-confirmation]:not([hidden]) + .gs-hero {
  padding-top: 36px;
}

.gs-hero-copy {
  max-width: 780px;
}

.gs-hero h1,
.gs-hero h2 {
  margin: 12px 0 0;
  color: var(--ink);
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: var(--type-title-display);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

[data-payment-confirmation]:not([hidden]) + .gs-hero h2 {
  font-size: var(--type-title-section);
}

.gs-hero-lead {
  margin: 18px 0 0;
  max-width: 62ch;
  color: var(--ink-muted);
  font-size: var(--type-body-large);
  line-height: 1.6;
}

.gs-hero .hero-actions {
  margin-top: 26px;
}

.gs-trial-note {
  margin: 14px 0 0;
  color: var(--ink-dim);
  font-size: var(--type-caption);
  line-height: 1.5;
}

/* Sections */
.gs-section {
  padding: 68px 0;
}

.gs-section-surface {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.gs-heading {
  max-width: 740px;
  margin-bottom: 32px;
}

.gs-heading h2 {
  margin: 10px 0 0;
  color: var(--ink);
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: var(--type-title-section);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.gs-heading p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--ink-muted);
  font-size: var(--type-body-large);
  line-height: 1.6;
}

/* Shared cards */
.gs-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.gs-section-surface .gs-card {
  background: var(--paper);
}

.gs-card-tag {
  margin: 0;
  color: #365c55;
  font-size: var(--type-caption);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gs-device-card .gs-card-tag {
  letter-spacing: 0.02em;
  text-transform: none;
}

.gs-card h3 {
  margin: 0;
  color: var(--ink);
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: var(--type-title-small);
  line-height: 1.25;
}

.gs-card p:not(.gs-card-tag) {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--type-body);
  line-height: 1.65;
}

.gs-card strong {
  color: var(--ink);
}

.gs-step-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: var(--ink-muted);
  font-size: var(--type-body);
  line-height: 1.6;
}

.gs-step-list li::marker {
  color: var(--brand);
  font-weight: 600;
}

.gs-card-link,
.gs-inline-link {
  display: inline;
  color: var(--brand-strong);
  font-size: var(--type-body);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.5;
}

.gs-card-link {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 8px;
}

.gs-card-link:hover,
.gs-inline-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gs-card-link:focus-visible,
.gs-inline-link:focus-visible,
.gs-text-link:focus-visible,
.gs-faq-item summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.gs-text-link {
  color: var(--brand-strong);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(114, 70, 44, 0.42);
  text-underline-offset: 3px;
}

.gs-text-link:hover {
  text-decoration-color: var(--brand-strong);
}

/* Step 1: Devices */
.gs-device-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.gs-device-card.is-highlighted {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand-border), 0 10px 24px rgba(114, 70, 44, 0.08);
}

#selected-workflow {
  margin-bottom: 24px;
}

/* Step 2: AI Setup */
.gs-ai-split {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: 28px;
  align-items: start;
}

.gs-ai-stack {
  display: grid;
  gap: 18px;
}

.gs-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding-top: 4px;
}

.gs-showcase {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.gs-showcase a {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(40, 32, 24, 0.12);
}

.gs-showcase img {
  display: block;
  width: 100%;
  height: auto;
}

.gs-showcase figcaption {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--type-caption);
  line-height: 1.55;
}

.gs-showcase figcaption strong {
  color: var(--ink);
}

/* Step 3: Quick access */
.gs-access-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.gs-access-card {
  padding: 0;
  overflow: hidden;
  gap: 0;
}

.gs-access-stage {
  margin: 0;
  height: 248px;
  padding: 18px;
  background: #f2ede4;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gs-access-stage a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  max-width: 100%;
}

.gs-access-stage img {
  display: block;
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 10px 24px rgba(26, 17, 12, 0.15);
}

.gs-frame-phone img {
  border-radius: 18px;
  border: 3px solid #24201d;
}

.gs-frame-watch img {
  max-height: 186px;
  border-radius: 26px;
  border: 5px solid #24201d;
}

.gs-frame-tablet img {
  border-radius: 10px;
  border: 3px solid #24201d;
}

.gs-access-body {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Step 4: Voice & Habit */
.gs-voice-banner {
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overflow: hidden;
  background: #f3ede4;
}

.gs-voice-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.gs-voice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* Step 5: Troubleshooting */
.gs-faq-list {
  display: grid;
  gap: 12px;
  max-width: 860px;
}

.gs-faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  transition: border-color 160ms ease;
}

.gs-faq-item[open] {
  border-color: var(--brand-border);
}

.gs-faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 16px 22px;
  color: var(--ink);
  font-size: var(--type-body-large);
  font-weight: 600;
  cursor: pointer;
}

.gs-faq-item summary::-webkit-details-marker {
  display: none;
}

.gs-faq-item summary::after {
  content: "+";
  flex: none;
  color: var(--brand);
  font-size: var(--type-title-small);
  font-weight: 500;
  line-height: 1;
}

.gs-faq-item[open] summary::after {
  content: "−";
}

.gs-faq-item p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--ink-muted);
  font-size: var(--type-body);
  line-height: 1.65;
}

.gs-faq-item p strong {
  color: var(--ink);
}

.gs-support-card {
  margin-top: 32px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
}

.gs-support-card h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: var(--type-title-small);
  line-height: 1.25;
}

.gs-support-card p {
  margin: 0;
  max-width: 56ch;
  color: var(--ink-muted);
  font-size: var(--type-body);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 1020px) {
  .gs-device-grid,
  .gs-access-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gs-ai-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .gs-inner {
    width: calc(100% - 32px);
  }

  .gs-hero {
    padding: 104px 0 36px;
  }

  .gs-payment-band {
    padding: 96px 0 8px;
  }

  .gs-payment-card {
    padding: 24px 20px;
  }

  .gs-hero h1,
  .gs-hero h2,
  .gs-payment-card h1,
  .gs-payment-card h2 {
    font-size: var(--type-title-section);
  }

  .gs-heading h2,
  [data-payment-confirmation]:not([hidden]) + .gs-hero h2 {
    font-size: var(--type-title-small);
  }

  .gs-section {
    padding: 48px 0;
  }

  .gs-device-grid,
  .gs-access-grid,
  .gs-voice-grid {
    grid-template-columns: 1fr;
  }

  .gs-card {
    padding: 22px;
  }

  .gs-access-card {
    padding: 0;
  }

  .gs-access-body {
    padding: 20px;
  }

  .gs-support-card {
    padding: 22px 20px;
  }

  .gs-faq-item summary {
    padding: 14px 18px;
    font-size: var(--type-body);
  }

  .gs-faq-item p {
    padding: 0 18px 18px;
  }
}
