/* ============================================
   CLEANWORKS PNW — Design Token System
   Static CSS custom properties + layout styles
   ============================================ */

/* --- Design Tokens --- */
:root {
  /* Colors */
  --primary: #cfa61e;
  --primary-hover: #b8921a;
  --primary-bright: #edc13b;
  --navy: #0a1628;
  --navy-light: #142032;
  --light-blue: #3d7ea6;
  --surface: #ffffff;
  --surface-alt: #f5f7fa;
  --text-primary: #0a1628;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-light: #e2e8f0;

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing & Shape */
  --max-width: 680px;
  --radius-default: 1rem;
  --radius-lg: 2rem;
  --radius-xl: 3rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(10, 22, 40, 0.06);
  --shadow-lg: 0 20px 40px rgba(10, 22, 40, 0.15);
  --shadow-xl: 0 25px 50px rgba(10, 22, 40, 0.2);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--light-blue);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Material Symbols --- */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  user-select: none;
}

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: rgb(255, 255, 255);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  margin-inline: 0.5rem;
  max-width: calc(100% - 1rem);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.header__logo {
  height: 2.25rem; /* h-9 */
  width: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: var(--surface);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-height: 44px;
  min-width: 44px;
  transition: background-color var(--transition-base), transform var(--transition-fast);
}

.header__cta:hover:not(:disabled) {
  background-color: var(--primary-hover);
  transform: scale(1.02);
}

.header__cta:active:not(:disabled) {
  transform: scale(0.95);
}

.header__cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.header__cta:disabled:hover {
  background-color: var(--primary);
  transform: none;
}

/* --- Main Layout --- */
.main {
  flex: 1;
  padding-top: 4.5rem;
  padding-bottom: 3rem;
  padding-left: 1rem;
  padding-right: 1rem;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* --- Hero Section --- */
.hero {
  margin-bottom: 2rem;
}

.hero__title {
  font-size: 1.5rem; /* mobile: text-2xl equivalent */
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: 1rem; /* mobile: text-base */
  color: var(--text-secondary);
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.75;
}

/* --- Video Embed --- */
.video {
  width: 100%;
  margin-bottom: 2rem;
}

.video__frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background-color: var(--navy);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--primary);
  overflow: hidden;
}

.video__frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  overflow: hidden;
}

.video__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(transparent, rgba(10, 22, 40, 0.85));
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  pointer-events: none;
}

/* --- Who We Are --- */
.who-we-are {
  width: 100%;
  margin-bottom: 2rem;
}

.who-we-are__inner {
  background-color: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius-default);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  text-align: center;
}

.who-we-are__heading {
  font-size: 1.25rem; /* text-xl */
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em; /* tracking-widest */
  margin-bottom: 1rem;
}

.who-we-are__body {
  font-size: 0.9375rem; /* ~text-base */
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

.who-we-are__items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.who-we-are__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.who-we-are__icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-full);
  background-color: transparent;
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-slow), color var(--transition-slow), transform var(--transition-fast);
  color: var(--primary);
}

.who-we-are__icon .material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  font-size: 1.5rem;
  transition: font-variation-settings var(--transition-slow);
}

.who-we-are__icon:hover {
  background-color: var(--primary);
  color: var(--surface);
  transform: scale(1.08);
}

.who-we-are__icon:hover .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.who-we-are__label {
  font-size: 0.8125rem; /* text-sm */
  font-weight: 600;
  color: var(--text-primary);
}

/* --- Star Rating CTA --- */
.rating {
  width: 100%;
  margin-bottom: 2rem;
}

.rating__card {
  background-color: var(--navy);
  padding: 1.5rem 1rem;
  border-radius: var(--radius-default);
  box-shadow: var(--shadow-xl);
  text-align: center;
}

.rating__heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.rating__stars {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.rating__star {
  background: none;
  border: none;
  padding: 0.375rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-fast), transform var(--transition-fast);
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rating__star .material-symbols-outlined {
  font-size: 2.25rem;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  transition: font-variation-settings var(--transition-fast);
}

.rating__star:hover,
.rating__star--active {
  color: var(--primary);
  transform: scale(1.15);
}

.rating__star:hover .material-symbols-outlined,
.rating__star--active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.rating__hint {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* --- Footer --- */
.footer {
  background-color: var(--surface);
  padding: 2rem 1rem;
  border-top: 1px solid var(--border-light);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
}

.footer__logo {
  height: 2.5rem; /* h-10 */
  width: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.footer__contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer__phone {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: color var(--transition-base);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer__phone:hover {
  color: var(--primary);
}

.footer__socials {
  display: flex;
  gap: 0.75rem;
}

.footer__social-link {
  width: 2.75rem;
  height: 2.75rem;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background-color var(--transition-base), color var(--transition-base), transform var(--transition-fast);
}

.footer__social-link:hover {
  background-color: var(--primary);
  color: var(--surface);
  transform: scale(1.05);
}

.footer__social-link svg {
  width: 1.25rem;
  height: 1.25rem;
}

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

/* --- Popup Fallback --- */
.popup-fallback {
  display: none;
}

.popup-fallback.visible {
  display: block;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.popup-fallback a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

.popup-fallback a:hover {
  color: var(--primary-hover);
}

/* --- State Machine --- */
.state {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: stateFadeIn var(--transition-slow) ease;
}

.state-hidden {
  display: none !important;
}

@keyframes stateFadeIn {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Thank You State: vertically center content --- */
.state--thank-you-google,
.state--thank-you-feedback {
  flex: 1;
  justify-content: center;
  min-height: 40vh;
}

/* --- Thank You (shared across thank-you states) --- */
.thank-you {
  text-align: center;
  padding: 2rem 0;
  max-width: 32rem;
}

.thank-you__icon {
  margin-bottom: 1rem;
}

.thank-you__icon .material-symbols-outlined {
  font-size: 3rem;
  color: var(--primary);
  font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.thank-you__title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.thank-you__body {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* --- Feedback Form --- */
.feedback__header {
  text-align: center;
  margin-bottom: 2rem;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.feedback__title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.feedback__subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.feedback__card {
  width: 100%;
  background-color: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius-default);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.feedback__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.feedback__field {
  display: flex;
  flex-direction: column;
}

.feedback__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 0.5rem;
  margin-left: 0.25rem;
}

.feedback__input {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  background-color: var(--surface-alt);
  border: 2px solid transparent;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 1rem;
  transition: border-color var(--transition-slow), box-shadow var(--transition-slow);
  outline: none;
  min-height: 44px;
}

.feedback__input::placeholder {
  color: var(--text-muted);
}

.feedback__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(207, 166, 30, 0.15);
}

.feedback__textarea {
  resize: none;
  min-height: 8rem;
}

/* Error States */
.feedback__input--error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.feedback__input--error:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.feedback__error {
  display: none;
  font-size: 0.8125rem;
  color: #ef4444;
  margin-top: 0.375rem;
  margin-left: 0.25rem;
  font-weight: 500;
}

.feedback__error--visible {
  display: block;
}

/* Submit Button */
.feedback__submit-wrap {
  padding-top: 1rem;
}

.feedback__submit {
  width: 100%;
  padding: 1.25rem;
  background-color: var(--primary);
  color: var(--surface);
  font-family: var(--font-family);
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: background-color var(--transition-base), transform var(--transition-fast);
}

.feedback__submit:hover:not(:disabled) {
  background-color: var(--primary-hover);
}

.feedback__submit:active:not(:disabled) {
  transform: scale(0.98);
}

.feedback__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.feedback__submit:disabled:hover {
  background-color: var(--primary);
  transform: none;
}

.feedback__submit:focus-visible {
  outline: 2px solid var(--primary-bright);
  outline-offset: 2px;
}

/* Google Link */
.feedback__google-link-wrap {
  text-align: center;
  margin-top: 1.5rem;
}

.feedback__google-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-base);
  min-height: 44px;
  padding: 0.5rem 0.25rem;
}

.feedback__google-link:hover {
  color: var(--primary);
}

.feedback__google-arrow {
  font-size: 1rem;
  margin-left: 0.25rem;
  transition: transform var(--transition-base);
}

.feedback__google-link:hover .feedback__google-arrow {
  transform: translateX(4px);
}

/* Decorative Divider */
.feedback__divider {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  opacity: 0.4;
}

.feedback__divider-line {
  height: 1px;
  width: 6rem;
  background-color: rgba(255, 255, 255, 0.3);
}

.feedback__divider-text {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  font-weight: 700;
  text-transform: uppercase;
}

/* =============================================
   RESPONSIVE — Mobile-First Breakpoints
   Base: 0–767px (mobile)
   Tablet: 768px–1023px
   Desktop: 1024px+
   ============================================= */

/* --- Tablet (768px+) --- */
@media (min-width: 768px) {
  /* Header: switch to horizontal row */
  .header {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    margin-inline: 1rem;
    max-width: calc(100% - 2rem);
  }

  .header__cta {
    font-size: 0.875rem;
    padding: 0.5rem 1.25rem;
  }

  /* Main: more breathing room */
  .main {
    padding-top: 3rem;
    padding-bottom: 5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  /* Hero: scale up */
  .hero {
    margin-bottom: 3rem;
  }

  .hero__title {
    font-size: 1.875rem; /* text-3xl */
    margin-bottom: 1rem;
  }

  .hero__subtitle {
    font-size: 1.125rem; /* text-lg */
  }

  /* Video */
  .video {
    margin-bottom: 3rem;
  }

  .video__frame {
    border-radius: var(--radius-xl);
  }

  /* Who We Are */
  .who-we-are {
    margin-bottom: 3rem;
  }

  .who-we-are__inner {
    padding: 2.5rem;
  }

  .who-we-are__items {
    flex-direction: row;
    justify-content: center;
    gap: 3rem;
  }

  /* Star Rating */
  .rating {
    margin-bottom: 3rem;
  }

  .rating__card {
    padding: 2.5rem;
  }

  .rating__heading {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }

  .rating__stars {
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .rating__star .material-symbols-outlined {
    font-size: 3rem;
  }

  /* Footer */
  .footer {
    padding: 3rem 1.5rem;
  }

  .footer__inner {
    gap: 1.5rem;
  }

  .footer__contact {
    flex-direction: row;
    gap: 2rem;
  }

  /* Feedback */
  .feedback__header {
    margin-bottom: 2.5rem;
  }

  .feedback__title {
    font-size: 1.875rem;
    margin-bottom: 1rem;
  }

  .feedback__subtitle {
    font-size: 1.125rem;
  }

  .feedback__card {
    padding: 2rem;
  }

  .feedback__form {
    gap: 1.5rem;
  }

  .feedback__google-link-wrap {
    margin-top: 2rem;
  }

  .feedback__divider {
    margin-top: 3rem;
  }

  /* Thank You */
  .thank-you {
    padding: 3rem 0;
  }

  .thank-you__icon {
    margin-bottom: 1.5rem;
  }

  .thank-you__icon .material-symbols-outlined {
    font-size: 4rem;
  }

  .thank-you__title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .thank-you__body {
    font-size: 1.125rem;
  }
}

/* --- Desktop (1024px+) --- */
@media (min-width: 1024px) {
  /* Header */
  .header {
    padding: 0.75rem 2rem;
    margin-inline: auto;
    max-width: 48rem;
  }

  /* Hero: text-4xl */
  .hero__title {
    font-size: 2.25rem;
  }

  /* Who We Are */
  .who-we-are__inner {
    padding: 3rem;
  }

  /* Star Rating */
  .rating__card {
    padding: 3.5rem;
  }

  .rating__heading {
    font-size: 1.75rem;
  }

  .rating__stars {
    gap: 0.75rem;
  }

  /* Feedback */
  .feedback__title {
    font-size: 2.25rem;
  }

  .feedback__card {
    padding: 3rem;
  }

  .feedback__input {
    padding: 1rem 1.5rem;
  }
}
