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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.64;
  overflow-x: clip;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  line-height: 1.18;
}

p {
  margin: 0;
}

code, pre, .mono {
  font-family: var(--font-mono);
}

p code,
li code,
td code {
  font-size: 0.9em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  overflow-wrap: anywhere;
}

.wrap {
  width: min(var(--container), calc(100% - 32px));
  margin-inline: auto;
}

/* ======================== HEADER ======================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--nav-bg);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  width: min(var(--container), calc(100% - 32px));
  margin-inline: auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.brand-dot {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}

.brand-note {
  font-size: 12px;
  color: var(--text-mute);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 7px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.nav-link[aria-current="page"] {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.theme-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.theme-opt {
  border: 0;
  background: transparent;
  color: var(--text-mute);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.theme-opt.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.burger-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--scrim);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.mobile-drawer.is-open {
  display: flex;
  justify-content: flex-end;
}

.mobile-drawer-panel {
  width: min(310px, 88vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* ======================== BUTTONS & PILLS ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 120ms var(--ease), border-color 140ms var(--ease);
}

.btn:hover {
  border-color: var(--accent);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: transparent;
}

.btn-ghost {
  background: transparent;
  box-shadow: none;
  border-color: var(--border);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 13px;
  border-radius: var(--r-sm);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--text-soft);
  border: 1px solid var(--border);
}

.pill-warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn-border);
}

.pill-ok {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: transparent;
}

.pill-accent {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}

/* ======================== LAYOUT & CARDS ======================== */
.draft-strip {
  background: var(--warn-bg);
  border-bottom: 1px solid var(--warn-border);
  padding: 9px 0;
  font-size: 13.5px;
  color: var(--text);
}

.draft-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hero {
  padding: 48px 0 32px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 0.94fr 1.06fr;
  gap: 32px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(30px, 4vw, 46px);
  margin: 14px 0 14px;
}

.lead {
  font-size: 17px;
  color: var(--text-soft);
  max-width: 52ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.page-head {
  padding: 40px 0 22px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-mute);
  margin-bottom: 12px;
}

.breadcrumbs a:hover {
  color: var(--text);
}

.page-head h1 {
  font-size: clamp(28px, 3.6vw, 40px);
  margin-bottom: 10px;
}

.section {
  padding: 28px 0;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: clamp(22px, 2.8vw, 30px);
  margin-bottom: 6px;
}

.section-head p {
  color: var(--text-soft);
  max-width: 60ch;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.card-soft {
  background: var(--surface-2);
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 18px;
}

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

.grid-2 > *,
.grid-3 > *,
.grid-4 > *,
.hero-layout > * {
  min-width: 0;
}

/* ======================== INTERACTIVE PREVIEW STAGE ======================== */
.preview-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 14px;
}

.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tab-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-md);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.tab-btn {
  border: 0;
  background: transparent;
  color: var(--text-soft);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.preview-screen {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0b0e14;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  cursor: zoom-in;
}

.preview-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.preview-screen.is-portrait img {
  object-fit: contain;
}

.preview-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 4px 2px;
  font-size: 13.5px;
  color: var(--text-soft);
}

/* ======================== LISTS, SHOTS, TABLES ======================== */
.clean-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: var(--text-soft);
  font-size: 14.5px;
}

.clean-list li {
  position: relative;
  padding-left: 18px;
}

.clean-list li::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: var(--accent);
  font-weight: 700;
}

.shot-card {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0b0e14;
  cursor: zoom-in;
}

.shot-card img {
  width: 100%;
  height: auto;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 10px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}

table.simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--surface);
}

table.simple-table th,
table.simple-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.simple-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-mute);
  background: var(--surface-2);
}

table.simple-table tr:last-child td {
  border-bottom: 0;
}

/* ======================== FAQ & FORMS ======================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}

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

.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

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

.faq-body {
  padding: 12px 20px 18px;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 14.5px;
}

.inp,
.sel,
.textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.inp:focus,
.sel:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.inp:focus-visible,
.sel:focus-visible,
.textarea:focus-visible,
.btn:focus-visible,
[data-zoom-img]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.textarea {
  min-height: 115px;
  resize: vertical;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.is-full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}

.preview-mail {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-x: auto;
  margin: 0;
}

/* ======================== MODALS & LIGHTBOX ======================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 16px;
  background: var(--scrim);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-backdrop.is-open {
  display: grid;
}

.modal-box {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}

.lightbox-box {
  width: min(1040px, 100%);
  max-height: 92vh;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lightbox-img-wrap {
  overflow: auto;
  max-height: calc(92vh - 90px);
  border-radius: var(--r-md);
  background: #0b0e14;
  display: grid;
  place-items: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--accent);
  box-shadow: var(--shadow-md);
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
}

.toast.is-show {
  opacity: 1;
  transform: translateY(0);
}

/* ======================== FOOTER ======================== */
.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: var(--text-soft);
}

.footer-links a:hover {
  color: var(--text);
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 920px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav-links {
    display: none;
  }
  .burger-btn {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .nav-inner {
    width: calc(100% - 20px);
    gap: 8px;
  }
  .brand-note {
    display: none;
  }
  .theme-opt {
    padding: 4px 8px;
    font-size: 11.5px;
  }
  .card {
    padding: 18px;
  }
}

.hide {
  display: none !important;
}
