/* ============================================
   Heart Guardian - Medical Monitoring Service LP
   Design Philosophy:
   - WCAG 2.1 AA Compliance
   - Senior-friendly (18px base font, high contrast)
   - Warm & trustworthy medical aesthetic
   ============================================ */

/* CSS Variables */
:root {
    /* Primary Colors - Deep Navy (Trust & Professionalism) */
    --deep-navy: #1a365d;
    --navy-dark: #0f2744;
    --navy-light: #2c5282;

    /* Accent Colors - Champagne Gold (Warmth & Premium) */
    --champagne-gold: #d4af37;
    --gold-light: #e6c65a;
    --gold-dark: #b8962e;

    /* Neutral Colors */
    --off-white: #fafafa;
    --warm-white: #f7f5f2;
    --light-grey: #e8e8e8;
    --medium-grey: #666666;
    --dark-grey: #333333;

    /* Semantic Colors */
    --success-green: #48bb78;
    --warning-amber: #ed8936;
    --alert-red: #e53e3e;
    --info-blue: #4299e1;

    /* Typography */
    --font-serif: 'Noto Serif JP', serif;
    --font-sans: 'Noto Sans JP', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(26, 54, 93, 0.08);
    --shadow-md: 0 4px 12px rgba(26, 54, 93, 0.12);
    --shadow-lg: 0 8px 24px rgba(26, 54, 93, 0.16);
    --shadow-xl: 0 12px 32px rgba(26, 54, 93, 0.2);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 18px;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--dark-grey);
    background-color: var(--off-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Utility Classes
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.sp-only {
    display: none;
}

.pc-only {
    display: inline;
}

@media (max-width: 768px) {
    .sp-only {
        display: inline;
    }
    .pc-only {
        display: none;
    }
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.4;
    color: var(--deep-navy);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-lg);
}

h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

h4 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--navy-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--champagne-gold);
}

ul, ol {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

li {
    margin-bottom: var(--spacing-xs);
}

/* ============================================
   Header
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--light-grey);
    transition: all var(--transition-normal);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--champagne-gold);
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--deep-navy);
}

.nav-desktop {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav-desktop a {
    font-size: 0.95rem;
    color: var(--dark-grey);
    padding: var(--spacing-xs) 0;
    position: relative;
}

.nav-desktop a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--champagne-gold);
    transition: width var(--transition-normal);
}

.nav-desktop a:hover::after {
    width: 100%;
}

.nav-cta {
    background: var(--deep-navy);
    color: white !important;
    padding: var(--spacing-xs) var(--spacing-md) !important;
    border-radius: var(--radius-md);
    font-weight: 500;
}

.nav-cta:hover {
    background: var(--navy-light);
}

.nav-cta::after {
    display: none !important;
}

/* Mobile Navigation */
.nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.nav-mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--deep-navy);
    margin: 5px 0;
    transition: var(--transition-fast);
}

@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }

    .nav-mobile-toggle {
        display: block;
    }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--deep-navy) 0%, var(--navy-light) 100%);
    color: white;
    padding-top: 80px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 54, 93, 0.7);
}

.hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    padding: var(--spacing-2xl);
}

.hero-title {
    font-size: 3rem;
    font-weight: 600;
    color: white;
    margin-bottom: var(--spacing-lg);
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.hero-notice {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    display: inline-block;
}

.hero-cta-group {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-content {
        padding: var(--spacing-lg);
    }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-xl);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--champagne-gold);
    color: var(--deep-navy);
}

.btn-primary:hover {
    background: var(--gold-light);
    color: var(--deep-navy);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--deep-navy);
}

.btn-outline {
    background: transparent;
    color: var(--deep-navy);
    border: 2px solid var(--deep-navy);
}

.btn-outline:hover {
    background: var(--deep-navy);
    color: white;
}

.btn-large {
    padding: var(--spacing-md) var(--spacing-2xl);
    font-size: 1.1rem;
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: var(--spacing-3xl) 0;
}

.section-light {
    background: var(--off-white);
}

.section-warm {
    background: var(--warm-white);
}

.section-dark {
    background: var(--deep-navy);
    color: white;
}

.section-dark h2,
.section-dark h3 {
    color: white;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--medium-grey);
    max-width: 700px;
    margin: 0 auto;
}

.section-dark .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--deep-navy), var(--navy-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    color: white;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.card-description {
    color: var(--medium-grey);
    line-height: 1.7;
}

.card-note {
    font-size: 0.8rem;
    color: var(--medium-grey);
    opacity: 0.9;
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-xs);
    border-top: 1px solid var(--light-grey);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Feature Boxes
   ============================================ */
.feature-box {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.feature-box-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--warm-white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--deep-navy);
}

.feature-box-content h4 {
    margin-bottom: var(--spacing-xs);
}

.feature-box-content p {
    color: var(--medium-grey);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ============================================
   Two Column Layout
   ============================================ */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.two-column-reverse {
    direction: rtl;
}

.two-column-reverse > * {
    direction: ltr;
}

.two-column-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .two-column,
    .two-column-reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .two-column-image {
        order: -1;
    }
}

/* ============================================
   Checklist
   ============================================ */
.checklist {
    list-style: none;
    margin-left: 0;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    background: var(--warm-white);
    border-radius: var(--radius-md);
}

.checklist-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--champagne-gold);
}

/* ============================================
   FAQ Section
   ============================================ */
.faq-item {
    border-bottom: 1px solid var(--light-grey);
    padding: var(--spacing-lg) 0;
}

.faq-question {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--deep-navy);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.faq-question::before {
    content: 'Q.';
    color: var(--champagne-gold);
    font-weight: 600;
}

.faq-answer {
    color: var(--medium-grey);
    line-height: 1.8;
    padding-left: calc(var(--spacing-sm) + 1.5em);
}

.faq-answer::before {
    content: 'A.';
    color: var(--deep-navy);
    font-weight: 600;
    margin-left: calc(-1 * (var(--spacing-sm) + 1.5em));
    margin-right: var(--spacing-sm);
}

/* ============================================
   Tables
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    margin: var(--spacing-lg) 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

th, td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--light-grey);
}

th {
    background: var(--deep-navy);
    color: white;
    font-weight: 500;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--warm-white);
}

/* ============================================
   Notice Box
   ============================================ */
.notice {
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin: var(--spacing-lg) 0;
}

.notice-warning {
    background: #fff8e6;
    border-left: 4px solid var(--warning-amber);
}

.notice-info {
    background: #e6f4ff;
    border-left: 4px solid var(--info-blue);
}

.notice-title {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.notice-warning .notice-title {
    color: var(--warning-amber);
}

.notice-info .notice-title {
    color: var(--info-blue);
}

/* ============================================
   Steps / Process
   ============================================ */
.steps {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.step {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-lg);
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--deep-navy);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
}

.step-content h4 {
    margin-bottom: var(--spacing-xs);
}

.step-content p {
    color: var(--medium-grey);
    margin-bottom: 0;
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--deep-navy) 0%, var(--navy-light) 100%);
    color: white;
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-lg);
}

.cta-section h2 {
    color: white;
    margin-bottom: var(--spacing-md);
}

.cta-section p {
    opacity: 0.9;
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--navy-dark);
    color: white;
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

.footer-brand .logo-text {
    color: white;
}

.footer-description {
    margin-top: var(--spacing-md);
    opacity: 0.8;
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-links h4 {
    color: var(--champagne-gold);
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
}

.footer-links ul {
    list-style: none;
    margin: 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--champagne-gold);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.6;
}

.footer-legal {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-legal a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   Disclaimer
   ============================================ */
.disclaimer {
    background: var(--warm-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin: var(--spacing-2xl) 0;
    border: 1px solid var(--light-grey);
}

.disclaimer-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--medium-grey);
    margin-bottom: var(--spacing-sm);
}

.disclaimer p {
    font-size: 0.85rem;
    color: var(--medium-grey);
    margin-bottom: var(--spacing-xs);
    line-height: 1.6;
}

/* ============================================
   Status Indicators
   ============================================ */
.status {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
}

.status-good {
    background: rgba(72, 187, 120, 0.15);
    color: var(--success-green);
}

.status-warning {
    background: rgba(237, 137, 54, 0.15);
    color: var(--warning-amber);
}

.status-alert {
    background: rgba(229, 62, 62, 0.15);
    color: var(--alert-red);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* ============================================
   Dashboard Preview
   ============================================ */
.dashboard-preview {
    background: var(--dark-grey);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-xl);
}

.dashboard-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.dashboard-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dashboard-dot-red { background: #ff5f56; }
.dashboard-dot-yellow { background: #ffbd2e; }
.dashboard-dot-green { background: #27ca40; }

.dashboard-content {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    min-height: 300px;
}

/* ============================================
   Breadcrumb
   ============================================ */
.breadcrumb {
    padding: var(--spacing-md) 0;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--medium-grey);
}

.breadcrumb span {
    color: var(--medium-grey);
    margin: 0 var(--spacing-xs);
}

.breadcrumb-current {
    color: var(--deep-navy);
}

/* ============================================
   Page Header (for inner pages)
   ============================================ */
.page-header {
    position: relative;
    background: linear-gradient(135deg, var(--deep-navy) 0%, var(--navy-light) 100%);
    color: white;
    padding: calc(80px + var(--spacing-3xl)) 0 var(--spacing-3xl);
    text-align: center;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(26, 54, 93, 0.75);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    color: white;
    margin-bottom: var(--spacing-md);
}

.page-header p {
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   Icon Set (SVG inline icons)
   ============================================ */
.icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-lg {
    width: 48px;
    height: 48px;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .header,
    .footer,
    .btn,
    .nav-desktop {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: var(--spacing-lg);
    }

    .section {
        padding: var(--spacing-lg) 0;
    }
}
