/* ==========================================================================
   Citivo — Static Site Styles
   Theme: Vivid Violet (matches src/features/public-portal/themes/presets/vivid-violet.ts)
   ========================================================================== */

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

:root {
  /* Core palette */
  --primary: #7B2D8E;
  --primary-dark: #5E1F6E;
  --primary-light: #F3E8F9;
  --secondary: #E8A838;        /* gold accent, vivid-violet theme */
  --secondary-dark: #c48c1c;

  --text: rgba(0, 0, 0, 0.87);
  --text-secondary: rgba(0, 0, 0, 0.6);
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #faf8fc;

  /* Gradients, lifted from the theme preset */
  --gradient-header: linear-gradient(135deg, #5E1F6E 0%, #7B2D8E 45%, #9B4DBA 100%);
  --gradient-hero-text: linear-gradient(135deg, #7B2D8E, #c054d6);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 4px 14px rgba(123, 45, 142, 0.06);
  --shadow-card-hover: 0 10px 26px rgba(123, 45, 142, 0.12);
  --container: 1080px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 2px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--primary-dark);
  color: #fff;
}
.btn-primary:hover { background: #4a1858; transform: translateY(-1px); }

.btn-gold {
  background: var(--secondary);
  color: #3d1a47;
}
.btn-gold:hover { background: #dd9a20; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); }

.btn-block { width: 100%; }

/* ==========================================================================
   Nav
   ========================================================================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--gradient-header);
  transition: box-shadow 0.2s ease;
}

.site-nav.is-scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2rem;
  max-width: var(--container);
  margin: 0 auto;
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.nav-brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex-shrink: 0;
}

.nav-inner .logo {
  font-size: 2.25rem;
  line-height: 1.05;
}

.nav-byline {
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

.nav-byline strong {
  font-weight: 700;
  color: var(--secondary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  flex-shrink: 0;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav-links a:hover { color: #fff; }

.nav-cta {
  display: none;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.7rem 1.4rem;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  padding: 0.4rem;
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (min-width: 1024px) {
  .nav-cta { display: inline-flex; }
}

/* Collapse to the hamburger at 1023px rather than 767px — the brand block with
   its byline needs the width, and the links wrap onto a second row below this. */
@media (max-width: 1023px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 0;
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    width: 100%;
    padding: 0.9rem 2rem;
  }
  .nav-toggle { display: inline-flex; flex-shrink: 0; }

  .nav-inner { padding: 0.9rem 1.25rem; gap: 1rem; }
  .nav-inner .logo { font-size: 1.75rem; }
  .nav-byline { font-size: 0.68rem; }
}

/* Phones: let the byline wrap again — nowrap would overflow the viewport. */
@media (max-width: 560px) {
  .nav-inner .logo { font-size: 1.5rem; }
  .nav-byline {
    white-space: normal;
    font-size: 0.62rem;
    max-width: 15rem;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  background: linear-gradient(135deg, #7B2D8E 0%, #5E1F6E 100%);
  color: #fff;
  padding: 5rem 0 4.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero { padding: 3rem 0 3.5rem; }
  /* gap: 0 — spacing comes from each item's own margin, since the copy block
     is flattened below and its children become direct grid items. */
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 0; }

  /* Flatten .hero-copy so the phone preview can slot between the headline and
     the subheadline, rather than sitting above or below the whole block. */
  .hero-copy { display: contents; }
  .hero-copy h1 { order: 1; }
  .hero-visual { order: 2; margin-top: 1.75rem; }
  .hero-copy .subhead { order: 3; }
  .hero-copy .store-badges { order: 4; }
  .hero-copy .qr-row { order: 5; }

  .phone-mockup { width: clamp(140px, 40vw, 185px); border-width: 5px; }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
}

.hero p.subhead {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 480px;
}

@media (max-width: 900px) {
  .hero p.subhead { margin-left: auto; margin-right: auto; }
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

@media (max-width: 900px) { .store-badges { justify-content: center; } }

/* Store badge stand-ins — swap for official Google Play / App Store badge
   art before launch. See [PLACEHOLDER] items in content guidelines. */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #000;
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.1rem;
  text-decoration: none;
  min-width: 168px;
}
.store-badge svg { width: 24px; height: 24px; flex-shrink: 0; }
.store-badge .badge-text { line-height: 1.15; }
.store-badge .badge-text small { display: block; font-size: 0.65rem; opacity: 0.85; }
.store-badge .badge-text strong { display: block; font-size: 1rem; font-weight: 600; }

.qr-row {
  display: flex;
  gap: 1rem;
  margin-top: 1.75rem;
}

@media (max-width: 900px) { .qr-row { justify-content: center; } }

.qr-card {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  text-align: center;
  width: 96px;
}

.qr-placeholder {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  border-radius: 4px;
  background:
    repeating-conic-gradient(#3d1a47 0% 25%, #fff 0% 50%) 0 0 / 16px 16px;
  border: 1px solid var(--border);
}

.qr-card span {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.35rem;
  font-weight: 600;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

/* Phone mockup — app screenshot carousel.
   aspect-ratio matches the source screenshots (720x1600) so they never distort. */
.phone-mockup {
  position: relative;
  width: 250px;
  aspect-ratio: 720 / 1600;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.08);
  border: 6px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.phone-track {
  display: flex;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.phone-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.phone-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.phone-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.25s ease, background 0.25s ease, border-radius 0.25s ease;
}

.phone-dots button:hover { background: rgba(255, 255, 255, 0.75); }

.phone-dots button.is-active {
  width: 18px;
  border-radius: 4px;
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .phone-track { transition: none; }
}

/* ==========================================================================
   Section scaffolding
   ========================================================================== */

section { padding: 5rem 0; }

.section-soft { background: var(--bg-soft); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.section-header {
  max-width: 640px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
}

/* ==========================================================================
   Features
   ========================================================================== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--muted);
}

/* ==========================================================================
   For Businesses
   ========================================================================== */

.businesses {
  background: var(--gradient-header);
  color: #fff;
  text-align: center;
}

.businesses .eyebrow { color: rgba(255, 255, 255, 0.85); }

.businesses h2 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 800;
  max-width: 620px;
  margin: 0 auto;
}

.businesses .body-copy {
  max-width: 620px;
  margin: 1.25rem auto 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
}

.value-props {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 3rem auto 2.75rem;
  max-width: 780px;
  text-align: left;
}

.value-prop { display: flex; gap: 0.9rem; align-items: flex-start; }

.value-prop .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.value-prop h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; }
.value-prop p { font-size: 0.9rem; color: rgba(255, 255, 255, 0.78); }

/* ==========================================================================
   Download section
   ========================================================================== */

.download-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 720px) {
  .download-inner { grid-template-columns: 1fr; text-align: center; }
}

.download-col .btn { margin-bottom: 0.9rem; }
.download-col .btn:last-child { margin-bottom: 0; }

.download-qr {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
}

.download-qr .qr-card { box-shadow: var(--shadow-card); }

.download-caption {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* ==========================================================================
   Contact teaser
   ========================================================================== */

.contact-teaser {
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.contact-teaser p { font-size: 1.05rem; margin-bottom: 1rem; }

.contact-teaser a.link-cta {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.contact-teaser a.link-cta:hover { text-decoration: underline; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: #201125;
  color: rgba(255, 255, 255, 0.75);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand .logo { color: #fff; }
.footer-tagline {
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.6rem;
}
.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 1rem;
}

.footer-col h5 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.7rem; }
.footer-col a { color: rgba(255, 255, 255, 0.78); text-decoration: none; font-size: 0.92rem; }
.footer-col a:hover { color: #fff; }

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: center;
}
.footer-social a:hover { background: rgba(255, 255, 255, 0.16); }
.footer-social svg { width: 16px; height: 16px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ==========================================================================
   Inner pages (Contact / Terms / Privacy)
   ========================================================================== */

.page-header {
  background: var(--gradient-header);
  color: #fff;
  padding: 3.5rem 0;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 800;
}

.page-header p {
  margin-top: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.page-header .last-updated {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Contact */

/* Single column since the contact form was removed — the page is contact
   details only. Capped width so the email list does not stretch the full
   container on a wide screen. */
.contact-body {
  padding: 4.5rem 0;
  max-width: 34rem;
}

@media (max-width: 800px) {
  .contact-body { padding: 3rem 0; }
}

.contact-detail {
  margin-bottom: 1.75rem;
}
.contact-detail h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.contact-detail a, .contact-detail p {
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}
.contact-detail a:hover { color: var(--primary); }

.response-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.form-field { margin-bottom: 1.25rem; }
.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(123, 45, 142, 0.12);
}
.form-field textarea { resize: vertical; min-height: 110px; }

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.form-status {
  font-size: 0.9rem;
  margin-top: 1rem;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-success { color: #2e7d32; }
.form-status.is-error { color: #c62828; }

/* Legal pages (Terms / Privacy) */

.legal-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  padding: 3.5rem 0 5rem;
  max-width: 960px;
  margin: 0 auto;
}

@media (max-width: 860px) {
  .legal-layout { grid-template-columns: 1fr; padding: 2.5rem 2rem 4rem; max-width: none; }
  .legal-toc { display: none; }
}

.legal-toc {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  font-size: 0.85rem;
}
.legal-toc ul { list-style: none; }
.legal-toc li { margin-bottom: 0.6rem; }
.legal-toc a {
  color: var(--muted);
  text-decoration: none;
  display: block;
  padding-left: 0.75rem;
  border-left: 2px solid transparent;
}
.legal-toc a:hover,
.legal-toc a.is-active {
  color: var(--primary);
  border-left-color: var(--primary);
}

.legal-content { max-width: 720px; }
.legal-content section { padding: 0 0 2.25rem; }
.legal-content h2 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  scroll-margin-top: 5.5rem;
}
.legal-content h3 {
  font-size: 1rem;
  margin: 1rem 0 0.5rem;
}
.legal-content p, .legal-content li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.legal-content ul { padding-left: 1.25rem; }

.legal-draft-notice {
  background: var(--primary-light);
  border: 1px solid #e6cdef;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  color: #5c2a6b;
  margin-bottom: 2.5rem;
}
