:root {
  --ink: #111827;
  --muted: #5b6472;
  --paper: #fffdf8;
  --white: #ffffff;
  --line: #dde5e2;
  --brand: #0f766e;
  --brand-dark: #123f3b;
  --cyan: #22d3ee;
  --page-grid:
    linear-gradient(rgba(15, 118, 110, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.026) 1px, transparent 1px);
  --page-grid-size: 24px 24px, 24px 24px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.12), transparent 28%),
    radial-gradient(circle at 78% 6%, rgba(139, 92, 246, 0.12), transparent 30%),
    #080d1a;
  color: #e5e7eb;
  line-height: 1.6;
  padding-top: 76px;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: auto;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #dbe7e3;
  backdrop-filter: blur(16px);
}

.navbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 76px;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-self: start;
}

.logo-img {
  display: block;
  width: 178px;
  max-width: 46vw;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 22px;
  color: #354052;
  font-size: 15px;
  font-weight: 750;
}

.nav-links a {
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--brand);
}

.nav-links a.active {
  color: var(--brand);
}

.preview-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border: 2px solid var(--brand);
  border-radius: 999px;
  background: transparent;
  color: var(--brand);
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.preview-link:hover,
.preview-link.active {
  border-color: var(--brand-dark);
  background: rgba(15, 118, 110, 0.08);
  color: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.15);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 28px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--brand);
}

.preview-link::after,
.preview-link:hover::after {
  display: none;
}

.mobile-preview-link {
  display: none;
}

.nav-actions {
  display: flex;
  justify-self: end;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  background: var(--brand-dark);
  color: var(--white);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: 0 14px 30px rgba(18, 63, 59, 0.24);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background: #0b302d;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(11, 48, 45, 0.28);
}

.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-size: 24px;
}

.preview-hero {
  padding: 64px 0 22px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 24px 24px;
}

.preview-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 34px;
  align-items: end;
}

.eyebrow,
.section-heading span {
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.preview-hero h1 {
  max-width: 780px;
  margin: 12px 0 14px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

.preview-hero p {
  max-width: 720px;
  color: #aab2c1;
  font-size: 18px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-width: 440px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.68);
}

.hero-metrics div {
  display: grid;
  gap: 3px;
  padding: 18px;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-metrics div:last-child {
  border-right: 0;
}

.hero-metrics strong {
  color: #f8fafc;
  font-size: 22px;
  line-height: 1;
}

.hero-metrics span {
  color: #8f98a8;
  font-size: 13px;
  font-weight: 800;
}

.preview-workspace {
  padding: 28px 0 78px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.control-panel,
.preview-stage,
.template-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    rgba(12, 18, 33, 0.78);
  background-size: 22px 22px, 22px 22px, auto;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.control-panel {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 112px);
  overflow: auto;
  padding: 20px;
  border-radius: 18px;
}

.panel-block {
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.panel-block:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.panel-block h2 {
  margin-bottom: 14px;
  color: #f8fafc;
  font-size: 16px;
}

.panel-block label,
.color-row label {
  display: block;
  margin-bottom: 8px;
  color: #8f98a8;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-block input[type="text"],
.panel-block input[type="file"] {
  width: 100%;
  min-height: 46px;
  margin-bottom: 14px;
  padding: 0 13px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(8, 13, 26, 0.78);
  color: #e5e7eb;
  font-weight: 750;
}

.panel-block input[type="file"] {
  padding: 11px 13px;
  color: #aab2c1;
}

.category-list,
.preset-grid,
.segmented-control {
  display: grid;
  gap: 10px;
}

.category-list button,
.preset-grid button,
.segmented-control button {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background: rgba(8, 13, 26, 0.68);
  color: #e5e7eb;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.category-list button {
  display: grid;
  gap: 2px;
  padding: 12px;
}

.category-list button span,
.template-card span {
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-list button strong {
  font-size: 14px;
}

.category-list button:hover,
.category-list button.active,
.template-card:hover,
.template-card.active {
  border-color: rgba(34, 211, 238, 0.68);
  background: rgba(8, 17, 31, 0.96);
  transform: translateY(-1px);
}

.preset-grid button {
  display: grid;
  grid-template-columns: 30px 30px 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

.preset-grid span {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.preset-grid strong {
  color: #cbd5e1;
  font-size: 13px;
}

.color-row {
  display: grid;
  grid-template-columns: 1fr 54px;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.color-row label {
  margin-bottom: 0;
}

.color-row input {
  width: 54px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(8, 13, 26, 0.78);
}

.segmented-control {
  grid-template-columns: repeat(3, 1fr);
}

.segmented-control button {
  min-height: 38px;
  text-align: center;
  font-weight: 850;
}

.segmented-control button.active {
  border-color: rgba(34, 211, 238, 0.68);
  color: var(--cyan);
}

.preview-stage {
  min-width: 0;
  padding: 18px;
  border-radius: 18px;
}

.stage-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.stage-toolbar div:first-child {
  display: grid;
}

.stage-toolbar span {
  color: #8f98a8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stage-toolbar strong {
  color: #f8fafc;
  font-size: 20px;
}

.device-toggle {
  display: inline-flex;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(8, 13, 26, 0.72);
}

.device-toggle button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #aab2c1;
  font-weight: 850;
}

.device-toggle button.active {
  background: #e5e7eb;
  color: #0f172a;
}

.browser-shell {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: #f8fafc;
  transition: max-width 0.25s ease;
}

.browser-shell.mobile-view {
  max-width: 390px;
  margin: 0 auto;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid #d9e0ea;
  background: #edf2f7;
}

.browser-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
}

.browser-bar p {
  flex: 1;
  max-width: 220px;
  margin-left: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ffffff;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.site-preview {
  --preview-primary: #0f766e;
  --preview-accent: #f2a900;
  --preview-font: Inter, ui-sans-serif, system-ui, sans-serif;
  min-height: 650px;
  color: #0f172a;
  background: #ffffff;
  font-family: var(--preview-font);
}

.preview-site-inner {
  min-height: 650px;
  background:
    linear-gradient(rgba(15, 23, 42, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.026) 1px, transparent 1px),
    #ffffff;
  background-size: 24px 24px, 24px 24px, auto;
}

.preview-site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 34px;
}

.preview-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.preview-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--preview-primary);
  color: #ffffff;
  font-weight: 950;
}

.preview-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-site-nav strong {
  font-size: 18px;
}

.preview-site-nav div:last-child {
  display: flex;
  gap: 18px;
  color: #475569;
  font-size: 14px;
  font-weight: 850;
}

.preview-site-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.82fr);
  gap: 36px;
  align-items: center;
  padding: 40px 34px 46px;
}

.preview-kicker {
  display: inline-flex;
  margin-bottom: 15px;
  padding: 7px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--preview-accent), white 78%);
  color: var(--preview-primary);
  font-size: 13px;
  font-weight: 950;
}

.preview-site-hero h2 {
  max-width: 660px;
  margin-bottom: 16px;
  color: #0f172a;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

.preview-site-hero p {
  max-width: 620px;
  color: #475569;
  font-size: 18px;
}

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

.preview-actions a,
.preview-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 900;
}

.preview-actions a {
  background: var(--preview-primary);
  color: #ffffff;
}

.preview-actions button {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
}

.preview-site-hero figure {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 4.7;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.preview-site-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 0 34px 28px;
}

.preview-feature-row article {
  min-height: 150px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.preview-feature-row span {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--preview-accent);
  font-weight: 950;
}

.preview-feature-row h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.24;
}

.preview-feature-row p {
  color: #64748b;
  font-size: 14px;
}

.preview-template-section {
  padding: 8px 34px 34px;
}

.preview-section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}

.preview-section-title span,
.template-preview-card span {
  color: var(--preview-primary);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-section-title h3 {
  color: #0f172a;
  font-size: 30px;
  line-height: 1.12;
}

.template-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.template-preview-card {
  min-height: 166px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--preview-primary), white 72%);
  border-radius: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--preview-primary), white 92%), #ffffff 70%);
}

.template-preview-card span {
  display: inline-flex;
  margin-bottom: 18px;
}

.template-preview-card h4 {
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 19px;
  line-height: 1.2;
}

.template-preview-card p {
  color: #64748b;
  font-size: 14px;
}

.preview-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--preview-primary);
}

.preview-proof div {
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 24px;
  background: color-mix(in srgb, var(--preview-primary), black 8%);
  color: #ffffff;
}

.preview-proof strong {
  font-size: 20px;
  line-height: 1.15;
}

.preview-proof span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.mobile-view .preview-site-nav {
  align-items: flex-start;
  padding: 20px;
}

.mobile-view .preview-site-nav div:last-child {
  display: none;
}

.mobile-view .preview-site-hero,
.mobile-view .preview-feature-row,
.mobile-view .template-preview-grid,
.mobile-view .preview-proof {
  grid-template-columns: 1fr;
}

.mobile-view .preview-site-hero {
  padding: 28px 20px 26px;
}

.mobile-view .preview-site-hero h2 {
  font-size: 36px;
}

.mobile-view .preview-feature-row {
  padding: 0 20px 22px;
}

.mobile-view .preview-template-section {
  padding: 0 20px 24px;
}

.mobile-view .preview-section-title {
  align-items: flex-start;
  flex-direction: column;
}

.template-library {
  padding: 22px 0 78px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin-top: 7px;
  color: #f8fafc;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
}

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

.template-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 100%;
  padding: 12px;
  border-radius: 16px;
  color: #e5e7eb;
  text-align: left;
  overflow: hidden;
}

.template-card:focus-visible {
  outline: 3px solid rgba(34, 211, 238, 0.86);
  outline-offset: 4px;
}

.template-card-media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  isolation: isolate;
}

.template-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(3, 7, 18, 0.58);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.template-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.template-preview-popup {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(28, 27, 39, 0.88);
  color: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: translate(-50%, calc(-50% + 14px));
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.template-preview-popup svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.template-card:hover .template-card-media::after,
.template-card:focus-visible .template-card-media::after {
  opacity: 1;
}

.template-card:hover img,
.template-card:focus-visible img {
  filter: saturate(0.78);
  transform: scale(1.035);
}

.template-card:hover .template-preview-popup,
.template-card:focus-visible .template-preview-popup {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.template-card strong {
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.2;
}

.template-card p {
  color: #9aa4b4;
  font-size: 14px;
}

.template-card em {
  display: inline-flex;
  justify-self: start;
  margin-top: 4px;
  padding: 8px 11px;
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 999px;
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.viewer-open {
  overflow: hidden;
}

.template-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  padding: 16px;
  background:
    radial-gradient(circle at 20% 12%, rgba(34, 211, 238, 0.1), transparent 28%),
    rgba(3, 7, 18, 0.84);
  backdrop-filter: blur(16px);
}

.template-viewer.active {
  display: grid;
  place-items: center;
}

.template-viewer-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1280px, 100%);
  height: min(860px, calc(100vh - 32px));
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background: #0b1020;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
}

.template-viewer-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(12, 18, 33, 0.96);
}

.viewer-back,
.viewer-close,
.viewer-selected {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  font-weight: 900;
}

.viewer-back {
  justify-self: start;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: #9aa4b4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.viewer-back::before {
  content: "<";
  margin-right: 10px;
}

.viewer-title {
  display: grid;
  text-align: center;
}

.viewer-title strong {
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.viewer-title span {
  color: #737d8d;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.viewer-actions {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 12px;
}

.viewer-selected {
  padding: 0 22px;
  border: 1px solid rgba(139, 92, 246, 0.68);
  background: rgba(139, 92, 246, 0.24);
  color: #c4b5fd;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.viewer-selected::before {
  content: "✓";
  margin-right: 9px;
}

.viewer-close {
  width: 42px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.7);
  color: #9aa4b4;
  font-size: 28px;
  line-height: 1;
}

.template-viewer-scroll {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 220px),
    #111827;
}

.template-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.full-template {
  --preview-primary: #0f766e;
  --preview-accent: #f2a900;
  --preview-font: Inter, ui-sans-serif, system-ui, sans-serif;
  width: min(100%, 1180px);
  margin: 0 auto;
  color: #0f172a;
  background: #ffffff;
  font-family: var(--preview-font);
}

.full-template-inner {
  min-height: 100%;
  background:
    linear-gradient(rgba(15, 23, 42, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.026) 1px, transparent 1px),
    #ffffff;
  background-size: 24px 24px, 24px 24px, auto;
}

.full-template-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 82px;
  padding: 22px 34px;
  border-bottom: 1px solid #e2e8f0;
}

.full-template-nav > div:last-child {
  display: flex;
  gap: 22px;
  color: #475569;
  font-weight: 850;
}

.full-template-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 0.78fr);
  gap: 44px;
  align-items: center;
  min-height: 640px;
  padding: 70px 44px;
}

.full-template-hero h1 {
  max-width: 760px;
  margin-bottom: 18px;
  color: #0f172a;
  font-size: clamp(52px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: 0;
}

.full-template-hero p {
  max-width: 720px;
  color: #475569;
  font-size: 21px;
}

.full-template-hero figure {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.2);
}

.full-template-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.full-template-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--preview-primary);
}

.full-template-stats div {
  min-height: 138px;
  padding: 30px;
  background: color-mix(in srgb, var(--preview-primary), black 8%);
  color: #ffffff;
}

.full-template-stats strong {
  display: block;
  margin-bottom: 7px;
  font-size: 27px;
  line-height: 1.1;
}

.full-template-stats span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  font-weight: 750;
}

.full-template-section {
  padding: 70px 44px;
}

.full-template-section .preview-section-title {
  margin-bottom: 28px;
}

.full-template-section .preview-section-title h2 {
  color: #0f172a;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.06;
}

.full-feature-grid,
.full-detail-grid,
.full-process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.full-feature-grid article,
.full-detail-grid article,
.full-process-grid article {
  min-height: 220px;
  padding: 26px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
}

.full-feature-grid span,
.full-detail-grid span,
.full-process-grid span {
  display: inline-flex;
  margin-bottom: 32px;
  color: var(--preview-accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.full-feature-grid h3,
.full-detail-grid h3,
.full-process-grid h3 {
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 23px;
  line-height: 1.16;
}

.full-feature-grid p,
.full-detail-grid p,
.full-process-grid p {
  color: #64748b;
}

.full-template-highlight {
  background: color-mix(in srgb, var(--preview-primary), white 94%);
}

.full-detail-grid article {
  border-color: color-mix(in srgb, var(--preview-primary), white 68%);
}

.full-template-cta {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 78px 44px 88px;
  background: #0f172a;
  color: #ffffff;
  text-align: center;
}

.full-template-cta span {
  color: var(--preview-accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.full-template-cta h2 {
  max-width: 760px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.05;
}

.full-template-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 8px;
  background: var(--preview-primary);
  color: #ffffff;
  font-weight: 900;
}

.whatsapp-float {
  position: fixed;
  right: calc(26px + env(safe-area-inset-right));
  bottom: calc(26px + env(safe-area-inset-bottom));
  z-index: 60;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #25d366;
  color: var(--white) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
  background: #1ebe5d;
  color: var(--white) !important;
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.42);
}

.whatsapp-float svg {
  display: block;
  width: 34px;
  height: 34px;
}

.site-footer {
  padding: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 18% 0%, rgba(15, 118, 110, 0.18), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(139, 92, 246, 0.18), transparent 32%),
    #111827;
  background-size: 24px 24px, 24px 24px, auto, auto, auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 18px;
}

.footer-main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 58px;
  padding: 86px 0 72px;
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 20px;
}

.footer-column h2 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.2;
}

.footer-column h2::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 12px;
  border-radius: 999px;
  background: #8b5cf6;
}

.footer-column a,
.footer-column p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.45;
}

.footer-column a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-column a:hover {
  color: #c4b5fd;
  transform: translateX(3px);
}

.footer-phone-row {
  display: flex;
  justify-content: center;
  gap: 22px;
  padding: 0 0 34px;
  color: #f8fafc;
  font-size: 15px;
  font-weight: 760;
  line-height: 1;
  flex-wrap: wrap;
}

.footer-phone-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(8, 13, 26, 0.52);
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 34px rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.footer-phone-row a:hover {
  border-color: rgba(196, 181, 253, 0.58);
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(15, 118, 110, 0.12)),
    rgba(8, 13, 26, 0.66);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 18px 42px rgba(0, 0, 0, 0.24);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 13, 26, 0.5);
}

.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px 0;
}

.footer-bottom-row p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  font-weight: 750;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 16px;
  font-weight: 750;
}

.footer-links a {
  color: var(--white);
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 0.76;
}

@media (max-width: 1080px) {
  .navbar {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 16px 0;
  }

  .nav-actions {
    justify-content: center;
  }

  .preview-hero-grid,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    min-width: 0;
  }

  .control-panel {
    position: static;
    max-height: none;
  }

  .template-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .full-template-hero,
  .full-template-stats,
  .full-feature-grid,
  .full-detail-grid,
  .full-process-grid {
    grid-template-columns: 1fr;
  }

  .full-template-hero {
    min-height: auto;
  }

  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 44px;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(calc(100% - 28px), 1180px);
  }

  .navbar {
    grid-template-columns: 1fr auto;
    justify-items: stretch;
    padding: 0;
  }

  .mobile-menu-btn {
    display: grid;
    place-items: center;
  }

  .nav-actions {
    justify-content: flex-end;
  }

  .nav-cta {
    display: none;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    left: 14px;
    right: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 18px 36px rgba(17, 24, 39, 0.14);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 10px;
  }

  .nav-actions .nav-preview-link {
    display: none;
  }

  .nav-links .mobile-preview-link {
    display: inline-flex;
    width: 100%;
    min-height: 44px;
  }

  .preview-hero {
    padding: 44px 0 14px;
  }

  .template-library {
    padding: 18px 0 64px;
  }

  .hero-metrics,
  .preview-site-hero,
  .preview-feature-row,
  .template-preview-grid,
  .preview-proof,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .hero-metrics div {
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  }

  .hero-metrics div:last-child {
    border-bottom: 0;
  }

  .preview-stage,
  .control-panel {
    padding: 14px;
  }

  .stage-toolbar,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    gap: 12px;
    margin-bottom: 18px;
  }

  .preview-site-nav {
    align-items: flex-start;
    padding: 20px;
  }

  .preview-site-nav div:last-child {
    display: none;
  }

  .preview-site-hero {
    padding: 28px 20px 26px;
  }

  .preview-site-hero h2 {
    font-size: 36px;
  }

  .preview-feature-row {
    padding: 0 20px 22px;
  }

  .preview-template-section {
    padding: 0 20px 24px;
  }

  .preview-section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .template-viewer {
    padding: 0;
  }

  .template-viewer-panel {
    width: 100%;
    height: 100vh;
    border-radius: 0;
  }

  .template-viewer-bar {
    grid-template-columns: 1fr auto;
    min-height: auto;
    padding: 12px 14px;
  }

  .viewer-title {
    display: none;
  }

  .viewer-actions {
    gap: 8px;
  }

  .viewer-selected {
    min-height: 38px;
    padding: 0 13px;
    font-size: 11px;
  }

  .viewer-close {
    width: 38px;
    min-height: 38px;
  }

  .full-template-nav {
    align-items: flex-start;
    padding: 18px;
  }

  .full-template-nav > div:last-child {
    display: none;
  }

  .full-template-hero,
  .full-template-section,
  .full-template-cta {
    padding: 44px 20px;
  }

  .full-template-hero h1 {
    font-size: 42px;
  }

  .full-template-hero p {
    font-size: 18px;
  }

  .whatsapp-float {
    right: calc(18px + env(safe-area-inset-right));
    bottom: calc(18px + env(safe-area-inset-bottom));
    width: 60px;
    height: 60px;
  }

  .whatsapp-float svg {
    width: 30px;
    height: 30px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 58px 0 44px;
  }

  .footer-column {
    gap: 14px;
  }

  .footer-phone-row {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
  }

  .footer-bottom-row,
  .footer-links {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 1180px) and (min-width: 721px) {
  .navbar {
    grid-template-columns: 1fr auto;
    justify-items: stretch;
    padding: 0;
  }

  .mobile-menu-btn {
    display: grid;
    place-items: center;
  }

  .nav-actions {
    justify-content: flex-end;
  }

  .nav-cta,
  .nav-actions .nav-preview-link {
    display: none;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    left: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 18px 36px rgba(17, 24, 39, 0.14);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 10px;
  }

  .nav-links .mobile-preview-link {
    display: inline-flex;
    width: 100%;
    min-height: 44px;
  }
}

@media (max-width: 540px) {
  .preview-hero h1 {
    font-size: clamp(34px, 10vw, 46px);
  }

  .preview-hero p,
  .full-template-hero p {
    font-size: 16px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .template-card {
    border-radius: 12px;
  }

  .template-viewer-bar {
    gap: 10px;
  }

  .viewer-selected {
    display: none;
  }
}

@media (max-width: 420px) {
  .container {
    width: min(calc(100% - 22px), 1180px);
  }

  .logo-img {
    width: 146px;
  }

  .preview-link,
  .viewer-back,
  .viewer-selected,
  .footer-phone-row a {
    width: 100%;
  }

  .template-viewer-bar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .full-template-hero,
  .full-template-section,
  .full-template-cta {
    padding: 36px 16px;
  }

  .full-template-hero h1 {
    font-size: 36px;
  }

  .full-template-nav {
    padding: 16px;
  }
}

img,
picture,
svg,
video {
  max-width: 100%;
  height: auto;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.template-card,
.hero-metrics,
.template-viewer-panel,
.full-template,
.full-template-nav,
.full-template-hero,
.full-feature-grid article,
.full-detail-grid article,
.full-process-grid article,
.footer-column {
  min-width: 0;
}

.footer-phone-row a,
.footer-column a,
.viewer-title,
.template-card p {
  max-width: 100%;
  overflow-wrap: anywhere;
}
