/* ============================================================
   SeniorMinder — Shared Stylesheet
   ============================================================ */

/* ------------------------------------------------------------
   Design Tokens
   ------------------------------------------------------------ */
:root {
    /* Brand — Sage (UI accents, backgrounds, buttons) */
    --color-sage:            #7A9E7E;
    --color-sage-light:      #A8C4AB;
    --color-sage-dark:       #5B7D5F;

    /* Brand — Ocean Blue & Solar Orange (links, interactive) */
    --color-ocean-blue:      #1E5A8C;
    --color-ocean-blue-light:#2D7AB8;
    --color-solar-orange:    #C2662D;
    --color-solar-orange-light: #D4853E;

    /* Backgrounds */
    --color-cream:           #FAF8F5;
    --color-warm-white:      #FFFEFB;

    /* Text — standardized to a single dark value; light variant for secondary */
    --color-text:            #2E3A2F;
    --color-text-light:      #5A6B5C;

    /* Misc */
    --color-gold:            #C9A962;

    /* Link states */
    --color-link:            var(--color-ocean-blue);
    --color-link-hover:      var(--color-ocean-blue-light);
    --color-link-active:     var(--color-solar-orange);
    --color-link-visited:    var(--color-solar-orange-light);
}

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

/* ------------------------------------------------------------
   Base
   ------------------------------------------------------------ */
body {
    font-family: 'Source Sans 3', -apple-system, sans-serif;
    background: var(--color-cream);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Subtle noise texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: 1;
}

/* ------------------------------------------------------------
   Links — consistent across all states
   ------------------------------------------------------------ */
a {
    color: var(--color-link);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:visited { color: var(--color-link-visited); }
a:hover   { color: var(--color-link-hover); }
a:active  { color: var(--color-link-active); }

/* Footer address links inherit surrounding text color */
a.inherit-color,
.footer-address a {
    color: inherit;
    text-decoration: none;
}

.footer-address a:hover { color: var(--color-link-hover); }

/* ------------------------------------------------------------
   Logo
   ------------------------------------------------------------ */
.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
    /* Override link color states — logo should never tint */
    color: inherit;
}

.logo-link:visited,
.logo-link:hover,
.logo-link:active {
    color: inherit;
    opacity: 0.85;
}

/* Large logo — index.html and videos.html */
.logo-lg img {
    max-height: 100px;
    width: auto;
}

/* Small logo — terms.html and privacy.html */
.logo-sm img {
    max-height: 60px;
    width: auto;
}

/* ------------------------------------------------------------
   Footer (shared by all pages)
   ------------------------------------------------------------ */
footer {
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.footer-content {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.footer-address {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-text-light);
    opacity: 0.8;
    line-height: 1.6;
}

.footer-links {
    margin-top: 0.75rem;
    font-size: 0.8rem;
}

.footer-links a {
    margin: 0 0.5rem;
}

/* ------------------------------------------------------------
   Document pages — terms.html & privacy.html
   ------------------------------------------------------------ */
header {
    padding: 2rem 2rem 0;
    text-align: center;
    position: relative;
    z-index: 2;
}

.doc-main {
    flex: 1;
    max-width: 740px;
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
    position: relative;
    z-index: 2;
}

.doc-main h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2rem;
    font-weight: 500;
    color: var(--color-sage-dark);
    margin-bottom: 0.5rem;
    text-align: center;
}

.doc-main h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--color-sage-dark);
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
}

.effective-date {
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.doc-main p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--color-text-light);
    font-weight: 300;
    margin-bottom: 1rem;
}

.doc-main ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.doc-main li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-light);
    font-weight: 300;
}

.doc-main li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 7px;
    height: 7px;
    background: var(--color-sage-light);
    border-radius: 50%;
}

@media (max-width: 640px) {
    .doc-main h1 { font-size: 1.6rem; }
    .doc-main { padding: 2rem 1.25rem 3rem; }
}

/* ------------------------------------------------------------
   Index page — index.html
   ------------------------------------------------------------ */
.index-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 2rem;
    position: relative;
    z-index: 2;
}

/* Decorative background blobs */
.decoration {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    background: var(--color-sage);
}

.decoration-1 {
    width: 500px; height: 500px;
    top: -200px; right: -150px;
    animation: float 20s ease-in-out infinite;
}

.decoration-2 {
    width: 300px; height: 300px;
    bottom: -100px; left: -100px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%       { transform: translate(20px, -20px) scale(1.05); }
}

.content {
    max-width: 680px;
    text-align: center;
    animation: fadeUp 1s ease-out;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.logo-container {
    margin-bottom: 2.5rem;
}

.videos-link {
    display: block;
    margin-top: 0.9rem;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.tagline {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--color-sage-dark);
    margin-bottom: 2rem;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.description {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--color-text-light);
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.services {
    text-align: left;
    margin-bottom: 2.5rem;
    padding: 2rem 2.5rem;
    background: var(--color-warm-white);
    border: 1px solid rgba(122, 158, 126, 0.15);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.services h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--color-sage-dark);
    margin-bottom: 1.25rem;
}

.services ul { list-style: none; padding: 0; }

.services li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-light);
    font-weight: 300;
}

.services li::before {
    content: '';
    position: absolute;
    left: 0; top: 0.55em;
    width: 8px; height: 8px;
    background: var(--color-sage-light);
    border-radius: 50%;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-warm-white);
    border: 1px solid rgba(122, 158, 126, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-sage-dark);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.badge-dot {
    width: 8px; height: 8px;
    background: var(--color-sage);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(0.85); }
}

.divider {
    width: 40px;
    height: 1px;
    background: var(--color-sage-light);
    margin: 2rem auto;
    opacity: 0.5;
}

.contact-section { margin-top: 1rem; }

.contact-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.contact-link {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.15rem;
}

/* Opt-in form */
.optin-section {
    width: 100%;
    max-width: 560px;
    margin-top: 1rem;
}

.optin-card {
    background: var(--color-warm-white);
    border: 1px solid rgba(122, 158, 126, 0.15);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

.optin-card h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.optin-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-light);
    font-weight: 300;
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
}

.form-group input {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(122, 158, 126, 0.25);
    border-radius: 8px;
    background: var(--color-cream);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.95rem;
    color: var(--color-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.form-group input:focus {
    border-color: var(--color-sage);
    box-shadow: 0 0 0 3px rgba(122, 158, 126, 0.1);
}

.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }

.checkbox-group { margin: 1.25rem 0; }

.checkbox-group label {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px; height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--color-ocean-blue);
}

.checkbox-group span {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.6;
    font-weight: 300;
}

.sms-disclosure {
    background: rgba(122, 158, 126, 0.06);
    border: 1px solid rgba(122, 158, 126, 0.12);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--color-text-light);
    text-align: left;
}

.optin-button {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--color-sage) 0%, var(--color-sage-dark) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 16px rgba(122, 158, 126, 0.3);
}

.optin-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(122, 158, 126, 0.4);
}

.optin-button:active { transform: translateY(0); }

@media (max-width: 640px) {
    .tagline       { font-size: 1.4rem; }
    .description   { font-size: 1rem; }
    .decoration-1,
    .decoration-2  { display: none; }
    .form-row      { flex-direction: column; gap: 0; }
    .optin-card    { padding: 1.75rem; }
    .services      { padding: 1.5rem; }
}

/* ------------------------------------------------------------
   Videos page — videos.html
   ------------------------------------------------------------ */
.videos-main {
    flex: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
    position: relative;
    z-index: 2;
    width: 100%;
}

.videos-logo-container {
    text-align: center;
    margin-bottom: 2.5rem;
}

.videos-main h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--color-sage-dark);
    margin-bottom: 0.5rem;
    text-align: center;
    letter-spacing: -0.01em;
}

.page-subtitle {
    text-align: center;
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 3rem;
    font-weight: 300;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.video-card {
    background: var(--color-warm-white);
    border: 1px solid rgba(122, 158, 126, 0.15);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.video-card:hover {
    box-shadow: 0 8px 30px rgba(61, 74, 62, 0.1);
    transform: translateY(-2px);
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #1a1a1a;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #1a1a1a;
}

.video-info {
    padding: 1.25rem 1.5rem 1.5rem;
}

.video-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}

.video-description {
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-weight: 300;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .video-grid  { grid-template-columns: 1fr; }
    .videos-main h1 { font-size: 1.4rem; }
    .videos-main { padding: 2rem 1.25rem 3rem; }
}
