:root {
  color-scheme: light;
  --ink: #10242b;
  --muted: #6b7b7f;
  --mist: #f7fbfa;
  --paper: #ffffff;
  --aqua: #9bded9;
  --aqua-deep: #167178;
  --aqua-pale: #e9f7f5;
  --line: rgba(24, 68, 73, .12);
  --navy: #0b2932;
  --shadow: 0 28px 80px rgba(19, 59, 62, .11);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--mist); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
img, video, canvas { display: block; }
h1, h2, h3, p { margin-top: 0; }
:focus-visible { outline: 3px solid rgba(22, 113, 120, .28); outline-offset: 3px; }

.site-nav {
  position: sticky; top: 0; z-index: 50; height: 70px; padding: 0 clamp(18px, 5vw, 72px);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(247, 251, 250, .8); border-bottom: 1px solid rgba(255,255,255,.76);
  backdrop-filter: blur(24px) saturate(150%);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { border-radius: 10px; }
.brand span { display: grid; line-height: 1; }
.brand strong { font-size: 15px; letter-spacing: -.02em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.site-nav nav { display: flex; align-items: center; gap: 24px; font-size: 12px; }
.site-nav nav a { color: #43575c; }
.language-button { padding: 8px 10px; border: 0; color: var(--aqua-deep); background: transparent; font-weight: 650; }
.nav-cta, .primary-button { border: 0; border-radius: 999px; color: white; background: var(--ink); box-shadow: 0 9px 22px rgba(16,36,43,.15); font-weight: 650; }
.nav-cta { padding: 10px 17px; }
.primary-button { min-height: 50px; padding: 0 22px; }
.nav-cta:active, .primary-button:active, .secondary-button:active, .enhance-button:active, .export-button:active { transform: scale(.97); }

main { overflow: hidden; }
.hero { max-width: 1180px; min-height: 720px; margin: 0 auto; padding: 95px 28px; display: grid; grid-template-columns: .86fr 1.14fr; align-items: center; gap: clamp(50px, 8vw, 110px); }
.eyebrow { margin-bottom: 16px; color: var(--aqua-deep); font-size: 10px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
h1 { margin-bottom: 24px; font-size: clamp(54px, 6.2vw, 84px); line-height: .96; letter-spacing: -.058em; font-weight: 650; }
.hero-lede { color: var(--muted); font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; }
.hero-actions { margin-top: 32px; display: flex; align-items: center; gap: 12px; }
.trial-pill { min-height: 43px; padding: 0 15px; border: 1px solid rgba(22,113,120,.18); border-radius: 999px; color: var(--aqua-deep); background: rgba(255,255,255,.62); font-size: 11px; font-weight: 700; letter-spacing: -.01em; transition: transform 100ms ease-out, background 160ms ease, box-shadow 160ms ease; }
.trial-pill:hover { background: white; box-shadow: 0 8px 24px rgba(17,93,98,.1); }
.trial-pill:active { transform: scale(.97); }

.comparison-shell { min-width: 0; }
.comparison { position: relative; aspect-ratio: 4/5; max-height: 580px; overflow: hidden; border-radius: 38px; background: #0c2830; box-shadow: var(--shadow); cursor: ew-resize; touch-action: none; user-select: none; container-type: inline-size; }
.comparison img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.comparison-before { position: absolute; inset: 0 auto 0 0; width: 50%; overflow: hidden; }
.comparison-before img { width: 100cqw; max-width: none; }
.comparison-divider, .case-divider { position: absolute; z-index: 4; inset: 0 auto 0 50%; width: 1px; background: rgba(255,255,255,.9); }
.comparison-divider span, .case-divider span { position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; display: grid; place-items: center; transform: translate(-50%,-50%); border-radius: 50%; color: var(--ink); background: rgba(255,255,255,.93); box-shadow: 0 5px 18px rgba(0,0,0,.2); font-size: 13px; }
.image-label, .case-label { position: absolute; z-index: 3; bottom: 15px; padding: 6px 9px; border-radius: 999px; color: white; background: rgba(7,25,31,.48); backdrop-filter: blur(10px); font-size: 9px; }
.before-label, .case-label-left { left: 15px; }
.after-label, .case-label-right { right: 15px; }

.editor, .cases, .pricing, .video-showcase { max-width: 1120px; margin: 0 auto; padding: 88px 28px; }
.section-heading { max-width: 720px; margin-bottom: 32px; }
.section-heading.compact { margin-bottom: 30px; }
.section-heading h2 { margin-bottom: 10px; font-size: clamp(38px, 4.5vw, 58px); line-height: 1; letter-spacing: -.05em; font-weight: 630; }
.section-heading > p:last-child { color: var(--muted); font-size: 12px; }
.centered { margin-left: auto; margin-right: auto; text-align: center; }

.workspace-card { min-height: 620px; display: grid; grid-template-columns: minmax(0,1fr) 330px; overflow: hidden; border: 1px solid rgba(255,255,255,.78); border-radius: 30px; background: white; box-shadow: var(--shadow); }
.canvas-panel { min-width: 0; display: flex; flex-direction: column; background: #eaf3f2; }
.dropzone { position: relative; min-height: 560px; flex: 1; display: grid; place-items: center; overflow: hidden; border: 1px solid transparent; transition: border-color 150ms ease, background 150ms ease; }
.dropzone.dragging { border-color: var(--aqua-deep); background: #e0f3f0; }
#photoCanvas { display: none; max-width: 100%; max-height: 570px; object-fit: contain; }
.dropzone.has-photo #photoCanvas { display: block; }
.dropzone.has-photo .empty-state { display: none; }
.preview-watermark { position: absolute; inset: 9%; z-index: 2; display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: space-around; gap: 18px 42px; overflow: hidden; color: rgba(255,255,255,.42); text-shadow: 0 1px 8px rgba(6,34,42,.28); font-size: clamp(9px,1.35vw,16px); font-weight: 760; letter-spacing: .13em; pointer-events: none; transform: rotate(-18deg) scale(1.1); }
.dropzone.has-preview .preview-watermark { display: grid; }
.preview-watermark span:nth-child(even) { justify-self: end; }
.empty-state { padding: 36px; text-align: center; }
.upload-orb { width: 64px; height: 64px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 22px; color: var(--aqua-deep); background: rgba(255,255,255,.78); box-shadow: 0 14px 32px rgba(39,92,91,.1); font-size: 24px; }
.empty-state h3 { margin-bottom: 7px; font-size: 20px; letter-spacing: -.025em; }
.empty-state p { margin-bottom: 20px; color: var(--muted); font-size: 12px; }
.secondary-button { padding: 11px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: white; }
.processing-state { position: absolute; inset: 0; z-index: 10; display: none; place-content: center; justify-items: center; color: white; background: rgba(9,35,42,.76); backdrop-filter: blur(14px); }
.processing-state.show { display: grid; }
.processing-state strong { margin-top: 15px; }
.processing-ring { width: 32px; height: 32px; border: 2px solid rgba(255,255,255,.25); border-top-color: white; border-radius: 50%; animation: spin .8s linear infinite; }
.preview-bar { min-height: 52px; padding: 0 18px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-top: 1px solid var(--line); background: rgba(255,255,255,.8); }
.preview-bar[hidden] { display: none; }
.preview-bar p { margin: 0; max-width: 280px; overflow: hidden; color: var(--muted); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.text-button { border: 0; color: var(--aqua-deep); background: transparent; font-size: 11px; }
.text-button:last-child { justify-self: end; }

.control-panel { padding: 22px; display: flex; flex-direction: column; gap: 17px; }
.analysis-card { padding: 17px; border-radius: 17px; background: var(--aqua-pale); }
.analysis-card small { display: block; margin-bottom: 12px; color: var(--aqua-deep); font-size: 9px; font-weight: 750; letter-spacing: .13em; }
.analysis-card strong { display: block; margin-bottom: 5px; font-size: 16px; letter-spacing: -.02em; }
.analysis-card p { margin: 0; color: var(--muted); font-size: 11px; }
.enhance-button { width: 100%; min-height: 62px; padding: 10px 16px; border: 0; border-radius: 17px; display: flex; align-items: center; gap: 13px; text-align: left; color: white; background: var(--navy); }
.enhance-button:disabled, .export-button:disabled { opacity: .34; }
.spark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; color: var(--ink); background: var(--aqua); }
.enhance-button span:last-child { display: grid; gap: 2px; }
.enhance-button small { color: rgba(255,255,255,.55); font-size: 9px; }
.look-picker { margin: 0; padding: 0; border: 0; }
.look-picker legend { margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.look-picker > div { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; padding: 4px; border-radius: 13px; background: #f0f4f3; }
.look-option { min-height: 38px; padding: 4px; border: 0; border-radius: 10px; color: #607176; background: transparent; font-size: 10px; }
.look-option.active { color: var(--ink); background: white; box-shadow: 0 5px 14px rgba(17,33,40,.08); }
.fine-tune { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fine-tune summary { padding: 14px 0; list-style: none; cursor: pointer; color: #43565b; font-size: 11px; }
.fine-tune summary::-webkit-details-marker { display: none; }
.fine-tune summary::after { content: "+"; float: right; }
.fine-tune[open] summary::after { content: "−"; }
.slider-stack { padding-bottom: 14px; display: grid; gap: 12px; }
.slider-row label { margin-bottom: 5px; display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.slider-row input { width: 100%; accent-color: var(--aqua-deep); }
.export-area { margin-top: auto; }
.export-button { width: 100%; min-height: 46px; border: 0; border-radius: 14px; color: white; background: var(--aqua-deep); font-weight: 650; }
.export-area p { margin: 9px 0 0; text-align: center; color: var(--muted); font-size: 9px; }

.case-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px 14px; }
.case-card { min-width: 0; }
.case-card h3 { margin: 11px 3px 0; font-size: 13px; letter-spacing: -.01em; font-weight: 600; }
.case-compare { position: relative; aspect-ratio: 16/10; overflow: hidden; border-radius: 20px; background: #0a2730; box-shadow: 0 14px 40px rgba(20,57,60,.09); cursor: ew-resize; touch-action: none; user-select: none; container-type: inline-size; }
.case-compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.case-before { position: absolute; inset: 0 auto 0 0; width: 50%; overflow: hidden; }
.case-before img { width: 100cqw; max-width: none; }
.before-grade { filter: brightness(.62) contrast(.84) saturate(.52) hue-rotate(12deg) blur(.35px); }
.before-portrait { filter: brightness(.62) contrast(.78) saturate(.48) hue-rotate(14deg) blur(.55px); }
.before-rays { filter: brightness(.56) contrast(.78) saturate(.46) hue-rotate(10deg) blur(.45px); }
.before-reef { filter: brightness(.58) contrast(.8) saturate(.38) hue-rotate(19deg) blur(.42px); }
.before-green { filter: brightness(.66) contrast(.76) saturate(.48) sepia(.12) hue-rotate(48deg) blur(.38px); }
.before-wreck { filter: brightness(.42) contrast(.76) saturate(.38) hue-rotate(14deg) blur(.72px); }
.before-ocean { filter: brightness(.58) contrast(.8) saturate(.5) hue-rotate(8deg) blur(.4px); }
.before-macro { filter: brightness(.62) contrast(.76) saturate(.44) hue-rotate(18deg) blur(.62px); }
.before-night { filter: brightness(.38) contrast(.7) saturate(.4) hue-rotate(12deg) blur(.85px); }
.before-kelp { filter: brightness(.58) contrast(.76) saturate(.45) sepia(.08) hue-rotate(36deg) blur(.5px); }
.before-whale { filter: brightness(.54) contrast(.8) saturate(.48) hue-rotate(8deg) blur(.48px); }
.case-divider span { width: 30px; height: 30px; font-size: 11px; }
.case-label { bottom: 10px; padding: 5px 7px; font-size: 8px; }
.case-label-left { left: 10px; }
.case-label-right { right: 10px; }

.video-showcase video { width: 100%; aspect-ratio: 16/9; border-radius: 28px; background: var(--navy); box-shadow: var(--shadow); }
.video-showcase > p { margin: 12px 2px 0; color: var(--muted); font-size: 10px; }

.price-grid { max-width: 820px; margin: 0 auto; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.price-grid article { padding: 26px; display: grid; gap: 9px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.68); }
.price-grid strong { font-size: 36px; letter-spacing: -.04em; }
.price-grid span { color: var(--muted); font-size: 12px; }
.price-grid button { margin-top: 15px; min-height: 41px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; font-size: 11px; font-weight: 650; }
.price-grid .recommended { border-color: rgba(22,113,120,.32); background: white; box-shadow: 0 16px 48px rgba(23,108,115,.09); }
.recommended button { color: white; border-color: var(--aqua-deep); background: var(--aqua-deep); }
.payment-note { margin-top: 17px; text-align: center; color: var(--muted); font-size: 10px; }

footer { max-width: 1064px; margin: 30px auto 0; padding: 34px 28px 42px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; color: var(--muted); font-size: 10px; }
footer > p { margin: 0; }
footer > div { justify-self: end; display: flex; gap: 18px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; padding: 10px 15px; border-radius: 999px; color: white; background: rgba(13,39,48,.92); transform: translate(-50%,18px); opacity: 0; pointer-events: none; transition: opacity 180ms ease, transform 240ms ease; font-size: 11px; }
.toast.show { transform: translate(-50%,0); opacity: 1; }
.launch-dialog { width: min(90vw,460px); padding: 36px; border: 1px solid rgba(255,255,255,.8); border-radius: 26px; color: var(--ink); background: rgba(255,255,255,.95); box-shadow: 0 32px 100px rgba(7,28,34,.24); backdrop-filter: blur(24px); }
.launch-dialog::backdrop { background: rgba(8,28,34,.36); backdrop-filter: blur(4px); }
.launch-dialog h2 { margin-bottom: 10px; font-size: 34px; letter-spacing: -.04em; }
.launch-dialog p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.dialog-close { position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--muted); background: var(--aqua-pale); font-size: 20px; }
.account-dialog { width: min(92vw, 460px); padding: 38px; border: 1px solid rgba(255,255,255,.84); border-radius: 28px; color: var(--ink); background: rgba(255,255,255,.97); box-shadow: 0 32px 100px rgba(7,28,34,.24); backdrop-filter: blur(24px); }
.account-dialog::backdrop { background: rgba(8,28,34,.36); backdrop-filter: blur(4px); }
.account-dialog h2 { margin-bottom: 10px; font-size: 38px; line-height: 1; letter-spacing: -.045em; }
.account-dialog section > p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.55; }
.reward-card { margin-top: 21px; overflow: hidden; border: 1px solid rgba(22,113,120,.13); border-radius: 17px; background: linear-gradient(135deg, rgba(223,244,240,.72), rgba(255,255,255,.8)); }
.reward-card > div { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; min-height: 53px; padding: 11px 13px; }
.reward-card > div + div { border-top: 1px solid rgba(22,113,120,.1); }
.reward-card span { color: var(--aqua-deep); font-size: 10px; font-weight: 750; letter-spacing: .04em; }
.reward-card p { margin: 0; color: var(--ink) !important; font-size: 11px !important; line-height: 1.25 !important; }
.reward-card strong { color: var(--aqua-deep); font-size: 11px; white-space: nowrap; }
.account-dialog form { margin-top: 24px; display: grid; gap: 10px; }
.account-dialog label { color: var(--muted); font-size: 11px; }
.account-dialog input { width: 100%; min-height: 49px; padding: 0 15px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #f8fbfa; outline: none; }
.account-dialog input:focus { border-color: rgba(22,113,120,.55); box-shadow: 0 0 0 4px rgba(22,113,120,.08); }
.account-dialog .primary-button { margin-top: 5px; }
.auth-note { min-height: 18px; margin: 13px 0 0; color: var(--muted); font-size: 11px !important; }
.credit-balance { margin: 24px 0 12px; display: flex; align-items: baseline; gap: 9px; }
.credit-balance strong { font-size: 68px; line-height: .9; letter-spacing: -.06em; }
.credit-balance span { color: var(--muted); font-size: 13px; }
.referral-summary { margin-top: 18px; padding: 14px; border-radius: 16px; background: rgba(223,244,240,.52); }
.referral-summary strong { font-size: 13px; }
.referral-summary p { margin: 5px 0 0; color: var(--muted); font-size: 11px !important; line-height: 1.55; }
.invite-row { margin-top: 22px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.invite-row button { padding: 0 15px; border: 0; border-radius: 13px; color: white; background: var(--aqua-deep); font-weight: 650; }
.signout-button { margin-top: 20px; padding: 0; }

.legal-main { min-height: calc(100vh - 160px); overflow: visible; }
.legal-hero { max-width: 820px; margin: 0 auto; padding: 100px 28px 28px; }
.legal-hero h1 { font-size: clamp(44px,7vw,72px); }
.legal-hero > p:last-child { max-width: 650px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.legal-copy { max-width: 820px; margin: 0 auto; padding: 30px 28px 110px; }
.legal-copy section { padding: 28px 0; border-top: 1px solid var(--line); }
.legal-copy h2 { margin-bottom: 12px; font-size: 22px; }
.legal-copy p, .legal-copy li { color: var(--muted); font-size: 14px; line-height: 1.75; }
.legal-note { padding: 18px 20px; border-radius: 16px; background: var(--aqua-pale); }

@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 860px) {
  .site-nav nav a { display: none; }
  .site-nav nav { gap: 10px; }
  .hero { min-height: auto; grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  .comparison { max-width: 630px; margin: 0 auto; aspect-ratio: 5/4; }
  .workspace-card { grid-template-columns: 1fr; }
  .control-panel { min-height: 500px; }
  .case-grid { grid-template-columns: repeat(2,1fr); }
  .price-grid { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; gap: 20px; justify-items: center; text-align: center; }
  footer > div { justify-self: auto; }
}
@media (max-width: 560px) {
  .site-nav { height: 64px; padding-inline: 16px; }
  .brand small { display: none; }
  .language-button { padding-inline: 6px; }
  .hero { padding: 62px 16px 72px; }
  h1 { font-size: 51px; }
  .hero-actions { flex-direction: column; }
  .reward-card > div { grid-template-columns: 25px 1fr; }
  .reward-card strong { grid-column: 2; }
  .comparison { border-radius: 27px; }
  .editor, .cases, .pricing, .video-showcase { padding: 70px 16px; }
  .workspace-card { border-radius: 24px; }
  .dropzone { min-height: 390px; }
  .case-grid { grid-template-columns: 1fr; gap: 24px; }
  .case-compare { border-radius: 18px; }
  .video-showcase video { border-radius: 20px; }
  .preview-bar { grid-template-columns: 1fr 1fr; }
  .preview-bar p { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-nav, .processing-state, .toast, .launch-dialog, .launch-dialog::backdrop { backdrop-filter: none; }
  .site-nav { background: var(--mist); }
}
