/* ──────────────────────────────────────────────────────────────
   Tempo Golf guest feedback (layout copied from Verace's page;
   colours from Tempo Golf's logo: navy #1B2C38, red #D92E2E; gold stars).
   One narrow card on a pale cool-grey ground with a red top rule.
   Navy hairlines and accents (the --green* names are kept from the
   Bogey copy), navy type, five gold stars. Logo navy is ~14:1 on
   white, so it is used directly for accent text.
   Gold is only a fill; lit stars carry a darker gold outline
   (--gold-deep, 3.2:1 on white) so their shape still reads.
   ────────────────────────────────────────────────────────────── */

:root {
  --page: #f2f4f7;
  --page-deep: #e1e6eb;
  --card: #ffffff;
  --ink: #1b2c38;
  --taupe: #4f5b66;
  --gold: #f0c63a;
  --gold-deep: #b48a17;
  --green: #1b2c38;
  --rule: #d92e2e;
  --green-text: #1b2c38;
  --green-hair: rgba(27, 44, 56, 0.32);
  --hair: rgba(27, 44, 56, 0.16);
  --wash: rgba(27, 44, 56, 0.035);
  --error: #8a3b32;

  --serif: Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --star-size: clamp(44px, 12vw, 60px);
  --star-gap: clamp(6px, 2vw, 14px);

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  min-height: 100%;
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: linear-gradient(180deg, var(--page) 0%, var(--page-deep) 100%);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Stage and card ─── */

.stage {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    max(18px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

.card {
  position: relative;
  width: min(100%, 640px);
  padding: clamp(28px, 5vw, 52px) clamp(22px, 6vw, 60px) clamp(32px, 5vw, 56px);
  background: var(--card);
  border: 1px solid var(--green-hair);
  border-top: 3px solid var(--rule);
  border-radius: 4px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 24px 60px rgba(20, 47, 35, 0.09),
    0 2px 10px rgba(20, 47, 35, 0.04);
  animation: card-in 640ms var(--ease-out) both;
}

@media (min-width: 760px) {
  .stage {
    padding-top: clamp(28px, 6vh, 72px);
    padding-bottom: clamp(28px, 6vh, 72px);
  }
}

/* ─── Letterhead ─── */

.letterhead {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(22px, 4vw, 34px);
}

.brand-logo {
  width: min(100%, 240px);
  height: auto;
  object-fit: contain;
}

@media (min-width: 760px) {
  .brand-logo {
    width: 280px;
  }
}

/* ─── Panels ─── */

.panel {
  animation: panel-in 360ms var(--ease-out) both;
}

.is-hidden {
  display: none;
  animation: none;
}

.rating-panel,
.google-panel,
.thanks-panel {
  text-align: center;
}

/* ─── Type ─── */

.lead {
  margin: 0 0 10px;
  color: var(--green-text);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.08rem, 2.4vw, 1.2rem);
  letter-spacing: 0.005em;
  line-height: 1.3;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  max-width: 16ch;
  margin-inline: auto;
  font-size: clamp(1.9rem, 6vw, 2.7rem);
}

h2 {
  font-size: clamp(1.65rem, 5.2vw, 2.25rem);
}

.intro {
  max-width: 40ch;
  margin: 14px auto 0;
  color: var(--taupe);
  font-size: clamp(0.98rem, 2.2vw, 1.04rem);
  text-wrap: pretty;
}

/* ─── The five stars ─── */

.stars {
  display: flex;
  justify-content: center;
  gap: var(--star-gap);
  margin-top: clamp(30px, 6vw, 44px);
}

.star {
  display: grid;
  place-items: center;
  width: var(--star-size);
  height: var(--star-size);
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  animation: star-in 420ms var(--ease-out) both;
  animation-delay: calc(160ms + var(--i) * 55ms);
}

.star-glyph {
  display: block;
  width: var(--star-size);
  height: var(--star-size);
  overflow: visible;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.4px;
  stroke-linejoin: round;
  transition:
    fill 160ms var(--ease-out),
    stroke 160ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.star.is-lit .star-glyph {
  fill: var(--gold);
  stroke: var(--gold-deep);
}

@media (hover: hover) {
  .star:hover .star-glyph {
    transform: scale(1.08);
  }
}

.star:active .star-glyph {
  transform: scale(0.96);
}

.star.is-selected .star-glyph {
  animation: star-pop 360ms var(--ease-out);
}

.star-caption {
  min-height: 1.5em;
  margin: 16px 0 0;
  color: var(--taupe);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: color 160ms var(--ease-out);
}

.star-caption.is-label {
  color: var(--ink);
}

/* The small recap row on the form: the stars the guest chose. */

.rating-recap {
  display: flex;
  align-items: center;
  min-height: 1.3em;
}

.mini-stars {
  display: inline-flex;
  gap: 3px;
}

.mini-stars svg {
  width: 17px;
  height: 17px;
  overflow: visible;
  fill: transparent;
  stroke: var(--green-hair);
  stroke-width: 1.2px;
  stroke-linejoin: round;
}

.mini-stars svg.is-lit {
  fill: var(--gold);
  stroke: var(--gold-deep);
}

/* ─── Focus ─── */

.star:focus-visible,
.back-button:focus-visible,
.submit-button:focus-visible,
.secondary-button:focus-visible,
.google-button:focus-visible {
  outline: 2px solid var(--green-text);
  outline-offset: 3px;
}

/* ─── Back link ─── */

.back-button {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin: -6px 0 18px -2px;
  padding: 0 4px;
  color: var(--taupe);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 180ms var(--ease-out);
}

.back-button::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 1px;
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.back-button:hover {
  color: var(--ink);
}

/* ─── Form ─── */

.form-panel .lead,
.form-panel .intro {
  margin-left: 0;
  margin-right: 0;
}

.form-panel .intro {
  max-width: 48ch;
}

.feedback-form {
  display: grid;
  gap: 20px;
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--green-hair);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--hair);
  border-radius: 3px;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  transition:
    border-color 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(74, 90, 80, 0.85);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(49, 98, 58, 0.22);
  outline: 0;
}

.field textarea {
  min-height: 150px;
  line-height: 1.55;
  resize: vertical;
}

.honeypot {
  display: none;
}

.form-error {
  min-height: 1.3em;
  margin: -6px 0 0;
  color: var(--error);
  font-size: 0.92rem;
  font-weight: 600;
}

.form-error:empty {
  display: none;
}

/* ─── Buttons ─── */

.submit-button,
.secondary-button,
.google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 30px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition:
    background-color 200ms var(--ease-out),
    border-color 200ms var(--ease-out),
    color 200ms var(--ease-out),
    box-shadow 200ms var(--ease-out),
    transform 200ms var(--ease-out);
}

.submit-button {
  width: fit-content;
  min-width: 200px;
  color: #ffffff;
  background: var(--ink);
  border: 1px solid var(--ink);
}

.submit-button:hover {
  background: var(--green-text);
  border-color: var(--green-text);
}

.submit-button:active {
  transform: translateY(1px);
}

.submit-button[disabled] {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.secondary-button {
  margin-top: 30px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--green-hair);
}

.secondary-button:hover {
  border-color: var(--green);
  background: var(--wash);
}

/* ─── Google panel ─── */

.google-panel .intro,
.thanks-panel .intro {
  margin-inline: auto;
}

.google-cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(28px, 4vw, 38px);
}

.google-button {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--hair);
  box-shadow: 0 8px 22px rgba(20, 47, 35, 0.08);
}

.google-button:hover {
  border-color: var(--green);
  box-shadow: 0 12px 28px rgba(20, 47, 35, 0.12);
  transform: translateY(-1px);
}

.google-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ─── Motion ─── */

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

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes star-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes star-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.22);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .panel,
  .star,
  .star.is-selected .star-glyph {
    animation: none;
  }

  .star-glyph,
  .star-caption,
  .submit-button,
  .secondary-button,
  .google-button {
    transition: none;
  }
}

/* ─── Small screens ─── */

@media (max-width: 759px) {
  .field-grid {
    grid-template-columns: 1fr;
  }

  .submit-button,
  .secondary-button,
  .google-button {
    width: 100%;
  }
}

@media (max-width: 400px) {
  .card {
    padding: 26px 18px 28px;
  }
}

/* Sender identification for the SMS review requests (CASL): the texts link here,
   so Tempo Golf's mailing address sits one tap away from every message. */
.site-footer {
  margin: 1.5rem auto 0;
  max-width: 640px;
  padding: 0 1rem 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--green-text);
}

.site-footer p {
  margin: 0;
}
