/* ═══════════════════════════════════════════════════════════
   HEXAGON MONITOR — Common Styles
   Shared across all pages (home, dashboard, etc.)
   ═══════════════════════════════════════════════════════════ */

/* ─── Reset ───────────────────────────────────────────── */

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

html {
    scrollbar-gutter: stable;
}

/* ─── Design Tokens ───────────────────────────────────── */

:root {
    --bg: #fafafa;
    --fg: #0a0a0a;
    --accent: #2a2a2a;
    --border: #e0e0e0;
    --gray: #666;
    --red: #c0392b;
    --green: #27ae60;
    --yellow: #d4a017;
    --muted: #999;
}

/* ─── Base ────────────────────────────────────────────── */

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Layout ──────────────────────────────────────────── */

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ─── Header ──────────────────────────────────────────── */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 0 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.domain {
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: color 0.2s;
}

.domain:hover {
    color: var(--fg);
}

/* ─── Hero ────────────────────────────────────────────── */


.hero h1,
h1 {
    font-size: clamp(36px, 8vw, 44px);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 16px;
    line-height: 1.05;
}

.tagline {
    font-size: 15px;
    font-weight: 400;
    color: var(--gray);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1.75;
}

/* ─── Section Titles ──────────────────────────────────── */

.section-title {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 20px;
}

/* ─── Buttons (shared base) ───────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid var(--border);
    background: transparent;
    font-size: 14px;
    font-family: inherit;
    color: var(--fg);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    border-color: var(--fg);
    background: var(--fg);
    color: var(--bg);
}

.btn:active {
    transform: scale(0.98);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 12px;
}

.btn-danger {
    border-color: var(--red);
    color: var(--red);
}

.btn-danger:hover {
    background: var(--red);
    color: var(--bg);
    border-color: var(--red);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ─── Footer ──────────────────────────────────────────── */

footer {
    padding: 28px 0;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    margin-top: auto;
}

/* ─── Responsive (shared breakpoints) ─────────────────── */

@media (min-width: 480px) {
    .container {
        padding: 0 32px;
    }

    header {
        padding: 40px 0 24px;
        margin-bottom: 48px;
    }

    .section-title {
        font-size: 12px;
    }

    footer {
        padding: 24px 0;
    }
}

@media (max-width: 380px) {
    .container {
        padding: 0 16px;
    }

    .hero h1,
    h1 {
        letter-spacing: -0.5px;
    }
}

/* ─── Focus Styles（アクセシビリティ）─────────────────────── */

*:focus-visible {
    outline: 2px solid var(--fg);
    outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible,
input:focus-visible {
    outline: 2px solid var(--fg);
    outline-offset: 2px;
}

/* ─── Dark Mode (class-based) ─────────────────────────── */

html.dark {
    --bg: #141414;
    --fg: #e5e5e5;
    --accent: #d0d0d0;
    --border: #2e2e2e;
    --gray: #9a9a9a;
    --red: #e74c3c;
    --green: #2ecc71;
    --yellow: #f1c40f;
    --muted: #666;
    color-scheme: dark;
}

html.dark input[type="text"],
html.dark input[type="email"],
html.dark input[type="url"],
html.dark input[type="password"] {
    background: #1e1e1e;
}

html.dark input::placeholder {
    color: #555;
}

/* ─── Theme Toggle ────────────────────────────────────── */

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--gray);
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover {
    color: var(--fg);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.theme-toggle .icon-light {
    display: none;
}

html.dark .theme-toggle .icon-light {
    display: block;
}

html.dark .theme-toggle .icon-dark {
    display: none;
}
