:root {
  --brand-red: #d64818;      /* primary buffalo-orange -- headings, accents */
  --brand-dark: #1c1206;     /* footer / dark banners */
  --brand-cream: #faf3e6;    /* page background */
  --brand-gold: #d64818;     /* buttons (kept === brand-red, matches template) */
  --text-dark: #2a1c0d;
  --text-light: #fdf6ea;
  --hero-top: #e0631f;
  --hero-bottom: #3a1c08;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-dark);
  background: var(--brand-cream);
  line-height: 1.6;
}

a { color: inherit; }

.hero {
  background: linear-gradient(160deg, var(--hero-top), var(--hero-bottom));
  color: var(--text-light);
  padding-bottom: 4rem;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.brand a { text-decoration: none; }

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  display: block;
  padding: 5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  opacity: 0.9;
}

.nav-links a:hover { opacity: 1; }

.btn-outline {
  border: 1px solid var(--text-light);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

.hero-banner {
  max-width: 900px;
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
}

.hero-banner-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.hero-banner-inner {
  border-radius: 14px;
  padding: 2.25rem 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.hero-banner-inner .wordmark {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-banner-inner .wordmark .accent { color: var(--brand-gold); }

.hero-banner-inner .subline {
  margin-top: 0.4rem;
  font-size: 0.95rem;
  opacity: 0.85;
}

.hero-content {
  max-width: 720px;
  margin: 3rem auto 0;
  text-align: center;
  padding: 0 1.5rem;
}

.hero-mascot {
  width: 170px;
  height: 170px;
  margin: 0 auto 1.25rem;
  display: block;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.4));
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.tagline {
  font-size: 1.15rem;
  opacity: 0.92;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-actions.center { margin-top: 2rem; }

.android-beta {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.18);
}

.android-beta-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-gold);
  opacity: 0.95;
  margin-bottom: 0.6rem;
}

.android-beta-heading {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.android-beta-copy {
  font-size: 1.05rem;
  max-width: 34rem;
  margin: 0 auto 1.75rem;
  opacity: 0.88;
}

.beta-cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.beta-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--brand-gold);
  color: var(--text-light);
  border: none;
  cursor: pointer;
  padding: 0.6rem 1.75rem 0.6rem 0.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.beta-cta-btn:hover,
.beta-cta-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.beta-cta-btn:focus-visible {
  outline: 2px solid var(--text-light);
  outline-offset: 3px;
}

.beta-cta-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  padding: 5px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35), 0 0 0 2px rgba(255,255,255,0.25);
  display: block;
}

@media (max-width: 600px) {
  .hero-mascot { width: 130px; height: 130px; }
  .android-beta-heading { font-size: 2.2rem; }
}

.btn-primary {
  background: var(--brand-gold);
  color: var(--text-light);
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.25); }

.btn-secondary {
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.6);
}

.section {
  max-width: 860px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section.alt {
  background: #fff;
  max-width: 100%;
  padding: 4rem 1.5rem;
}

.section.alt > * {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.section h2 {
  font-size: 2rem;
  color: var(--brand-red);
  margin-bottom: 1.5rem;
}

.section p { margin-bottom: 1rem; }

.app-cta-banner {
  background: var(--brand-gold);
  color: var(--text-light);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  text-align: center;
}

.app-cta-banner p { margin: 0; max-width: 480px; }

.app-cta-banner .btn-primary {
  background: var(--text-light);
  color: var(--brand-gold);
  white-space: nowrap;
}

.app-cta-banner .btn-primary:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.35); }

.membership-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature {
  background: var(--brand-cream);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(0,0,0,0.06);
}

.feature h3 {
  color: var(--brand-red);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.contact-email a {
  color: var(--brand-red);
  font-weight: 600;
  text-decoration: none;
}

.social-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.social-links a {
  text-decoration: none;
  font-weight: 600;
  color: var(--brand-red);
}

footer {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--brand-dark);
  color: var(--text-light);
}

footer a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 600;
}

@media (max-width: 600px) {
  .hero-content h1 { font-size: 2.2rem; }
  .navbar { justify-content: center; text-align: center; }
  .app-cta-banner { flex-direction: column; }
}

/* Legal pages (privacy.html / terms.html) -- compact hero, no CTA buttons */
.legal-hero { padding-bottom: 2rem; }

.legal-hero-content { margin-top: 1.5rem; }

.legal-hero-content h1 { font-size: 2.25rem; }

.legal-hero-content .tagline { font-size: 1rem; opacity: 0.8; margin-bottom: 0; }

.section.legal { max-width: 760px; }

.section.legal h2 {
  font-size: 1.4rem;
  color: var(--brand-red);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.section.legal h3 {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.section.legal ul { margin: 0 0 1rem 1.25rem; }

.section.legal li { margin-bottom: 0.4rem; }

.section.legal a {
  color: var(--brand-red);
  font-weight: 600;
}

/* Tester signup modal */
.signup-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 8, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 100;
}

.signup-modal-backdrop[hidden] { display: none; }

.signup-modal {
  position: relative;
  background: #fff;
  color: var(--text-dark);
  max-width: 420px;
  width: 100%;
  border-radius: 16px;
  padding: 2.25rem 1.75rem 1.75rem;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.signup-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-cream);
  padding: 7px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  margin-bottom: 0.75rem;
}

.signup-modal h2 {
  color: var(--brand-red);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.signup-modal p {
  font-size: 0.92rem;
  opacity: 0.85;
  margin-bottom: 1.25rem;
}

.signup-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  border: none;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-dark);
  opacity: 0.5;
  cursor: pointer;
  padding: 0.25rem;
}

.signup-modal-close:hover { opacity: 0.9; }

#tester-signup-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

#tester-signup-email {
  flex: 1 1 220px;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 999px;
  font-size: 0.95rem;
  font-family: inherit;
}

#tester-signup-email:focus {
  outline: none;
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 3px rgba(214, 72, 24, 0.15);
}

#tester-signup-form .btn-primary {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
}

#tester-signup-form .btn-primary:disabled {
  opacity: 0.65;
  cursor: default;
  transform: none;
}

.signup-modal-status {
  min-height: 1.2em;
  margin: 0.9rem 0 0;
  font-size: 0.88rem;
}

.signup-modal-status.success { color: var(--brand-gold); font-weight: 600; }
.signup-modal-status.error { color: #a3221e; font-weight: 600; }

@media (max-width: 600px) {
  #tester-signup-form { flex-direction: column; }
  #tester-signup-email, #tester-signup-form .btn-primary { width: 100%; }
}

/* Gallery / community photos (gallery.html) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  transition: max-width 0.2s ease;
}

.gallery-grid.wide-view { max-width: none; }

.gallery-toolbar {
  max-width: 1100px;
  margin: 0 auto 1rem;
  display: flex;
  justify-content: flex-end;
  transition: max-width 0.2s ease;
}

.gallery-toolbar.wide-view { max-width: none; }

.btn-wide-toggle {
  border: 1px solid var(--brand-gold);
  color: var(--brand-gold);
  background: transparent;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-wide-toggle:hover { background: var(--brand-gold); color: #fff; }

.gallery-item {
  display: block;
  background: var(--brand-cream);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  text-decoration: none;
  cursor: zoom-in;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.15);
}

.gallery-item-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

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

.gallery-caption {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-dark);
  opacity: 0.85;
}

.gallery-fb-link {
  display: block;
  padding: 0 1rem 0.75rem;
  margin-top: -0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-gold);
  cursor: pointer;
}

.gallery-fb-link:hover { text-decoration: underline; }

.gallery-status {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-dark);
  opacity: 0.7;
  font-style: italic;
}

.upload-form {
  max-width: 560px;
  margin: 2rem auto 0;
  background: var(--brand-cream);
  border-radius: 12px;
  padding: 1.75rem;
  border: 1px solid rgba(0,0,0,0.06);
}

.form-row {
  margin-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.form-row label .optional { font-weight: 400; opacity: 0.6; }

.form-row input[type="text"],
.form-row input[type="file"],
.form-row textarea {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  background: #fff;
  color: var(--text-dark);
}

.form-row textarea { min-height: 5rem; resize: vertical; }

.form-row.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.upload-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #a3221e;
  font-weight: 600;
  min-height: 1.2em;
}

.upload-status:not(.error) { color: #2e7d32; }

/* Homepage teaser banner */
.history-cta-banner {
  background: var(--brand-dark);
  color: var(--text-light);
  padding: 3rem 1.5rem;
  text-align: center;
}

.history-cta-banner h2 {
  color: var(--brand-gold);
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.history-cta-banner p {
  max-width: 620px;
  margin: 0 auto 1.5rem;
  opacity: 0.9;
}

.history-cta-banner .btn-primary {
  background: var(--brand-gold);
  color: var(--text-light);
}
