:root {
  --navy: #075090;
  --deep: #05385f;
  --aqua: #2bbbd0;
  --light-aqua: #e7f8fa;
  --water: #77d5e2;
  --red: #ec3d39;
  --yellow: #f7c52b;
  --ink: #10364c;
  --muted: #64818f;
  --line: #b9dfe5;
  --white: #fff;
  --shadow: 0 20px 55px rgba(5, 56, 95, 0.14);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: #f3fafb;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 8%, rgba(43, 187, 208, .17), transparent 30rem),
    radial-gradient(circle at 92% 20%, rgba(119, 213, 226, .20), transparent 26rem),
    linear-gradient(180deg, #fff 0, #f4fbfc 45%, #e9f8fa 100%);
}

button, input { font: inherit; }
button, label[for] { -webkit-tap-highlight-color: transparent; }

.app-shell {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px clamp(18px, 5vw, 32px) calc(30px + env(safe-area-inset-bottom));
}

.brand-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.brand-header p {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: var(--navy);
  line-height: 1;
  transform: rotate(-1deg);
}

.brand-mark strong {
  font-size: clamp(31px, 9vw, 44px);
  letter-spacing: -.065em;
}

.brand-mark small {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: .12em;
}

.brand-swoosh {
  width: 92%;
  height: 7px;
  margin-bottom: 2px;
  border-top: 3px solid var(--navy);
  border-radius: 50%;
  transform: skewX(-18deg);
}

.stepper {
  display: grid;
  grid-template-columns: 30px 1fr 30px 1fr 30px;
  align-items: center;
  width: 82%;
  margin: 0 auto 28px;
}

.step {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.step.is-active, .step.is-done {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.step-line { height: 2px; background: var(--line); }
.step-line.is-done { background: var(--navy); }

.screen { display: none; animation: enter .32s ease both; }
.screen.is-active { display: block; }

@keyframes enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.intro { margin: 0 auto 24px; text-align: center; }
.intro.compact { margin-bottom: 20px; }
.intro h1 {
  margin: 7px 0 10px;
  color: var(--deep);
  font-size: clamp(34px, 9vw, 50px);
  line-height: .98;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.intro.compact h1 { font-size: clamp(32px, 8vw, 44px); }
.intro > p:not(.eyebrow) {
  max-width: 440px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}
.eyebrow {
  margin: 0;
  color: var(--aqua);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
}

.upload-card {
  position: relative;
  display: flex;
  min-height: min(68vh, 620px);
  overflow: hidden;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(7,80,144,.2);
  border-radius: 30px;
  background:
    linear-gradient(155deg, rgba(255,255,255,.98), rgba(226,248,250,.95)),
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(7,80,144,.025) 18px 36px);
  box-shadow: var(--shadow);
  cursor: pointer;
  isolation: isolate;
}

.upload-card:focus-within, .upload-card:hover {
  outline: 4px solid rgba(43,187,208,.18);
}

.mountain {
  position: absolute;
  width: 120%;
  height: 100px;
  background: linear-gradient(150deg, transparent 34%, #d3edf1 35% 53%, transparent 54%) 0 0 / 42% 100%,
              linear-gradient(210deg, transparent 34%, #b8e0e6 35% 53%, transparent 54%) 34% 0 / 42% 100%;
  opacity: .72;
}
.mountain-top { top: 15px; }

.ball {
  position: absolute;
  top: 30px;
  right: 32px;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 8px solid var(--navy);
  border-radius: 50%;
  background: var(--yellow);
  color: transparent;
  box-shadow: inset 12px 0 0 -5px var(--navy), inset -10px 9px 0 -6px #fff;
  transform: rotate(28deg);
}

.upload-plus {
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  border: 5px solid rgba(255,255,255,.8);
  border-radius: 50%;
  background: var(--aqua);
  color: var(--white);
  font-size: 66px;
  font-weight: 200;
  box-shadow: 0 14px 28px rgba(43,187,208,.28);
}

.upload-card strong {
  z-index: 1;
  margin-top: 18px;
  color: var(--deep);
  font-size: 22px;
  text-transform: uppercase;
}
.upload-hint { z-index: 1; margin-top: 7px; color: var(--muted); font-size: 12px; }

.water-wave {
  position: absolute;
  right: -8%;
  bottom: -32px;
  left: -8%;
  height: 150px;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(ellipse at 50% 0, transparent 0 24%, rgba(255,255,255,.75) 25% 29%, transparent 30%),
    linear-gradient(180deg, var(--water), var(--aqua));
  opacity: .92;
}

.photo-frame {
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.frame-brand {
  padding: 15px 18px 12px;
  color: var(--navy);
  font-size: 25px;
  font-weight: 900;
  text-align: center;
}
.frame-brand small { display: block; margin-top: 2px; font-size: 9px; letter-spacing: .15em; }
.photo-frame img {
  display: block;
  width: 100%;
  height: min(58vh, 500px);
  object-fit: cover;
  background: var(--light-aqua);
}
.frame-caption {
  padding: 18px 16px;
  background:
    radial-gradient(ellipse at 50% -40%, rgba(255,255,255,.48), transparent 55%),
    linear-gradient(180deg, var(--aqua), var(--navy));
  color: var(--white);
  font-size: 16px;
  font-weight: 900;
  text-align: center;
}

.button {
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  font-weight: 900;
  letter-spacing: .015em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.button:active { transform: translateY(2px); }
.button-primary {
  width: 100%;
  background: var(--red);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(236,61,57,.22);
}
.button-secondary {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
}

#entry-form { display: grid; gap: 15px; margin-top: 24px; }
#entry-form > label:not(.check) { display: grid; gap: 7px; }
#entry-form > label > span:first-child {
  color: var(--deep);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}
input:not([type="checkbox"]) {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.94);
  color: var(--ink);
  padding: 0 16px;
  outline: none;
}
input:not([type="checkbox"]):focus { border-color: var(--aqua); box-shadow: 0 0 0 4px rgba(43,187,208,.12); }
.check { display: grid; grid-template-columns: 22px 1fr; align-items: start; gap: 10px; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--navy); }
.check span { color: var(--muted); font-size: 13px; line-height: 1.4; text-transform: none !important; }
a { color: var(--navy); }
.form-error { min-height: 18px; margin: 0; color: #b72724; font-size: 13px; font-weight: 700; }

.final-frame canvas { display: block; width: 100%; height: auto; background: var(--light-aqua); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hashtag { margin: 18px 0 8px; color: var(--navy); font-size: 14px; font-weight: 800; text-align: center; }
.text-button {
  display: block;
  margin: 0 auto;
  border: 0;
  background: none;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
  color: var(--muted);
  font-size: 12px;
}
footer button { border: 0; padding: 0; background: none; color: var(--navy); text-decoration: underline; cursor: pointer; }

dialog {
  width: min(calc(100% - 32px), 500px);
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  padding: 28px;
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(5,56,95,.56); }
dialog h2 { margin-top: 0; color: var(--deep); }

@media (min-width: 760px) {
  .app-shell { padding-top: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
