:root {
  --bg: #f3f4f0;
  --text: #151917;
  --muted: #66716b;
  --line: #d9ded8;
  --surface: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.template-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(20, 20, 20, 0.12);
  background: rgba(254, 229, 0, 0.94);
  backdrop-filter: blur(14px);
}

.template-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #111;
  font-weight: 900;
  letter-spacing: 0;
}

.template-brand span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: #111;
  color: #fee500;
  font-size: 14px;
  letter-spacing: 0;
}

nav {
  display: flex;
  gap: 6px;
  color: #111;
  font-size: 14px;
  font-weight: 800;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border-radius: 999px;
  padding: 0 14px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

nav a:hover {
  background: rgba(17, 17, 17, 0.12);
  transform: translateY(-1px);
}

nav a:active,
nav a:focus-visible {
  background: #111;
  color: #fee500;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.16);
}

.template-hero,
.factory-demo,
.selected-preview,
.template-grid {
  margin: 0 clamp(18px, 5vw, 72px);
}

.template-hero {
  max-width: 1180px;
  padding: clamp(54px, 8vw, 104px) 0 28px;
}

.template-hero p {
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 900;
}

.template-hero h1 {
  max-width: 980px;
  margin: 0 0 22px;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 1.02;
}

.template-hero span {
  display: block;
  max-width: 780px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.factory-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.factory-demo small {
  color: var(--muted);
  font-weight: 900;
}

.factory-demo h2 {
  margin: 10px 0;
  font-size: clamp(26px, 4vw, 48px);
}

.factory-demo p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

dl div {
  padding: 14px;
  border-radius: 8px;
  background: #f3f4f0;
}

dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

dd {
  margin: 6px 0 0;
  font-weight: 900;
}

.selected-preview {
  overflow: hidden;
  margin-top: 18px;
  border-radius: 8px;
  background: var(--sample-bg, #101413);
  color: var(--sample-text, #fff);
  box-shadow: 0 18px 55px rgba(17, 24, 21, 0.16);
  scroll-margin-top: 86px;
}

.selected-preview:focus {
  outline: 4px solid #fee500;
  outline-offset: 4px;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid currentColor;
  background: rgba(255, 255, 255, 0.06);
}

.preview-toolbar span {
  color: var(--sample-accent, #c8a15a);
  font-weight: 900;
}

.preview-toolbar strong {
  text-transform: lowercase;
}

.preview-site {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: clamp(22px, 4vw, 56px);
  align-items: center;
  padding: clamp(26px, 5vw, 64px);
}

.preview-copy small {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--sample-accent, #c8a15a);
  font-weight: 900;
}

.preview-copy h2 {
  max-width: 620px;
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 78px);
  line-height: 0.98;
}

.preview-copy p {
  max-width: 600px;
  margin: 0;
  opacity: 0.76;
  font-size: 18px;
  line-height: 1.7;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.preview-actions a,
.preview-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--sample-text, #fff);
  color: var(--sample-bg, #111);
  font: inherit;
  font-weight: 900;
  transition: transform 160ms ease, opacity 160ms ease;
}

.preview-actions button {
  background: transparent;
  color: inherit;
}

.preview-actions a:hover,
.preview-actions button:hover {
  transform: translateY(-1px);
  opacity: 0.88;
}

.preview-media img,
.preview-strip img,
.sample-photo {
  display: block;
  width: 100%;
  object-fit: cover;
}

.preview-media img {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  filter: saturate(0.92) contrast(1.04);
}

.preview-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 clamp(26px, 5vw, 64px) clamp(26px, 5vw, 64px);
}

.preview-strip img {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  opacity: 0.86;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 28px 0 72px;
}

.sample {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.sample:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(17, 24, 21, 0.12);
}

.sample[data-active="true"] {
  border-color: #111;
  outline: 4px solid #fee500;
  outline-offset: 2px;
}

.sample-screen {
  min-height: 260px;
  padding: 18px;
  background: var(--sample-bg, #111);
  color: var(--sample-text, #fff);
}

.sample-nav {
  display: flex;
  gap: 7px;
  margin-bottom: 28px;
}

.sample-nav span {
  width: 28px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.34;
}

.sample-hero small {
  display: block;
  margin-bottom: 14px;
  color: var(--sample-accent, #c8a15a);
  font-weight: 900;
}

.sample-hero h3 {
  max-width: 260px;
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.04;
}

.sample-hero p {
  max-width: 260px;
  margin: 0;
  opacity: 0.72;
  line-height: 1.55;
}

.sample-photo {
  height: 92px;
  margin-top: 18px;
  border-radius: 8px;
  opacity: 0.72;
  mix-blend-mode: luminosity;
}

.sample-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 28px;
}

.sample-metrics b {
  padding: 9px;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 11px;
  text-align: center;
  opacity: 0.82;
}

.sample-copy {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.sample-copy strong {
  font-size: 16px;
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

button:hover {
  background: #111;
  color: #fee500;
  transform: translateY(-1px);
}

button:active,
button:focus-visible {
  outline: 3px solid #fee500;
  outline-offset: 2px;
}

.black { --sample-bg: #101413; --sample-text: #fff; --sample-accent: #a7f3d0; }
.blueprint { --sample-bg: #071527; --sample-text: #e8f0ff; --sample-accent: #6ea8ff; }
.mono { --sample-bg: #fff; --sample-text: #080808; --sample-accent: #111; }
.violet { --sample-bg: #171321; --sample-text: #f5f2ff; --sample-accent: #9f7aea; }
.silver { --sample-bg: linear-gradient(145deg, #fafafa, #d8dde3); --sample-text: #111; --sample-accent: #53606b; }
.blue { --sample-bg: #0b3bff; --sample-text: #fff; --sample-accent: #b8d7ff; }
.coral { --sample-bg: #fff4ee; --sample-text: #25201d; --sample-accent: #ff6f4e; }
.rainbow { --sample-bg: linear-gradient(135deg, #f24e1e, #a259ff, #1abcfe); --sample-text: #fff; --sample-accent: #fff3b0; }
.ink { --sample-bg: #05060a; --sample-text: #fff; --sample-accent: #00d4ff; }
.gradient { --sample-bg: linear-gradient(135deg, #635bff, #00d4ff); --sample-text: #fff; --sample-accent: #f6ff8f; }
.green { --sample-bg: #062e22; --sample-text: #eafff7; --sample-accent: #3ecf8e; }
.leaf { --sample-bg: #0e3b2d; --sample-text: #f0fff7; --sample-accent: #00ed64; }
.paper { --sample-bg: #fbfaf7; --sample-text: #171717; --sample-accent: #78716c; }
.calendar { --sample-bg: #f7f7f7; --sample-text: #141414; --sample-accent: #ff4f00; }
.clean { --sample-bg: #ffffff; --sample-text: #111; --sample-accent: #2563eb; }
.purple { --sample-bg: #2b174f; --sample-text: #fff; --sample-accent: #e4c1f9; }
.sand { --sample-bg: #f7e7bf; --sample-text: #261f12; --sample-accent: #d97706; }
.warm { --sample-bg: #fff2d8; --sample-text: #1b1b1b; --sample-accent: #ff6b00; }
.yellow { --sample-bg: #ffd02f; --sample-text: #171717; --sample-accent: #0057ff; }
.lime { --sample-bg: #9fe870; --sample-text: #102014; --sample-accent: #163300; }
.royal { --sample-bg: #0052ff; --sample-text: #fff; --sample-accent: #d6e4ff; }
.neon { --sample-bg: #111827; --sample-text: #fff; --sample-accent: #00ffc2; }
.carbon { --sample-bg: #000; --sample-text: #fff; --sample-accent: #a3a3a3; }
.steel { --sample-bg: #222831; --sample-text: #f4f4f4; --sample-accent: #c0c8d2; }
.navy { --sample-bg: #071a33; --sample-text: #fff; --sample-accent: #1c69d4; }
.yellowblack { --sample-bg: #101010; --sample-text: #fff; --sample-accent: #ffd200; }
.rose { --sample-bg: #fff0f3; --sample-text: #241315; --sample-accent: #ff385c; }
.red { --sample-bg: #e60023; --sample-text: #fff; --sample-accent: #ffe1e6; }
.acid { --sample-bg: #121212; --sample-text: #fff; --sample-accent: #1ed760; }
.darkred { --sample-bg: #160b0d; --sample-text: #fff; --sample-accent: #ff6363; }
.terminal { --sample-bg: #050505; --sample-text: #d1f7c4; --sample-accent: #00ff88; }
.midnight { --sample-bg: #09090f; --sample-text: #fff; --sample-accent: #8b5cf6; }
.cream { --sample-bg: #f4efe8; --sample-text: #191410; --sample-accent: #8b5e34; }
.claytone { --sample-bg: #f4f0ff; --sample-text: #1f1933; --sample-accent: #6d5dfc; }
.connect { --sample-bg: #101828; --sample-text: #f9fafb; --sample-accent: #7c3aed; }
.voice { --sample-bg: #111827; --sample-text: #f9fafb; --sample-accent: #22d3ee; }
.expo { --sample-bg: #050816; --sample-text: #fff; --sample-accent: #8b5cf6; }
.kraken { --sample-bg: #190a34; --sample-text: #fff; --sample-accent: #7133ff; }
.soft { --sample-bg: #eef7ff; --sample-text: #18212f; --sample-accent: #2b6cb0; }
.amber { --sample-bg: #29180a; --sample-text: #fff5e9; --sample-accent: #ffb020; }
.minimax { --sample-bg: #f8fafc; --sample-text: #0f172a; --sample-accent: #0ea5e9; }
.ollama { --sample-bg: #171717; --sample-text: #f5f5f5; --sample-accent: #a3e635; }
.opencode { --sample-bg: #0a0a0a; --sample-text: #f8fafc; --sample-accent: #38bdf8; }
.electric { --sample-bg: #070022; --sample-text: #fff; --sample-accent: #39ffdb; }
.superhuman { --sample-bg: #08111f; --sample-text: #fff; --sample-accent: #ff7a59; }
.space { --sample-bg: #020204; --sample-text: #fff; --sample-accent: #f5f5f5; }
.cinema { --sample-bg: #111; --sample-text: #fff; --sample-accent: #ff4fd8; }
.grid { --sample-bg: #111827; --sample-text: #f9fafb; --sample-accent: #60a5fa; }
.pink { --sample-bg: #ffeff7; --sample-text: #27101c; --sample-accent: #ff4da6; }
.mint { --sample-bg: #eefcf6; --sample-text: #10221a; --sample-accent: #0b8f62; }
.studio { --sample-bg: #fef2f2; --sample-text: #210f0f; --sample-accent: #f03e2f; }
.orange { --sample-bg: #fff3e7; --sample-text: #24170c; --sample-accent: #ff642d; }
.yellowdata { --sample-bg: #111; --sample-text: #fff; --sample-accent: #ffcc00; }
.limeblack { --sample-bg: #050805; --sample-text: #fff; --sample-accent: #76b900; }
.spaceblack { --sample-bg: #03070c; --sample-text: #fff; --sample-accent: #9db4ff; }
.redblack { --sample-bg: #170000; --sample-text: #fff; --sample-accent: #ff2800; }
.goldblack { --sample-bg: #0c0a07; --sample-text: #fff; --sample-accent: #d6b25e; }
.teal { --sample-bg: #042f2e; --sample-text: #ecfeff; --sample-accent: #2dd4bf; }
.orangeblue { --sample-bg: linear-gradient(135deg, #ff4f00, #2563eb); --sample-text: #fff; --sample-accent: #fff; }

@media (max-width: 1100px) {
  .template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  nav {
    display: none;
  }

  .factory-demo,
  .preview-site,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .preview-strip {
    grid-template-columns: 1fr;
  }
}
