:root {
  --teal-deep: #0a2f34;
  --teal: #14666a;
  --teal-mid: #1c7f78;
  --teal-soft: #e7f2f0;
  --surface: #ffffff;
  --page: #f3f1ec;
  --page-deep: #e8e4db;
  --gold: #b8922a;
  --gold-soft: rgba(184, 146, 42, 0.22);
  --ink: #1a2a2c;
  --muted: #66787a;
  --line: rgba(26, 42, 44, 0.1);
  --danger: #b42318;
  --ok: #14666a;
  --radius: 22px;
  --shadow-lg: 0 22px 50px rgba(10, 47, 52, 0.18);
  --shadow-md: 0 10px 28px rgba(10, 47, 52, 0.1);
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "DM Sans", "Segoe UI", sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--page);
}

body {
  background-color: var(--page);
  background-image:
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(20, 102, 106, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, var(--gold-soft), transparent 50%),
    linear-gradient(180deg, #ebe7df 0%, var(--page) 28%, #f7f5f1 100%);
}

button,
input,
textarea,
a {
  font: inherit;
}

.page {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 2.5rem;
  animation: pageIn 0.55s ease both;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Hero —— */
.hero {
  position: relative;
  padding: 0;
  color: #f7faf9;
  --hero-image: url("./assets/storefront.WEBP");
  background: var(--hero-image) center top / cover no-repeat;
  min-height: 260px;
  aspect-ratio: 4 / 5;
  max-height: 480px;
  overflow: hidden;
  box-shadow: none;
}

.hero__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero::before,
.hero::after {
  display: none;
  content: none;
}

.hero__brand {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-top: 0.35rem;
}

.wordmark {
  width: 72px;
  height: 72px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #fffefb, #f3efe6);
  color: var(--teal-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  box-shadow:
    0 0 0 3px rgba(184, 146, 42, 0.65),
    0 8px 24px rgba(0, 0, 0, 0.22);
  animation: markPop 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

@keyframes markPop {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.75rem, 5.4vw, 2.05rem);
  letter-spacing: 0.01em;
  line-height: 1.12;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.hero__gu {
  margin: 0.3rem 0 0;
  font-size: 1rem;
  opacity: 0.92;
  font-weight: 500;
}

.hero__tagline {
  margin: 0.55rem auto 0;
  max-width: 16rem;
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0.88;
}

.address-chip {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin: 1.15rem 0 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(8, 28, 30, 0.42);
  color: #f7faf9;
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.address-chip:hover {
  background: rgba(8, 28, 30, 0.55);
}

.address-chip:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.address-chip__text {
  flex: 1;
  font-size: 0.76rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.95;
}

.address-chip__chev {
  opacity: 0.75;
  font-size: 1.15rem;
}

.contact-bar {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 0.25rem;
  margin: 0 0 1.2rem;
  padding: 0.55rem 0.35rem 0.35rem;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.contact-bar__btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.3rem 0.15rem;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, background 0.15s ease;
}

.contact-bar__btn:hover {
  background: var(--teal-soft);
  transform: translateY(-1px);
}

.contact-bar__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(160deg, #f7fbfa, #e8f2f0);
  color: var(--teal-deep);
  box-shadow: inset 0 0 0 1px rgba(20, 102, 106, 0.1);
}

.address-chip__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.contact-bar__btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* —— Sheet —— */
.sheet {
  position: relative;
  z-index: 4;
  margin: -0.6rem 0.9rem 0;
  padding: 0.55rem 1.05rem 1.45rem;
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.9);
  animation: sheetUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

@keyframes sheetUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step + .step {
  margin-top: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.step__head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.95rem;
}

.step__num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--teal-deep), var(--teal));
  color: #f7faf9;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(20, 102, 106, 0.28);
}

.step h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.step__sub {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.ratings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.rating {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.9rem 0.3rem 0.8rem;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fbfaf7;
  cursor: pointer;
  color: var(--ink);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.rating:hover {
  border-color: rgba(20, 102, 106, 0.35);
  background: #fff;
}

.rating:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.rating.is-selected {
  border-color: var(--teal-deep);
  background: #fff;
  box-shadow:
    0 0 0 1px var(--teal-deep),
    0 10px 22px rgba(20, 102, 106, 0.12);
  transform: translateY(-2px);
}

.rating.is-selected::after {
  content: "✓";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--teal-deep);
  color: #f7faf9;
  font-size: 0.65rem;
  display: grid;
  place-items: center;
}

.rating__emoji {
  font-size: 1.6rem;
  line-height: 1;
}

.rating__label {
  font-weight: 700;
  font-size: 0.86rem;
}

.rating__hint {
  font-size: 0.64rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.25;
  padding: 0 0.1rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.48rem 0.9rem;
  background: #fbfaf7;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.chip:hover {
  border-color: rgba(20, 102, 106, 0.35);
  background: #fff;
}

.chip:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.chip.is-selected {
  background: linear-gradient(135deg, var(--teal-deep), var(--teal-mid));
  border-color: transparent;
  color: #f7faf9;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(20, 102, 106, 0.22);
}

.notes-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.notes,
.review-box {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  background: #fbfaf7;
  color: var(--ink);
  resize: vertical;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.notes:focus-visible,
.review-box:focus-visible {
  outline: none;
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 102, 106, 0.12);
}

.lang-row {
  display: inline-flex;
  margin: 0.9rem 0 0.55rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: var(--teal-soft);
  gap: 0.15rem;
}

.lang-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.42rem 0.95rem;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.lang-btn.is-active {
  background: #fff;
  color: var(--teal-deep);
  box-shadow: 0 2px 8px rgba(20, 102, 106, 0.12);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.review-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.35rem 0 0.4rem;
}

.linkish {
  border: 0;
  background: none;
  color: var(--teal);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0;
}

.linkish:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.linkish:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.char-count {
  font-size: 0.78rem;
  color: var(--muted);
}

.review-box {
  min-height: 132px;
  line-height: 1.5;
}

.status {
  min-height: 1.25rem;
  margin: 0.55rem 0 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.status.is-error {
  color: var(--danger);
}

.status.is-ok {
  color: var(--ok);
}

.cta {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, var(--teal-deep) 0%, var(--teal) 55%, var(--teal-mid) 100%);
  color: #f7faf9;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(20, 102, 106, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.cta:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 14px 32px rgba(20, 102, 106, 0.38);
}

.cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.cta:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.cta-hints {
  display: flex;
  justify-content: center;
  gap: 1.35rem;
  margin: 0.95rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.78rem;
  counter-reset: step;
}

.cta-hints li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cta-hints li::before {
  content: counter(step);
  counter-increment: step;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 0.7rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.footer {
  text-align: center;
  margin-top: 1.35rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.footer p {
  margin: 0;
  letter-spacing: 0.02em;
}

.is-loading .review-box {
  opacity: 0.65;
}

@media (min-width: 520px) {
  .page {
    padding: 1.25rem 0 2.5rem;
  }

  .hero {
    border-radius: 28px 28px 0 0;
    margin: 0 0.35rem;
    aspect-ratio: 16 / 11;
    max-height: 420px;
  }

  .sheet {
    margin-left: 0.35rem;
    margin-right: 0.35rem;
  }
}
