/* ==========================================================================
   Tim O's Studios — shared site styles
   Lightweight, no-JS, mobile-first. Served long-cache from CloudFront.
   ========================================================================== */

:root {
  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-text: #1c2733;
  --color-text-muted: #5a6b7b;
  --color-brand: #1f6feb;       /* primary accent */
  --color-brand-dark: #17548f;
  --color-header: #10233c;      /* dark header/footer */
  --color-header-text: #eaf1f8;
  --color-border: #dde3ea;
  --radius: 12px;
  --max-width: 960px;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-stack);
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* ── Header / nav ──────────────────────────────────────────────────────── */
.site-header {
  background: var(--color-header);
  color: var(--color-header-text);
}

.site-header .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.site-header .brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--color-header-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.site-header .brand img {
  width: 28px;
  height: 28px;
  display: block;
}

.site-nav a {
  color: var(--color-header-text);
  text-decoration: none;
  margin-left: 1.25rem;
  font-size: 0.95rem;
  opacity: 0.85;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ── Main content ──────────────────────────────────────────────────────── */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

h1 { font-size: 2rem; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-size: 1.35rem; margin: 2.25rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }

p { margin: 0 0 1rem; }

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

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

/* ── Hero (homepage) ───────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 0.75rem;
}

.hero p.tagline {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  max-width: 34rem;
  margin: 0 auto 2rem;
}

/* dark hero variant — nod to the original site's dark hero */
.hero-dark {
  background: linear-gradient(135deg, #16222e 0%, #1c2733 55%, #10233c 100%);
  color: #f2f6fa;
  border-radius: var(--radius);
  padding: 3.5rem 1.5rem 3rem;
}

.hero-dark p.tagline { color: #b8c6d4; }

.hero-dark .btn-outline {
  border-color: #f2f6fa;
  color: #f2f6fa;
}
.hero-dark .btn-outline:hover {
  background: #f2f6fa;
  color: var(--color-header);
}

/* store badges / CTA buttons */
.store-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--color-brand);
  color: #fff;
}
.btn-primary:hover { background: var(--color-brand-dark); color: #fff; }

.btn-outline {
  border: 2px solid var(--color-brand);
  color: var(--color-brand);
  background: transparent;
}
.btn-outline:hover {
  background: var(--color-brand);
  color: #fff;
}

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card h2, .card h3 { margin-top: 0; }

/* ── Support request form (support page) ───────────────────────────────── */
.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem 2rem 2.25rem;
  margin: 2rem auto;
  max-width: 40rem;
  box-shadow: 0 2px 8px rgba(16, 35, 60, 0.06);
}

.form-card h2 { margin-top: 0; margin-bottom: 1.5rem; }

.form-group { margin-bottom: 1.4rem; }

.form-group label,
.form-group .form-label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
}

.form-group input[type="email"],
.form-group select,
.form-group textarea {
  display: block;
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit;
  line-height: 1.4;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

/* native select: consistent height + custom chevron across browsers */
.form-group select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235a6b7b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  cursor: pointer;
}

.form-group textarea { min-height: 10rem; resize: vertical; }

/* custom app dropdown (icons inside options — native selects can't) */
.custom-select { position: relative; }

/* once the JS dropdown takes over, the native select must stay hidden even
   though .form-group select sets display:block */
.custom-select select[aria-hidden="true"] { display: none !important; }

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem 2.5rem 0.6rem 0.9rem;
  font: inherit;
  line-height: 1.4;
  text-align: left;
  color: var(--color-text);
  background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235a6b7b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 0.9rem center;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  min-height: 3.1rem;
}

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

.dropdown-toggle:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}

.custom-select.open .dropdown-options { display: block; }

.dropdown-options {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(16, 35, 60, 0.15);
}

.dropdown-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}

.dropdown-option:hover { background: rgba(31, 111, 235, 0.08); }

.app-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  object-fit: contain;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}

.platform-radio { display: flex; gap: 1.75rem; padding: 0.2rem 0; }

.platform-radio label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  font-size: 1rem;
  margin: 0;
  cursor: pointer;
}

.platform-radio input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--color-brand);
  cursor: pointer;
}

button.btn {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
button.btn:disabled { opacity: 0.6; cursor: default; }

.form-card .btn {
  display: block;
  width: 100%;
  padding: 0.9rem;
  font-size: 1.05rem;
  margin-top: 1.75rem;
}

.form-status { display: none; margin-top: 1.25rem; padding: 0.9rem 1rem; border-radius: 8px; }
.form-status.success {
  display: block;
  background: #e8f5e9;
  border: 1px solid #4caf50;
  color: #2e7d32;
}
.form-status.error {
  display: block;
  background: #ffebee;
  border: 1px solid #f44336;
  color: #c62828;
}

/* ── Numbered step lists (how-to pages) ────────────────────────────────── */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.25rem 3.25rem;
  min-height: 2.5rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--color-brand);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Legal pages ───────────────────────────────────────────────────────── */
.legal h1 { margin-bottom: 0.25rem; }
.legal .last-updated {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-header);
  color: var(--color-header-text);
  font-size: 0.9rem;
}

.site-footer .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.site-footer a {
  color: var(--color-header-text);
  text-decoration: none;
  opacity: 0.85;
  margin-right: 1.25rem;
}

.site-footer a:last-child { margin-right: 0; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }

/* ── Small screens ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero h1 { font-size: 2rem; }
  .site-header .inner,
  .site-footer .inner { flex-direction: column; text-align: center; }
  .site-nav a { margin: 0 0.6rem; }
}
