/* 
   Dotyo Website Styles 
   Combined from index.html, privacy.html, and support.html
*/

@import url('https://api.fontshare.com/v2/css?f[]=satoshi@300,400,500,700,900&display=swap');

:root {
    /* Flutter Light Theme Colors */
    --bg: #dce1f0;
    /* 0xFFDCE1F0 (220, 225, 240) */
    --card: #eef3fa;
    /* 0xFFEEF3FA (238, 243, 250) */
    --text-primary: #000000;
    /* 0xFF000000 */
    --text-secondary: #718096;
    /* 0xFF718096 (113, 128, 150) */
    --text-tertiary: #8f9aab;
    /* 0xFF8F9AAB (143, 154, 171) */
    --accent: #ea7f03;
    --accent-light: #ff9a3c;

    /* Flutter Light Theme Shadows (Neumorphic) */
    --shadow-light: -8px -8px 16px rgba(255, 255, 255, 0.4);
    --shadow-dark: 8px 8px 16px rgba(163, 177, 198, 0.6);

    --shadow-sm-light: -4px -4px 8px rgba(255, 255, 255, 0.4);
    --shadow-sm-dark: 4px 4px 8px rgba(166, 171, 189, 1);

    /* Inset Shadows mimic */
    --inset-dark: inset 5px 5px 10px rgba(163, 177, 198, 0.5);
    --inset-light: inset -5px -5px 10px rgba(255, 255, 255, 0.2);

    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Mood colors from app (lib/constants/mood_colors.dart) */
    --mood-good: #ea7f03;
    --mood-meh: #f5c602;
    --mood-rough: #de1547;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'Satoshi', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ─── Grain Overlay ─── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 128px;
}

/* Shared Layout */
.container {
    max-width: 960px;
    /* Consistent width for header/footer alignment */
    margin: 0 auto;
    padding: 0 28px;
}

/* Helper for narrower text content (Privacy, Support) */
.container-narrow {
    max-width: 720px;
    margin: 0 auto;
}

/* ─── Header ─── */
header {
    padding: 28px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeDown 0.8s ease-out;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    box-shadow: var(--shadow-sm-dark), var(--shadow-sm-light);
}

.brand-name {
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.5px;
}

nav {
    display: flex;
    gap: 6px;
}

nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
}

nav a:hover {
    color: var(--text-primary);
    box-shadow: var(--inset-dark), var(--inset-light);
}

/* ─── Hero (Index) ─── */
.hero {
    padding: 100px 0 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: var(--inset-dark), var(--inset-light);
    margin-bottom: 36px;
    animation: fadeUp 0.7s ease-out 0.15s both;
}

.hero-badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2.5s ease-in-out infinite;
}

h1 {
    font-size: clamp(40px, 7vw, 64px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 24px;
    color: var(--text-primary);
    animation: fadeUp 0.7s ease-out 0.25s both;
}

h1 .accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 480px;
    line-height: 1.7;
    margin-bottom: 48px;
    animation: fadeUp 0.7s ease-out 0.35s both;
}

.cta-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: fadeUp 0.7s ease-out 0.45s both;
}

.app-store-btn {
    display: inline-block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-dark), var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-store-btn:hover {
    transform: translateY(-3px);
    box-shadow: 10px 10px 24px #c8ccd1, -10px -10px 24px #ffffff;
}

.app-store-btn:active {
    transform: translateY(0);
    box-shadow: var(--inset-dark), var(--inset-light);
}

.app-store-btn img {
    height: 56px;
    display: block;
}

.cta-subtext {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 400;
}

/* ─── Phone Mockup ─── */
.mockup-section {
    display: flex;
    justify-content: center;
    padding: 40px 0 80px;
    animation: fadeUp 0.9s ease-out 0.55s both;
}

.phone-frame {
    width: 280px;
    border-radius: 40px;
    padding: 14px;
    background: var(--card);
    box-shadow: var(--shadow-dark), var(--shadow-light), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    position: relative;
}

.phone-screen {
    border-radius: 28px;
    overflow: hidden;
    background: var(--bg);
    aspect-ratio: 9/19.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 20px 24px;
}

.phone-screen .greeting {
    font-size: 15px;
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin-bottom: 2px;
}

.phone-screen .date-text {
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

.phone-screen .question {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.mood-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
}

.mood-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.mood-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: var(--shadow-sm-dark), var(--shadow-sm-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.mood-circle:hover {
    transform: scale(1.08);
}

.mood-circle.good {
    background: var(--mood-good);
}

.mood-circle.meh {
    background: var(--mood-meh);
}

.mood-circle.rough {
    background: var(--mood-rough);
}

.mood-face {
    width: 22px;
    height: 22px;
}

.mood-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
}

.phone-week {
    width: 100%;
    padding: 14px;
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm-dark), var(--shadow-sm-light);
}

.phone-week-title {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 10px;
}

.week-dots {
    display: flex;
    justify-content: space-around;
}

.week-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.week-day span {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-secondary);
}

.week-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dde0e5;
}

.week-dot.filled-good {
    background: var(--mood-good);
}

.week-dot.filled-meh {
    background: var(--mood-meh);
}

.week-dot.filled-rough {
    background: var(--mood-rough);
}

/* ─── Divider ─── */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 0;
}

.section-divider .line {
    height: 1px;
    width: 60px;
    background: linear-gradient(90deg, transparent, var(--text-tertiary), transparent);
    opacity: 0.3;
}

.section-divider .diamond {
    width: 5px;
    height: 5px;
    background: var(--accent);
    transform: rotate(45deg);
    opacity: 0.5;
}

/* ─── Features (Index) ─── */
.features-section {
    padding: 60px 0 80px;
}

.section-label {
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.section-heading {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 56px;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--card);
    padding: 28px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-dark), var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease-out forwards;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 12px 12px 28px #c0c4c9, -12px -12px 28px #ffffff;
}

/* Add staggered animation delay for cards if needed */
.feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.3s;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: var(--bg);
    box-shadow: var(--inset-dark), var(--inset-light);
    color: var(--accent);
}

.feature-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 400;
}

/* ─── Philosophy Section ─── */
.philosophy {
    padding: 80px 0;
    text-align: center;
}

.philosophy-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 56px 48px;
    border-radius: 32px;
    background: linear-gradient(145deg, #ff9a6e, #f5f0eb);
    position: relative;
    overflow: hidden;
}

.philosophy-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    pointer-events: none;
}

.philosophy blockquote {
    font-size: 22px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.75);
    letter-spacing: -0.3px;
    position: relative;
}

.philosophy .philo-sub {
    margin-top: 20px;
    font-size: 15px;
    font-weight: 300;
    color: rgba(0, 0, 0, 0.55);
    line-height: 1.6;
}

/* ─── Footer ─── */
footer {
    padding: 40px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p,
footer span {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 400;
}

.footer-links {
    display: flex;
    gap: 20px;
}

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

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

/* ─── Text Pages (Privacy & Support) ─── */
.content-wrapper {
    margin: 60px 0 100px;
}

.content-wrapper h1 {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    color: var(--text-primary);
    text-align: left;
    animation: none;
}

.content-wrapper h2 {
    font-size: 24px;
    margin: 48px 0 16px;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    font-weight: 700;
}

.content-wrapper p,
.content-wrapper li {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 16px;
}

.content-wrapper ul {
    margin-left: 20px;
    margin-bottom: 24px;
}

.content-wrapper a.link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

/* Support Specific */
.contact-card {
    background: var(--card);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-dark), var(--shadow-light);
    text-align: center;
    max-width: 400px;
    margin: 40px auto;
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
}

.icon-box {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--accent);
    box-shadow: var(--inset-dark), var(--inset-light);
}

.email-btn {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 32px;
    background: var(--bg);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    border-radius: 100px;
    box-shadow: var(--shadow-dark), var(--shadow-light);
    transition: all 0.2s ease;
}

.email-btn:hover {
    transform: translateY(-2px);
    box-shadow: 10px 10px 24px #c8ccd1, -10px -10px 24px #ffffff;
}

.email-btn:active {
    transform: translateY(0);
    box-shadow: var(--inset-dark), var(--inset-light);
}

.faq-section {
    margin-top: 80px;
}

.faq-item {
    margin-bottom: 40px;
}

.faq-item h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.faq-item p {
    color: var(--text-secondary);
}

/* ─── Animations ─── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.85);
    }
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .hero {
        padding: 60px 0 48px;
    }

    h1 {
        letter-spacing: -1.5px;
    }

    .subtitle {
        font-size: 16px;
        max-width: 360px;
    }

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

    .phone-frame {
        width: 240px;
    }

    .philosophy-card {
        padding: 40px 28px;
    }

    .philosophy blockquote {
        font-size: 19px;
    }

    footer {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }

    nav {
        gap: 2px;
    }

    nav a {
        padding: 8px 14px;
        font-size: 13px;
    }

    .section-heading {
        font-size: 26px;
    }

    .content-wrapper h1 {
        font-size: 32px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}