/* Auvi Website — Creative Machines Limited */
/* Fully self-contained, no external dependencies */

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

:root {
  --color-brand: #0B6EB9;
  --color-brand-dark: #0A5D9E;
  --color-brand-light: #E8F4FD;
  --color-text: #1a1a1a;
  --color-text-secondary: #555;
  --color-bg: #fff;
  --color-bg-alt: #f7f8fa;
  --color-border: #e0e0e0;
  --color-footer-bg: #f0f1f3;
  --color-footer-text: #555;
  --color-link: #0B6EB9;
  --color-link-hover: #084a7a;
  --color-code-bg: #f4f4f4;
  --max-width: 720px;
  --max-width-wide: 960px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-brand: #4DA3E0;
    --color-brand-dark: #6BB5E8;
    --color-brand-light: #1a2d3d;
    --color-text: #e8e8e8;
    --color-text-secondary: #aaa;
    --color-bg: #121212;
    --color-bg-alt: #1a1a1a;
    --color-border: #333;
    --color-footer-bg: #1a1a1a;
    --color-footer-text: #aaa;
    --color-link: #4DA3E0;
    --color-link-hover: #6BB5E8;
    --color-code-bg: #2a2a2a;
  }
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-brand);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 4px 4px;
  z-index: 1000;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* Header / Navigation */
.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 1.5rem;
}

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

.site-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text);
  text-decoration: none;
  font-family: "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -0.02em;
}

.site-logo:hover {
  color: var(--color-brand);
}

/* Auvi wordmark — animated i-dot with breathing animation */
.auvi-i {
  position: relative;
  display: inline-block;
}

.auvi-dot {
  position: absolute;
  top: 0.08em;
  left: 54%;
  margin-left: -0.11em;
  width: 0.22em;
  height: 0.22em;
  border-radius: 50%;
  animation:
    dotScale 5s ease-in-out infinite,
    dotColour 40s linear infinite;
}

@keyframes dotScale {
  0%   { scale: 1; }
  40%  { scale: 1.35; }
  100% { scale: 1; }
}

@keyframes dotColour {
  0%      { background-color: #0B6EB9; }
  11.6%   { background-color: #0B6EB9; }
  13.4%   { background-color: #F0841A; }
  24.1%   { background-color: #F0841A; }
  25.9%   { background-color: #01A7AB; }
  36.6%   { background-color: #01A7AB; }
  38.4%   { background-color: #524594; }
  49.1%   { background-color: #524594; }
  50.9%   { background-color: #B3CB11; }
  61.6%   { background-color: #B3CB11; }
  63.4%   { background-color: #E62321; }
  74.1%   { background-color: #E62321; }
  75.9%   { background-color: #2D8B57; }
  86.6%   { background-color: #2D8B57; }
  88.4%   { background-color: #708090; }
  99.1%   { background-color: #708090; }
  100%    { background-color: #0B6EB9; }
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--color-brand);
}

.site-nav a[aria-current="page"] {
  color: var(--color-brand);
  border-bottom: 2px solid var(--color-brand);
  padding-bottom: 2px;
}

/* Main content area */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

main.wide {
  max-width: var(--max-width-wide);
}

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

.hero-app-name {
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-brand);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.hero-description {
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--color-text);
}

/* App Store badge */
.app-store-badge {
  display: inline-block;
  margin: 1rem 0;
}

.app-store-badge img {
  height: 48px;
  width: auto;
}

.app-store-placeholder {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--color-text);
  color: var(--color-bg);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  .app-store-placeholder {
    background: #e8e8e8;
    color: #121212;
  }
}

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

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

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* Typography for legal/content pages */
h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
}

.page-updated {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}

h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

p {
  margin-bottom: 1rem;
}

/* Highlighted summary box */
.summary-box {
  background: var(--color-brand-light);
  border-left: 4px solid var(--color-brand);
  padding: 1.25rem 1.5rem;
  border-radius: 0 6px 6px 0;
  margin-bottom: 2rem;
}

.summary-box p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.summary-box p:last-child {
  margin-bottom: 0;
}

.summary-box strong {
  color: var(--color-text);
}

/* Lists */
ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

li ul, li ol {
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

/* Links */
a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  color: var(--color-link-hover);
}

/* Strong text */
strong {
  font-weight: 700;
}

/* Uppercase legal text */
.legal-caps {
  text-transform: none; /* Don't force — the source already has caps where needed */
}

/* Contact block */
.contact-block {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.contact-block p {
  margin-bottom: 0.5rem;
}

.contact-block p:last-child {
  margin-bottom: 0;
}

/* Support page specifics */
.faq-item {
  margin-bottom: 2rem;
}

.faq-item h3 {
  margin-top: 0;
  color: var(--color-brand);
}

.support-email {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Footer links row */
.page-footer-links {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.page-footer-links a {
  margin: 0 0.75rem;
  font-size: 0.9rem;
}

/* Site footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-footer-bg);
  padding: 1.5rem;
  text-align: center;
}

.site-footer-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
}

.footer-links {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--color-footer-text);
  text-decoration: none;
  font-size: 0.85rem;
  margin: 0 0.75rem;
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--color-brand);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--color-footer-text);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .hero-app-name {
    font-size: 2.25rem;
  }

  .hero-tagline {
    font-size: 1.05rem;
  }

  main {
    padding: 1.5rem 1rem 2rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.15rem;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    gap: 1rem;
  }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .page-footer-links {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
  }

  main {
    max-width: 100%;
    padding: 0;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    font-weight: normal;
  }
}
