
/* Hallmark - macro: 05 Workbench - nav: N5 Floating pill - footer: Ft4 Dense typographic / colophon - hero: H1 Marquee - hue: 33.5 - corner: 24px - density: vua - knob-delta: N5 pill no-blur bottom-mobile top-desktop, Ft4 2-block non-mono with top rule, H1 static marquee with right portrait cropped at fold - pre-emit P4 H4 E4 S4 R4 V4 - contrast: pass - mobile: 320/375/414/768/1366 pass */

:root {
  /* Typography */
  --font-display: 'Playpen Sans Thai', 'Chivo', sans-serif;
  --font-body: 'Krub', 'Chivo', sans-serif;
  --font-mono: 'Chivo', monospace;

  /* Spacing Scale (4pt) */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Corner Radius */
  --radius-default: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  /* Palette OKLCH (Hue 33.5 Amber + Accent 115 Lime) */
  --color-paper: oklch(0.96 0.02 33.5);
  --color-paper-2: oklch(0.92 0.03 33.5);
  --color-paper-3: oklch(0.88 0.035 33.5);
  --color-ink: oklch(0.22 0.04 33.5);
  --color-ink-muted: oklch(0.44 0.035 33.5);
  --color-ink-subtle: oklch(0.56 0.03 33.5);

  --color-border: oklch(0.85 0.025 33.5);
  --color-border-subtle: oklch(0.89 0.02 33.5);
  --color-border-strong: oklch(0.60 0.04 33.5);

  --color-accent: oklch(0.86 0.16 115);
  --color-accent-hover: oklch(0.82 0.18 115);
  --color-accent-active: oklch(0.78 0.19 115);
  --color-accent-ink: oklch(0.20 0.06 115);

  --color-focus: oklch(0.38 0.12 33.5);

  /* Status Tokens */
  --color-state-disabled: oklch(0.62 0.02 33.5);
  --color-state-disabled-bg: oklch(0.90 0.015 33.5);
  --color-state-error-text: oklch(0.35 0.15 25);
  --color-state-error-bg: oklch(0.93 0.04 25);
  --color-state-error-border: oklch(0.55 0.18 25);
  --color-state-success-text: oklch(0.30 0.12 145);
  --color-state-success-bg: oklch(0.93 0.04 145);
  --color-state-success-border: oklch(0.50 0.14 145);

  /* Shadows */
  --shadow-subtle: 0 4px 20px oklch(0.22 0.04 33.5 / 0.08);
  --shadow-card: 0 8px 24px oklch(0.22 0.04 33.5 / 0.06);
  --shadow-elevated: 0 16px 40px oklch(0.22 0.04 33.5 / 0.12);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms;
  --dur-normal: 200ms;

  /* Z-index */
  --z-nav: 300;
}

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

html, body {
  overflow-x: clip;
  background-color: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

body {
  padding-bottom: 96px;
}

@media (min-width: 769px) {
  body {
    padding-bottom: 0;
    padding-top: 84px;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 1. Nav N5 Floating Pill */
.sdt-nav {
  position: fixed;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - calc(var(--space-md) * 2)), 640px);
  z-index: var(--z-nav);
  background: var(--color-paper-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: var(--space-2xs) var(--space-sm);
  box-shadow: var(--shadow-subtle);
}

@media (min-width: 769px) {
  .sdt-nav {
    bottom: auto;
    top: var(--space-md);
    width: auto;
    max-width: 960px;
    padding: var(--space-xs) var(--space-md);
  }
}

.sdt-nav-scroll {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.sdt-nav-scroll::-webkit-scrollbar {
  display: none;
}

.sdt-nav-link {
  white-space: nowrap;
  flex-shrink: 0;
  padding: var(--space-2xs) var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-ink);
  text-decoration: none;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}

.sdt-nav-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-ink);
}

/* 2. Layout Structure */
.sdt-container {
  width: min(100% - calc(var(--space-lg) * 2), 1160px);
  margin-inline: auto;
}

.sdt-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-ink);
  margin-bottom: var(--space-lg);
  overflow-wrap: anywhere;
  min-width: 0;
}

/* a. Hero H1 Marquee (Workbench Edition) */
.sdt-hero {
  width: min(100% - calc(var(--space-lg) * 2), 1160px);
  margin-inline: auto;
  padding-block: var(--space-2xl) var(--space-3xl);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
  overflow: clip;
}

@media (min-width: 900px) {
  .sdt-hero {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
    min-height: calc(82vh - 84px);
    padding-block: var(--space-3xl);
  }
}

.sdt-hero-main {
  max-width: 65ch;
}

.sdt-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-ink);
  margin-bottom: var(--space-md);
  overflow-wrap: anywhere;
  min-width: 0;
}

.sdt-lead {
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  line-height: 1.8;
  color: var(--color-ink-muted);
  margin-bottom: var(--space-xl);
  max-width: 58ch;
}

.sdt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-xl);
  background-color: var(--color-accent);
  color: var(--color-accent-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-subtle);
  transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}

.sdt-hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

@media (min-width: 900px) {
  .sdt-hero-visual {
    justify-content: flex-end;
    margin-right: calc(-1 * var(--space-lg));
  }
}

.sdt-hero-img {
  width: 326px;
  height: 440px;
  aspect-ratio: 326 / 440;
  object-fit: cover;
  border-radius: var(--radius-default);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-elevated);
}

/* b. Breadcrumb */
.sdt-crumb {
  width: min(100% - calc(var(--space-lg) * 2), 920px);
  margin-inline: auto;
  margin-block-end: var(--space-2xl);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  font-size: 0.875rem;
  line-height: 1.6;
}

.sdt-crumb-link {
  color: var(--color-ink-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-micro) var(--ease-out);
}

.sdt-crumb-sep {
  color: var(--color-ink-subtle);
  padding-inline: var(--space-2xs);
  user-select: none;
}

.sdt-crumb-current {
  color: var(--color-ink);
  font-weight: 700;
  white-space: nowrap;
}

/* c. Prose Block */
.sdt-block {
  width: min(100% - calc(var(--space-lg) * 2), 920px);
  margin-inline: auto;
  margin-block: var(--space-3xl);
}

.sdt-prose {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--color-ink);
  max-width: 68ch;
}

.sdt-prose p {
  margin-bottom: var(--space-md);
}

.sdt-prose-list {
  list-style: square;
  margin-top: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-left: var(--space-lg);
}

.sdt-prose-list li {
  margin-bottom: var(--space-xs);
  line-height: 1.75;
}

/* d & e. Figures (Workbench Artifact Frames) */
.sdt-fig {
  width: min(100% - calc(var(--space-lg) * 2), 760px);
  margin-inline: auto;
  margin-block: var(--space-3xl);
  padding: var(--space-lg);
  background-color: var(--color-paper-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-default);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sdt-fig-frame {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-paper);
  border-radius: calc(var(--radius-default) - var(--space-xs));
  border: 1px solid var(--color-border-subtle);
  padding: var(--space-md);
  overflow: clip;
}

.sdt-fig-portrait .sdt-fig-img {
  width: 326px;
  height: 440px;
  aspect-ratio: 326 / 440;
  object-fit: cover;
  border-radius: calc(var(--radius-default) - var(--space-sm));
  border: 1px solid var(--color-border);
}

.sdt-fig-square .sdt-fig-img {
  width: 256px;
  height: 256px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: calc(var(--radius-default) - var(--space-sm));
  border: 1px solid var(--color-border);
}

.sdt-caption {
  margin-top: var(--space-md);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-ink-muted);
  text-align: center;
  max-width: 52ch;
}

/* f. Cards Section */
.sdt-cards {
  width: min(100% - calc(var(--space-lg) * 2), 1160px);
  margin-inline: auto;
  margin-block: var(--space-3xl);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .sdt-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.sdt-cards > .sdt-section-title {
  grid-column: 1 / -1;
  margin-bottom: var(--space-xs);
}

.sdt-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  background-color: var(--color-paper-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-default);
  text-decoration: none;
  color: var(--color-ink);
  transition: transform var(--dur-normal) var(--ease-out), border-color var(--dur-normal) var(--ease-out);
}

.sdt-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: var(--space-xs);
  color: var(--color-ink);
  overflow-wrap: anywhere;
  min-width: 0;
}

.sdt-card-desc {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--color-ink-muted);
}

/* g. Uplink */
.sdt-uplink {
  width: min(100% - calc(var(--space-lg) * 2), 920px);
  margin-inline: auto;
  margin-block: var(--space-2xl);
  padding: var(--space-md) var(--space-lg);
  background-color: var(--color-paper-2);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-sm);
}

.sdt-uplink-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-ink);
}

.sdt-link {
  color: var(--color-ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--color-accent-hover);
  transition: color var(--dur-micro) var(--ease-out);
}

/* h. FAQ */
.sdt-faq {
  width: min(100% - calc(var(--space-lg) * 2), 920px);
  margin-inline: auto;
  margin-block: var(--space-3xl);
}

.sdt-faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.sdt-faq-q {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-ink);
  margin-bottom: var(--space-xs);
  overflow-wrap: anywhere;
  min-width: 0;
}

.sdt-faq-a {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-ink-muted);
  max-width: 68ch;
}

/* i. Trust */
.sdt-trust {
  width: min(100% - calc(var(--space-lg) * 2), 920px);
  margin-inline: auto;
  margin-block: var(--space-3xl);
}

.sdt-trust-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.sdt-trust-link {
  display: inline-flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-paper-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-ink);
  text-decoration: none;
  transition: border-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}

/* 3. Footer Ft4 Colophon (2 Blocks: Directory + Legal) */
.sdt-footer {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-3xl);
  background-color: var(--color-paper-2);
}

.sdt-footer-rule {
  width: 100%;
  height: 1px;
  background-color: var(--color-border-strong);
  margin-bottom: var(--space-2xl);
}

.sdt-footer-colophon {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 840px) {
  .sdt-footer-colophon {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: var(--space-3xl);
  }
}

.sdt-footer-directory {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 440px) {
  .sdt-footer-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .sdt-footer-directory {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.sdt-footer-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.sdt-footer-title {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-ink);
}

.sdt-footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.sdt-footer-link {
  font-weight: 400;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-ink-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-micro) var(--ease-out);
}

.sdt-footer-legal {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  font-weight: 400;
  font-size: 0.8125rem;
  line-height: 1.75;
  color: var(--color-ink-muted);
}

.sdt-footer-copy {
  color: var(--color-ink);
  font-weight: 700;
}

/* 4. Complete Interactive States (8 States) */
/* 1. Hover */
.sdt-btn:hover {
  background-color: var(--color-accent-hover);
}

.sdt-nav-link:hover,
.sdt-crumb-link:hover {
  color: var(--color-ink);
  background-color: var(--color-paper-3);
}

.sdt-link:hover {
  color: var(--color-ink-muted);
}

.sdt-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
}

.sdt-trust-link:hover {
  border-color: var(--color-border-strong);
  color: var(--color-ink-muted);
}

.sdt-footer-link:hover {
  color: var(--color-ink);
  text-decoration: underline;
}

/* 2. Focus Visible (Instant, contrast >= 3:1) */
.sdt-btn:focus-visible,
.sdt-nav-link:focus-visible,
.sdt-crumb-link:focus-visible,
.sdt-link:focus-visible,
.sdt-card:focus-visible,
.sdt-trust-link:focus-visible,
.sdt-footer-link:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* 3. Active */
.sdt-btn:active {
  background-color: var(--color-accent-active);
  transform: scale(0.98);
}

.sdt-nav-link:active,
.sdt-crumb-link:active,
.sdt-card:active,
.sdt-trust-link:active {
  transform: scale(0.98);
}

.sdt-link:active {
  opacity: 0.8;
}

/* 4. Disabled */
.sdt-btn:disabled,
.sdt-btn[aria-disabled="true"],
.sdt-nav-link[aria-disabled="true"],
.sdt-crumb-link[aria-disabled="true"],
.sdt-link[aria-disabled="true"],
.sdt-card[aria-disabled="true"],
.sdt-trust-link[aria-disabled="true"],
.sdt-footer-link[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  background-color: var(--color-state-disabled-bg);
  color: var(--color-state-disabled);
  border-color: var(--color-border);
}

/* 5. Loading */
.sdt-btn[aria-busy="true"],
.sdt-btn.sdt-loading,
.sdt-card[aria-busy="true"],
.sdt-card.sdt-loading {
  opacity: 0.7;
  cursor: wait;
  pointer-events: none;
}

/* 6. Error */
.sdt-btn[aria-invalid="true"],
.sdt-btn.sdt-error,
.sdt-card[aria-invalid="true"],
.sdt-card.sdt-error {
  border-color: var(--color-state-error-border);
  color: var(--color-state-error-text);
  background-color: var(--color-state-error-bg);
}

/* 7. Success */
.sdt-btn.sdt-success,
.sdt-card.sdt-success {
  border-color: var(--color-state-success-border);
  color: var(--color-state-success-text);
  background-color: var(--color-state-success-bg);
}

/* 5. Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
  