@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #121524;
  --muted: #646a7d;
  --line: rgba(24, 29, 49, 0.10);
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --blue: #4768f7;
  --violet: #8b62f4;
  --success: #248965;
  --shadow: 0 30px 90px rgba(70, 76, 125, 0.15);
  font-family: 'DM Sans', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 2%, rgba(135, 166, 255, 0.30), transparent 29rem),
    radial-gradient(circle at 88% 10%, rgba(205, 174, 255, 0.30), transparent 26rem),
    linear-gradient(180deg, #fbfcff 0%, #f4f5fa 100%);
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { border: 0; }
img { max-width: 100%; }

.icon { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }

.site-shell { min-height: 100vh; }
.topbar {
  width: min(1180px, calc(100% - 32px));
  height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: 'Manrope', sans-serif; font-weight: 800; letter-spacing: -0.04em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  color: white; font-size: 14px; font-weight: 800;
  background: linear-gradient(140deg, #1f2e73, #5573ff 52%, #a26af4);
  box-shadow: 0 10px 24px rgba(73, 99, 228, 0.28);
}
.brand small { color: #8a8fa0; font-family: 'DM Sans'; font-weight: 600; letter-spacing: 0; margin-left: 2px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-link, .ghost-button, .primary-button, .secondary-button {
  min-height: 42px; border-radius: 999px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.nav-link, .ghost-button { background: transparent; color: #4f5567; }
.nav-link:hover, .ghost-button:hover { background: rgba(255,255,255,.7); }
.primary-button {
  color: white; background: linear-gradient(135deg, #3658ef, #7f62ef 70%, #a75de7); box-shadow: 0 13px 28px rgba(83, 86, 214, .24);
}
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(83,86,214,.30); }
.primary-button:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.secondary-button { color: #28304a; background: rgba(255,255,255,.84); border: 1px solid var(--line); }
.secondary-button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(65,70,100,.10); }
.button-wide { width: 100%; }

.hero {
  width: min(1180px, calc(100% - 32px)); margin: 36px auto 90px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 64px;
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(81,91,163,.15); border-radius: 999px; padding: 8px 12px; background: rgba(255,255,255,.62); color: #5a6180; font-size: 13px; font-weight: 700; }
.hero h1 { font-family: 'Manrope'; font-size: clamp(3.15rem, 6.8vw, 6.4rem); line-height: .95; letter-spacing: -.075em; margin: 24px 0; max-width: 760px; }
.hero h1 span { display: block; background: linear-gradient(108deg, #2a43b9 8%, #5b61ed 43%, #9a5fe5 88%); -webkit-background-clip: text; color: transparent; }
.hero-copy { font-size: 1.18rem; line-height: 1.7; color: var(--muted); max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 16px; color: #8a8fa0; font-size: 13px; }

.phone-stage { position: relative; min-height: 660px; display: grid; place-items: center; }
.phone-stage::before { content: ''; position: absolute; width: 82%; height: 82%; border-radius: 50%; background: radial-gradient(circle, rgba(138,143,255,.29), rgba(199,170,255,.12) 48%, transparent 70%); filter: blur(8px); }
.device {
  width: min(360px, 88vw); min-height: 640px; border-radius: 46px; padding: 11px; position: relative; z-index: 2; background: linear-gradient(150deg, #18203d, #080b16 55%, #283052); box-shadow: 0 42px 100px rgba(30,34,70,.30), inset 0 0 0 1px rgba(255,255,255,.18); transform: rotate(2.2deg);
}
.device-screen { min-height: 618px; overflow: hidden; border-radius: 37px; background: #f7f8fd; }
.floating-chip { position: absolute; z-index: 4; padding: 12px 15px; border-radius: 18px; background: rgba(255,255,255,.90); border: 1px solid rgba(255,255,255,.8); box-shadow: 0 18px 48px rgba(43,48,89,.15); backdrop-filter: blur(18px); font-weight: 700; font-size: 13px; }
.chip-a { top: 17%; left: -7%; }
.chip-b { bottom: 17%; right: -5%; }

.section { width: min(1100px, calc(100% - 32px)); margin: 0 auto 100px; }
.section-heading { max-width: 700px; margin-bottom: 36px; }
.section-heading h2 { font-family: 'Manrope'; font-size: clamp(2rem, 4vw, 3.8rem); letter-spacing: -.06em; margin: 12px 0; }
.section-heading p { color: var(--muted); line-height: 1.7; font-size: 1.05rem; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-card { background: rgba(255,255,255,.70); border: 1px solid rgba(255,255,255,.95); box-shadow: 0 20px 60px rgba(74,79,115,.08); border-radius: 28px; padding: 28px; }
.step-number { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; background: #eef0ff; color: #5261da; }
.step-card h3 { font-family: 'Manrope'; margin: 28px 0 10px; font-size: 1.25rem; }
.step-card p { color: var(--muted); line-height: 1.65; margin: 0; }

.app-page { width: min(1220px, calc(100% - 28px)); margin: 18px auto 70px; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.app-title h1 { font-family: 'Manrope'; letter-spacing: -.045em; margin: 0 0 6px; font-size: clamp(1.8rem, 4vw, 2.7rem); }
.app-title p { margin: 0; color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(360px, .95fr) minmax(380px, 1.05fr); gap: 22px; align-items: start; }
.panel { border-radius: 30px; background: rgba(255,255,255,.76); border: 1px solid rgba(255,255,255,.94); box-shadow: 0 24px 70px rgba(58,64,104,.10); backdrop-filter: blur(24px); }
.form-panel { padding: 26px; }
.preview-panel { padding: 18px; position: sticky; top: 16px; }
.progress-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.progress-label { color: var(--muted); font-size: 13px; font-weight: 700; }
.progress-track { width: 120px; height: 6px; background: #eaecf4; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 33%; background: linear-gradient(90deg,#4b67ee,#9b65e9); border-radius: inherit; transition: width .25s ease; }
.form-step { display: none; }
.form-step.active { display: block; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.form-step h2 { font-family: 'Manrope'; letter-spacing: -.035em; margin: 0 0 8px; }
.form-step > p { color: var(--muted); line-height: 1.6; margin: 0 0 24px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 800; color: #4d5366; }
.field small { color: #8c91a2; line-height: 1.45; }
.input, .textarea, .select {
  width: 100%; border: 1px solid rgba(37,43,72,.12); border-radius: 15px; background: rgba(255,255,255,.88); color: var(--ink); padding: 13px 14px; outline: none; transition: border .2s ease, box-shadow .2s ease;
}
.input:focus, .textarea:focus, .select:focus { border-color: rgba(82,100,224,.55); box-shadow: 0 0 0 4px rgba(84,101,226,.10); }
.textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.field-error { color: #b13d57; font-size: 12px; min-height: 16px; }
.avatar-upload { display: grid; grid-template-columns: 74px 1fr; gap: 15px; align-items: center; margin-bottom: 20px; }
.avatar-thumb { width: 74px; height: 74px; border-radius: 24px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(140deg,#e7eaff,#f6eaff); color: #6570bd; font-size: 24px; font-weight: 800; border: 1px solid rgba(72,80,130,.09); }
.avatar-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-button { display: inline-flex; width: fit-content; align-items: center; padding: 10px 14px; border-radius: 12px; background: #f0f2f8; cursor: pointer; font-weight: 700; color: #4c5368; }
.upload-button input { display: none; }
.form-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.ai-box { border-radius: 20px; padding: 18px; background: linear-gradient(145deg, rgba(236,240,255,.95), rgba(248,239,255,.95)); border: 1px solid rgba(102,108,210,.12); margin-bottom: 18px; }
.ai-box-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.ai-label { display: inline-flex; gap: 8px; align-items: center; font-weight: 800; color: #4e59ab; }
.ai-note { color: #797f95; font-size: 12px; margin: 10px 0 0; line-height: 1.5; }
.style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.style-option { cursor: pointer; border: 1px solid rgba(34,40,68,.11); border-radius: 17px; padding: 12px; background: rgba(255,255,255,.72); }
.style-option.active { border-color: #6473e8; box-shadow: 0 0 0 3px rgba(100,115,232,.11); }
.style-swatch { height: 68px; border-radius: 12px; margin-bottom: 10px; }
.swatch-tech { background: radial-gradient(circle at 20% 20%,#b8c8ff,transparent 40%), linear-gradient(145deg,#151a34,#4f61e8 65%,#ad72ee); }
.swatch-executive { background: linear-gradient(145deg,#f4f0e7,#b9ad97 55%,#2d2c2a); }
.swatch-creator { background: radial-gradient(circle at 80% 20%,#ffbf9d,transparent 35%), linear-gradient(145deg,#f06fa6,#6f53df); }
.style-option strong { display: block; font-size: 13px; }
.style-option span { color: #8b90a0; font-size: 11px; }

.identity-card { min-height: 680px; border-radius: 28px; position: relative; overflow: hidden; isolation: isolate; }
.identity-card::before, .identity-card::after { content: ''; position: absolute; border-radius: 50%; filter: blur(3px); z-index: -1; }
.identity-card::before { width: 310px; height: 310px; top: -150px; right: -110px; }
.identity-card::after { width: 280px; height: 280px; bottom: -160px; left: -130px; }
.identity-card.tech { color: #f8f9ff; background: radial-gradient(circle at 20% 10%,rgba(92,119,255,.36),transparent 34%), linear-gradient(160deg,#11162e 0%,#171e3e 55%,#2a2250 100%); }
.identity-card.tech::before { background: rgba(126,94,255,.32); }
.identity-card.tech::after { background: rgba(66,136,255,.24); }
.identity-card.executive { color: #211f1b; background: linear-gradient(155deg,#f4f0e7,#e5ddd0 54%,#c8bbab); }
.identity-card.executive::before { background: rgba(255,255,255,.65); }
.identity-card.executive::after { background: rgba(70,57,43,.12); }
.identity-card.creator { color: white; background: radial-gradient(circle at 12% 2%,rgba(255,216,184,.42),transparent 30%), linear-gradient(155deg,#dc568d,#7b4ed5 58%,#293060); }
.identity-card.creator::before { background: rgba(255,183,110,.36); }
.identity-card.creator::after { background: rgba(62,221,230,.20); }
.card-inner { padding: 34px; min-height: 680px; display: flex; flex-direction: column; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-monogram { font-family: 'Manrope'; font-weight: 800; letter-spacing: -.05em; }
.card-status { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; opacity: .65; }
.profile-block { margin-top: 48px; }
.profile-avatar { width: 112px; height: 112px; border-radius: 34px; overflow: hidden; display: grid; place-items: center; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.18); box-shadow: 0 18px 48px rgba(0,0,0,.16); font-family: 'Manrope'; font-size: 36px; font-weight: 800; }
.executive .profile-avatar { background: rgba(255,255,255,.48); border-color: rgba(54,45,34,.08); box-shadow: 0 18px 48px rgba(66,54,42,.12); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-block h2 { font-family: 'Manrope'; font-size: clamp(2rem,4vw,3.25rem); line-height: 1; letter-spacing: -.065em; margin: 24px 0 12px; }
.identity-line { font-size: 1.02rem; line-height: 1.45; max-width: 560px; opacity: .86; margin: 0; }
.profile-bio { line-height: 1.65; opacity: .70; margin: 22px 0; font-size: .94rem; max-width: 600px; }
.primary-card-cta { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 54px; padding: 0 18px; border-radius: 16px; color: #1a1d30; background: rgba(255,255,255,.94); font-weight: 800; box-shadow: 0 14px 30px rgba(0,0,0,.12); }
.executive .primary-card-cta { color: white; background: #292722; }
.social-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.social-chip { min-height: 42px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border-radius: 13px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); font-size: 12px; font-weight: 700; }
.executive .social-chip { border-color: rgba(56,48,39,.12); background: rgba(255,255,255,.32); }
.card-footer { margin-top: auto; padding-top: 26px; display: flex; justify-content: space-between; align-items: center; font-size: 11px; opacity: .58; }
.card-footer strong { font-family: 'Manrope'; }
.preview-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 15px 5px 0; color: var(--muted); font-size: 12px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #38a77d; box-shadow: 0 0 0 4px rgba(56,167,125,.12); display: inline-block; margin-right: 6px; }

.full-preview { width: min(760px, calc(100% - 28px)); margin: 34px auto 70px; }
.full-preview .identity-card { min-height: 760px; }
.full-preview .card-inner { min-height: 760px; padding: clamp(28px,6vw,60px); }
.preview-action-bar { margin-top: 14px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; z-index: 50; background: #1e2338; color: white; border-radius: 999px; padding: 11px 16px; box-shadow: 0 16px 45px rgba(18,23,45,.28); font-size: 13px; font-weight: 700; transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.empty-link { opacity: .42; }

footer { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; color: #8a8fa0; font-size: 13px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; margin-top: 22px; }
  .hero h1 { font-size: clamp(3.5rem,13vw,6rem); }
  .phone-stage { min-height: 610px; }
  .workspace { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
  .steps-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .topbar { height: 68px; }
  .brand small, .nav-link { display: none; }
  .hero { margin-bottom: 64px; gap: 28px; }
  .hero h1 { font-size: clamp(3.25rem,16vw,5rem); }
  .hero-copy { font-size: 1rem; }
  .phone-stage { min-height: 560px; }
  .device { transform: none; width: 100%; min-height: 575px; border-radius: 38px; }
  .device-screen { min-height: 553px; border-radius: 30px; }
  .floating-chip { display: none; }
  .app-page { margin-top: 8px; }
  .app-header { align-items: flex-start; }
  .app-header .secondary-button { padding: 0 13px; }
  .form-panel, .preview-panel { padding: 16px; border-radius: 24px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .style-grid { grid-template-columns: 1fr 1fr 1fr; }
  .style-option { padding: 8px; }
  .style-swatch { height: 48px; }
  .style-option span { display: none; }
  .card-inner { padding: 24px; min-height: 620px; }
  .identity-card { min-height: 620px; border-radius: 23px; }
  .profile-block { margin-top: 35px; }
  .profile-avatar { width: 90px; height: 90px; border-radius: 27px; }
  .profile-block h2 { font-size: 2.35rem; }
  .form-actions { position: sticky; bottom: 8px; background: rgba(255,255,255,.92); backdrop-filter: blur(18px); border-radius: 17px; padding: 10px; margin-inline: -5px; }
  footer { flex-direction: column; }
}

.ai-context-section { padding-top: 20px; }
.context-page { width: min(900px, calc(100% - 32px)); margin: 42px auto 80px; }
.context-card { margin-top: 22px; border: 1px solid var(--line); background: rgba(255,255,255,.84); box-shadow: var(--shadow); border-radius: 28px; overflow: hidden; }
.context-card-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.context-card-head div { display: grid; gap: 4px; }
.context-card-head span { color: var(--muted); font-size: 12px; }
.context-card pre { margin: 0; padding: 28px; overflow: auto; white-space: pre-wrap; word-break: break-word; font: 500 13px/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; color: #2e344a; background: linear-gradient(180deg, rgba(245,247,255,.9), rgba(255,255,255,.96)); }
@media (max-width: 620px) {
  .context-card-head { align-items: stretch; flex-direction: column; }
  .context-card-head .primary-button { width: 100%; }
  .context-card pre { padding: 20px; font-size: 12px; }
}
