/* Colors based on Colors.swift 
*/
:root {
    --color-ice-white: #f8fafa;       /* COLOR_ICE_WHITE */
    --color-primary: #3a7fa3;         /* COLOR_SCIENCE_CALM_BLUE */
    --color-text-primary: #1a2a33;    /* COLOR_TEXT_PRIMARY */
    --color-text-secondary: #5b6b75;  /* COLOR_TEXT_SECONDARY */
    --color-text-tertiary: #9fb2bd;   /* COLOR_TEXT_TERTIARY */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--color-ice-white);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--color-text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Aligns content to the top */
    justify-content: flex-start; 
    align-items: center;
    /* REDUCED: Global offset from the very top of the screen */
    padding-top: 1vh; 
    overflow: hidden;
    position: relative;
}

body:has(.legal-page) {
    overflow: auto;
    min-height: auto;
}

body:has(.legal-page) .footer {
    position: relative;
    bottom: auto;
    margin-top: 4rem;
    margin-bottom: 30px;
}

/* Add this to the top of your CSS */
.site-header {
    width: 100%;
    padding: 24px 40px; 
    display: flex;
    justify-content: flex-start;
    z-index: 10;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 22%; /* iOS Squircle look */
    object-fit: cover;
}

.header-app-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.3px;
}

@media (max-width: 480px) {
    .site-header { padding: 20px 24px; }
    body { padding-top: 2vh; }
}

/* BACKGROUND CIRCLES 
   Movement tripled and speed increased per your request.
*/
/* BACKGROUND CIRCLES - Randomized Vectors */
.circle {
    position: absolute;
    border-radius: 50%;
    background-color: var(--color-primary);
    z-index: -1;
    pointer-events: none;
}

.circle-1 {
    width: 280px; height: 280px;
    left: 10%; top: 10%;
    opacity: 0.06;
    animation: float-v1 14s ease-in-out infinite;
}

.circle-2 {
    width: 180px; height: 180px;
    right: 15%; top: 20%;
    opacity: 0.08;
    animation: float-v2 18s ease-in-out infinite;
}

.circle-3 {
    width: 120px; height: 120px;
    left: 12%; bottom: 15%;
    opacity: 0.05;
    animation: float-v3 22s ease-in-out infinite;
}

.circle-4 {
    width: 90px; height: 90px;
    right: 20%; bottom: 25%;
    opacity: 0.04;
    animation: float-v4 20s ease-in-out infinite;
}

/* Vector 1: Diagonal Right-Down */
@keyframes float-v1 {
    0%, 100% { transform: translate(0, 0) scale(1.0); }
    50% { transform: translate(60px, 40px) scale(1.08); }
}

/* Vector 2: Circular/Oval Rotation */
@keyframes float-v2 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-50px, 40px); }
    66% { transform: translate(-20px, -60px); }
}

/* Vector 3: Vertical Surge */
@keyframes float-v3 {
    0%, 100% { transform: translateY(0) scale(1.0); }
    50% { transform: translateY(-80px) scale(1.1); }
}

/* Vector 4: Horizontal Drift */
@keyframes float-v4 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-70px); }
}

/* HERO CONTENT 
*/
.content {
    text-align: center;
    max-width: 600px;
    padding: 0 24px;
    z-index: 1;
    /* REDUCED: Spacing between the site-header and the hero icon container */
    margin-top: 137px; 
}

.icon-container {
    background-color: rgba(58, 127, 163, 0.12);
    width: 137px;
    height: 137px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 30px; /* Reduced margin to keep headline tighter */
}

.app-icon {
    color: rgba(58, 127, 163, 0.92);
    width: 72px;
    height: 72px;
}

.headline {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.subheadline {
    font-size: 19px;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    line-height: 1.4;
}

.download-button img {
    height: 52px;
    transition: transform 0.2s ease;
}

.download-button:hover img {
    transform: scale(1.04);
}

/* FOOTER 
   Font sizes bumped to 14px for better legibility.
*/
.footer {
    position: absolute;
    bottom: 30px;
    width: 100%;
    text-align: center;
    padding: 0 20px;
}

.copyright {
    font-size: 14px;
    color: var(--color-text-tertiary);
    margin-bottom: 13px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--color-primary);
}

/* === Legal Pages === */
.legal-page { 
  max-width: 900px; 
  margin: 0 auto; 
  padding: 4rem 1rem; 
}

.legal-page h1 { 
  margin-bottom: 1.5rem; 
}

.legal-page h2 { 
  margin-top: 2.5rem; 
  margin-bottom: 1rem; 
  font-size: 1.5rem; 
}

.legal-page h3 { 
  margin-top: 2rem; 
  margin-bottom: 0.75rem; 
  font-size: 1.25rem; 
}

.legal-page h4 { 
  margin-top: 1.5rem; 
  margin-bottom: 0.5rem; 
  font-size: 1.1rem; 
}

.legal-page p, 
.legal-page ul { 
  margin-bottom: 1.25rem; 
  line-height: 1.8; 
}

.legal-page ul { 
  padding-left: 2rem; 
}

.legal-page a { 
  color: #1D1A23; 
  text-decoration: underline; 
}

.notice { 
  background: #F6F6FA; 
  padding: 1.5rem; 
  border-left: 4px solid #1D1A23; 
  margin-bottom: 2rem; 
}

/* === Support Page === */
.support-page { 
  max-width: 700px; 
  margin: 0 auto; 
  padding: 4rem 1rem; 
  text-align: center;
}

.support-page h1 { 
  margin-bottom: 1.5rem; 
  font-size: 2.5rem;
}

.support-page p { 
  font-size: 1.0rem; 
  line-height: 1.8; 
  margin-bottom: 1.5rem;
  color: #8E8E92;
}

.support-page a { 
  color: #1D1A23; 
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid #1D1A23;
}

.support-page a:hover {
  opacity: 0.8;
}

.support-email {
  background: #F6F6FA;
  padding: 1.5rem;
  border-radius: 12px;
  margin: 2rem 0;
  font-size: 1.25rem;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    body { padding-top: 1vh; }
    .site-header { padding: 12px 24px; }
    .app-icon { width: 56px; height: 56px; }

    .content { margin-top: 70px; }

    .headline { font-size: 34px; }
    .subheadline { font-size: 16px; }
    .subheadline { white-space: nowrap; }
    .subheadline { margin-bottom: 25px; }

    .icon-container { width: 95px; height: 95px; }

    .support-page h1 { font-size: 2rem; }

    .footer { margin-bottom: 21px; }
    .footer-links { gap: 12px; }
    .footer-links a { font-size: 14px; }

    .circle-1 { width: 140px; height: 140px; }
    .circle-2 { width: 90px; height: 90px; }
    .circle-3 { width: 60px; height: 60px; }
    .circle-4 { width: 45px; height: 45px; }
}