:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: #fff; background: #090909; }
button, input, textarea, select { font: inherit; }
a { color: inherit; }

.site-shell {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 16%, color-mix(in srgb, var(--primary) 42%, transparent), transparent 28%),
    linear-gradient(135deg, #090909 58%, color-mix(in srgb, var(--background) 35%, #090909));
}

body[data-background-mode="solid"] .site-shell { background: var(--background); }

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  min-height: 84px;
  margin: auto;
}

.brand { display: inline-flex; align-items: center; max-width: 100%; color: #fff; text-decoration: none; }
.brand img { display: block; width: auto; max-width: min(320px, 65vw); height: var(--logo-size, 36px); object-fit: contain; }
.brand span { font-size: var(--logo-size, 36px); font-weight: 900; line-height: 1; letter-spacing: -.055em; white-space: nowrap; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  min-height: 640px;
  margin: auto;
  padding: 70px 0 100px;
  gap: 80px;
}

.eyebrow { margin: 0 0 18px; color: var(--primary); font-size: 12px; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; }
.hero h1, .maker-copy h1 { max-width: 670px; margin: 0; font-size: clamp(56px, 7.1vw, 106px); font-weight: 900; line-height: .86; letter-spacing: -.072em; }
.hero h1 em { display: block; color: var(--primary); font-style: normal; }
.lede { max-width: 600px; margin: 30px 0; color: #ffffffa8; font-size: 18px; line-height: 1.65; }
.primary-button, .secondary-button { border: 0; border-radius: 999px; cursor: pointer; font-weight: 900; text-decoration: none; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 28px; min-height: 58px; padding: 0 28px; color: #fff; background: var(--primary); box-shadow: 0 16px 40px color-mix(in srgb, var(--primary) 34%, transparent); transition: transform .18s ease, filter .18s ease; }
.primary-button:hover { transform: translateY(-2px); filter: brightness(1.1); }
.privacy-note { margin: 15px 0 0; color: #ffffffa0; font-size: 12px; }
.campaign-preview { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; background: #050505; box-shadow: 0 38px 90px #0008; transition: transform .2s ease; }
.campaign-preview:hover { transform: scale(1.012); }
.preview-photo, .preview-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.preview-frame { z-index: 2; }

.how { width: min(1180px, calc(100% - 48px)); margin: auto; padding: 90px 0 120px; }
.how h2 { margin: 0 0 46px; font-size: clamp(42px, 6vw, 78px); line-height: 1; letter-spacing: -.055em; }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-card { min-height: 260px; padding: 30px; border: 1px solid #ffffff18; border-radius: 22px; background: #ffffff0b; }
.step-card strong { color: var(--primary); font-size: 56px; line-height: 1; }
.step-card h3 { margin: 36px 0 12px; font-size: 16px; letter-spacing: .08em; }
.step-card p { margin: 0; color: #ffffffa0; line-height: 1.6; }

.maker-page { min-height: 100vh; background: radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--primary) 26%, transparent), transparent 34%), #090909; }
.maker-page[data-background-mode="solid"] { background: var(--background); }
.maker-header { width: min(1180px, calc(100% - 48px)); }
.maker-shell { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 620px); justify-content: space-between; align-items: start; width: min(1100px, calc(100% - 48px)); margin: auto; padding: 50px 0 90px; gap: 60px; }
.maker-copy { position: sticky; top: 30px; padding-top: 40px; }
.maker-copy h1 { font-size: clamp(48px, 6vw, 76px); }
.maker-copy > p:not(.eyebrow) { color: #ffffffad; line-height: 1.65; }
.back-link { display: inline-block; margin-top: 26px; color: #ffffffb5; font-weight: 700; text-decoration: none; }
.photo-maker { display: grid; gap: 18px; }
.editor { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border: 1px solid #ffffff1a; border-radius: 22px; background: #141414; box-shadow: 0 35px 90px #0008; touch-action: none; }
.editor:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.editor canvas { display: block; width: 100%; height: 100%; }
.upload-overlay { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; border: 0; color: #fff; background: radial-gradient(circle, #ffffff0b, transparent 60%); cursor: pointer; text-align: center; }
.upload-overlay strong { display: inline-flex; justify-content: center; padding: 16px 26px; border-radius: 999px; color: #fff; background: var(--primary); }
.upload-overlay span { color: #ffffff8f; font-size: 12px; }
.maker-controls { display: grid; gap: 14px; padding: 20px; border: 1px solid #ffffff18; border-radius: 18px; background: #121212; }
.maker-controls label { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; color: #ffffffba; font-weight: 800; }
.maker-controls input[type="range"] { width: 100%; accent-color: var(--primary); }
.maker-controls output { min-width: 44px; text-align: right; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.secondary-button { min-height: 48px; color: #fff; background: #242424; }
.download-button { width: 100%; }
.maker-message { min-height: 24px; margin: 0; color: #ffffffa0; text-align: center; }
.maker-message.error { color: #ff968c; }
.maker-message.success { color: #adf38d; }

.admin-page { min-height: 100vh; padding: 40px 24px 80px; background: #0a0a0a; }
.login-card { width: min(460px, 100%); margin: 10vh auto 0; padding: 34px; border: 1px solid #ffffff18; border-radius: 24px; background: #131313; box-shadow: 0 35px 100px #0009; }
.login-card h1 { margin: 0; font-size: 42px; letter-spacing: -.05em; }
.login-card > p:not(.eyebrow) { color: #ffffff9e; }
.login-card form { display: grid; gap: 16px; margin-top: 28px; }
.login-card .primary-button { width: 100%; }
.admin-header { display: flex; align-items: end; justify-content: space-between; width: min(1120px, 100%); margin: 0 auto 28px; gap: 24px; }
.admin-header h1 { margin: 0; font-size: clamp(38px, 6vw, 64px); letter-spacing: -.05em; }
.admin-header nav { display: flex; gap: 10px; }
.admin-header nav a { padding: 12px 17px; border: 1px solid #ffffff1c; border-radius: 999px; text-decoration: none; }
.admin-shell { width: min(1120px, 100%); margin: auto; }
.form-message { margin: 0 0 18px; padding: 15px 18px; border-radius: 12px; }
.form-message.success { color: #d7ffc6; background: #73c34c1c; border: 1px solid #73c34c55; }
.form-message.error { color: #ffc2bb; background: #ff5a4a17; border: 1px solid #ff5a4a55; }
.admin-form { display: grid; gap: 18px; }
.admin-form fieldset { min-width: 0; margin: 0; padding: 26px; border: 1px solid #ffffff16; border-radius: 20px; background: #121212; }
.admin-form legend { padding: 0 8px; font-size: 21px; font-weight: 900; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-form label, .login-card label { display: grid; gap: 8px; color: #ffffff9e; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.admin-form .full { grid-column: 1 / -1; }
.admin-form input:not([type="checkbox"]):not([type="range"]):not([type="color"]), .admin-form textarea, .admin-form select, .login-card input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #ffffff18; border-radius: 12px; outline: none; color: #fff; background: #1d1d1d; }
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus, .login-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.admin-form input[type="color"] { width: 100%; height: 50px; padding: 4px; border: 1px solid #ffffff18; border-radius: 12px; background: #1d1d1d; }
.admin-form input[type="file"] { padding: 12px; border: 1px dashed #ffffff24; border-radius: 12px; background: #181818; }
.admin-form input[type="range"] { width: 100%; accent-color: var(--primary); }
.admin-form input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }
.admin-form textarea { resize: vertical; line-height: 1.5; }
.admin-form small { color: #ffffff78; font-weight: 500; letter-spacing: 0; text-transform: none; }
.admin-form .check { display: flex; align-items: center; gap: 10px; text-transform: none; }
.steps-admin { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps-admin section { display: grid; gap: 14px; padding: 18px; border: 1px solid #ffffff12; border-radius: 16px; }
.steps-admin strong { color: var(--primary); }
.save-button { position: sticky; z-index: 3; bottom: 20px; width: 100%; }
.admin-form output { color: #fff; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 50px; }
  .campaign-preview { width: min(520px, 100%); margin: auto; }
  .step-grid, .maker-shell { grid-template-columns: 1fr; }
  .maker-copy { position: static; padding-top: 0; }
  .steps-admin, .form-grid { grid-template-columns: 1fr; }
  .admin-form .full { grid-column: auto; }
  .admin-header { align-items: start; flex-direction: column; }
}

@media (max-width: 560px) {
  .site-header, .hero, .how, .maker-header, .maker-shell { width: min(calc(100% - 30px), 1180px); }
  .site-header { min-height: 98px; padding: 24px 0 14px; justify-content: center; }
  .brand span { max-width: 100%; font-size: min(var(--logo-size, 36px), 11vw); text-align: center; }
  .hero { padding: 28px 0 72px; gap: 46px; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero h1 { margin-right: auto; margin-left: auto; font-size: 56px; }
  .lede { margin-right: auto; margin-left: auto; font-size: 16px; }
  .privacy-note { text-align: center; }
  .how { padding: 72px 0; }
  .how > .eyebrow, .how > h2 { text-align: center; }
  .step-card { min-height: auto; }
  .maker-shell { padding-top: 24px; gap: 38px; }
  .maker-copy, .maker-copy .eyebrow { text-align: center; }
  .editor { border-radius: 14px; }
  .button-row { grid-template-columns: 1fr; }
  .admin-page { padding: 24px 14px 70px; }
  .admin-form fieldset, .login-card { padding: 20px; }
  .admin-header nav { width: 100%; }
  .admin-header nav a { flex: 1; text-align: center; }
}
