/* =============================================================================
   Power Bay Cleaning Service — video upload form
   Shared styles for index.html (upload form) + thanks.html (conversion page).
   Aligned with brand_assets/brand-style-guide.md.
   ========================================================================== */

/* -- Design tokens --------------------------------------------------------- */
:root {
  /* Brand palette */
  --color-steel-blue: #3a668d;
  --color-steel-blue-dark: #2f547a;       /* hover state, ~10% darker */
  --color-burnt-orange: #d77229;
  --color-burnt-orange-dark: #b6601f;
  --color-golden-amber: #de972a;
  --color-deep-red-orange: #d2502f;
  --color-sky-blue: #6dcfe0;
  --color-sky-blue-soft: rgba(109, 207, 224, 0.15);

  --color-white: #ffffff;
  --color-black: #000000;
  --color-text: #0f172a;                  /* slate-900, AA contrast on white */
  --color-text-muted: #475569;            /* slate-600, AA on white */
  --color-border: #e2e8f0;
  --color-bg-subtle: #f8fafc;

  /* Typography */
  --font-sans: 'Helvetica Neue', Helvetica, -apple-system, 'Segoe UI', Roboto,
    Arial, sans-serif;

  /* Layout */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-card-lift: 0 6px 18px rgba(0, 0, 0, 0.10);
  --max-content: 640px;
  --header-h: 88px;
}

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

/* Make sure [hidden] always wins over our component display rules. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg-subtle);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  font-family: inherit;
  font-size: inherit;
}

a {
  color: var(--color-steel-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-steel-blue-dark);
}

/* -- Header band ----------------------------------------------------------- */
.site-header {
  background: var(--color-steel-blue);
  padding: 16px;
  text-align: center;
}

.site-header__logo {
  width: 140px;
  height: 140px;
  margin: 0 auto;
  border-radius: 50%;
  display: block;
}

@media (min-width: 640px) {
  .site-header__logo {
    width: 160px;
    height: 160px;
  }
}

/* -- Page container -------------------------------------------------------- */
.page {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 24px 16px 48px;
}

@media (min-width: 640px) {
  .page {
    padding: 32px 24px 64px;
  }
}

/* -- Headings -------------------------------------------------------------- */
h1,
h2,
h3 {
  font-weight: 700;
  color: var(--color-steel-blue);
  line-height: 1.2;
  margin: 0 0 12px;
}

h1 {
  font-size: 28px;
  letter-spacing: -0.01em;
}

@media (min-width: 640px) {
  h1 {
    font-size: 36px;
  }
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 18px;
}

p {
  margin: 0 0 16px;
  color: var(--color-text);
}

.muted {
  color: var(--color-text-muted);
  font-size: 14px;
}

/* -- Card ------------------------------------------------------------------ */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 24px;
  margin-bottom: 20px;
}

@media (min-width: 640px) {
  .card {
    padding: 32px;
  }
}

.card--accent {
  background: var(--color-sky-blue-soft);
  box-shadow: none;
  border: 1px solid var(--color-sky-blue);
}

/* -- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;             /* >= 44px touch target */
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 200ms ease, box-shadow 200ms ease,
    transform 100ms ease;
}

.btn:focus-visible {
  outline: 3px solid var(--color-golden-amber);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--color-burnt-orange);
  color: var(--color-white);
}

.btn--primary:hover:not([disabled]) {
  background: var(--color-burnt-orange-dark);
}

.btn--secondary {
  background: var(--color-steel-blue);
  color: var(--color-white);
}

.btn--secondary:hover:not([disabled]) {
  background: var(--color-steel-blue-dark);
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* -- Form ------------------------------------------------------------------ */
.field {
  display: block;
  margin-bottom: 18px;
}

.field__label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--color-steel-blue);
  font-size: 14px;
}

.field__hint {
  display: block;
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.field input[type='text'],
.field input[type='email'],
.field input[type='tel'],
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px;             /* prevents iOS zoom-on-focus */
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--color-steel-blue);
  box-shadow: 0 0 0 3px rgba(58, 102, 141, 0.15);
}

.field--row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 480px) {
  .field--row {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .field--row .field {
    margin-bottom: 18px;
  }
}

/* Checkbox */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 8px 0 4px;
  padding: 14px;
  background: var(--color-sky-blue-soft);
  border-radius: var(--radius-sm);
  font-size: 15px;
}

.consent input[type='checkbox'] {
  width: 22px;
  height: 22px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-steel-blue);
  cursor: pointer;
}

.consent label {
  cursor: pointer;
  color: var(--color-text);
}

/* -- File picker ----------------------------------------------------------- */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 20px;
  border: 2px dashed var(--color-steel-blue);
  border-radius: var(--radius-md);
  background: var(--color-white);
  text-align: center;
  cursor: pointer;
  transition: background-color 200ms ease, border-color 200ms ease;
}

.dropzone:hover,
.dropzone.is-dragover {
  background: var(--color-sky-blue-soft);
  border-color: var(--color-burnt-orange);
}

.dropzone__icon {
  width: 40px;
  height: 40px;
  color: var(--color-steel-blue);
}

.dropzone__title {
  font-weight: 700;
  color: var(--color-steel-blue);
  font-size: 16px;
}

.dropzone__sub {
  color: var(--color-text-muted);
  font-size: 14px;
}

.dropzone input[type='file'] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.file-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-top: 12px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.file-chip__name {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  color: var(--color-text);
}

.file-chip__size {
  color: var(--color-text-muted);
  font-size: 13px;
  flex-shrink: 0;
}

.file-chip__remove {
  background: transparent;
  border: 0;
  color: var(--color-deep-red-orange);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  padding: 4px 8px;
}

/* -- Progress -------------------------------------------------------------- */
.progress {
  display: none;
  margin-top: 20px;
}

.progress.is-active {
  display: block;
}

.progress__bar {
  width: 100%;
  height: 12px;
  background: var(--color-sky-blue);
  border-radius: 999px;
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  width: 0%;
  background: var(--color-golden-amber);
  border-radius: 999px;
  transition: width 200ms ease;
}

.progress__label {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* -- Alerts ---------------------------------------------------------------- */
.alert {
  display: none;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-top: 12px;
}

.alert.is-active {
  display: block;
}

.alert--error {
  background: rgba(210, 80, 47, 0.08);
  color: var(--color-deep-red-orange);
  border: 1px solid var(--color-deep-red-orange);
}

.alert--success {
  background: rgba(109, 207, 224, 0.15);
  color: var(--color-steel-blue);
  border: 1px solid var(--color-sky-blue);
}

/* -- Step list (thanks page) ----------------------------------------------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 12px 12px 12px 56px;
  margin-bottom: 12px;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-burnt-orange);
  color: var(--color-white);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* -- Footer ---------------------------------------------------------------- */
.site-footer {
  margin-top: 32px;
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}

.site-footer__tagline {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--color-steel-blue);
  font-size: 14px;
}

.site-footer__contact {
  margin-bottom: 6px;
}

.site-footer a {
  color: var(--color-text-muted);
  text-decoration: underline;
}

/* -- Trust strip (uppercase brand label per style guide) ------------------- */
.trust-strip {
  margin: 16px auto 0;
  padding: 8px 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-steel-blue);
  text-transform: uppercase;
}

/* -- Visually hidden helper ------------------------------------------------ */
.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;
}

/* -- Reduced motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
