/* ============================================================
   FIREINS — Common Styles (shared across all pages)
   LIGHT THEME — B+C Hybrid
   ============================================================ */

:root {
    --bg:          #FFFFFF;
    --bg-card:     #F9FAFB;
    --bg-elevated: #F3F4F6;
    --bg-dark:     #111827;
    --accent:      #D97706;
    --accent-light:#F59E0B;
    --accent-dim:  rgba(217,119,6,.08);
    --red:         #DC2626;
    --red-dim:     rgba(220,38,38,.08);
    --emerald:     #059669;
    --emerald-dim: rgba(5,150,105,.08);
    --cyan:        #0891B2;
    --violet:      #7C3AED;

    --white:   #FFFFFF;
    --t90:     #111827;
    --t70:     #374151;
    --t50:     #6B7280;
    --t30:     #9CA3AF;
    --t15:     #D1D5DB;
    --t08:     #E5E7EB;
    --t04:     #F3F4F6;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    --font-d: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
    --max-w: 1100px;
    --max-w-narrow: 720px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font); color: var(--t70); background: var(--bg);
    line-height: 1.6; overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 24px; }

/* Content stays visible even when JavaScript is delayed or unavailable. */
[data-anim] { opacity: 1; transform: none; }

/* ====== NAV ====== */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 16px 0;
    transition: background .3s, padding .3s, box-shadow .3s;
}
.nav.is-scrolled {
    background: rgba(255,255,255,.92); backdrop-filter: blur(16px);
    padding: 10px 0; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.nav-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--accent); color: #fff;
    font-family: var(--font); font-weight: 800; font-size: 9px;
    line-height: 1.15; text-align: center; white-space: pre-line;
}
.logo-text { font-family: var(--font-d); font-weight: 700; font-size: 15px; color: var(--t90); }
/* 워드마크 — "화재보험"이 주, "비교견적"은 작게 붙는 서비스명 */
.logo-text { display: inline-flex; align-items: baseline; gap: 5px; }
.logo-a { font-size: 17px; font-weight: 900; color: var(--t90); letter-spacing: -.045em; }
.logo-b { font-size: 12.5px; font-weight: 800; color: var(--accent); letter-spacing: -.01em; }
.footer-brand .logo-a { font-size: 14px; }
.footer-brand .logo-b { font-size: 11px; }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
    font-size: 15px; font-weight: 500; color: var(--t50);
    transition: color .2s; position: relative; letter-spacing: -.01em;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--t90); font-weight: 600; }
.nav-links a.is-active::after {
    content: ''; position: absolute; bottom: -6px; left: 0; right: 0;
    height: 2px; background: var(--accent); border-radius: 1px;
}
.nav-links .nav-app-link { display: none; }
.nav-cta {
    font-size: 12px; font-weight: 600; color: #fff;
    background: var(--accent); padding: 8px 20px; border-radius: 8px;
    transition: background .2s, transform .2s;
}
.nav-cta:hover { background: var(--accent-light); transform: translateY(-1px); }

/* Mobile menu toggle button */
.nav-menu-btn {
    display: none; width: 36px; height: 36px; border: none; background: none;
    cursor: pointer; padding: 6px; position: relative;
}
.nav-menu-btn span {
    display: block; width: 20px; height: 2px; background: var(--t70);
    border-radius: 2px; transition: transform .3s, opacity .3s;
    position: absolute; left: 8px;
}
.nav-menu-btn span:nth-child(1) { top: 10px; }
.nav-menu-btn span:nth-child(2) { top: 17px; }
.nav-menu-btn span:nth-child(3) { top: 24px; }
.nav-menu-btn.is-open span:nth-child(1) { top: 17px; transform: rotate(45deg); }
.nav-menu-btn.is-open span:nth-child(2) { opacity: 0; }
.nav-menu-btn.is-open span:nth-child(3) { top: 17px; transform: rotate(-45deg); }

/* ====== Buttons ====== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font); font-size: 14px; font-weight: 600;
    padding: 14px 32px; border-radius: 10px; border: none; cursor: pointer;
    transition: all .25s cubic-bezier(.16,1,.3,1);
}
.btn--primary {
    background: var(--accent); color: #fff;
    box-shadow: 0 4px 16px rgba(217,119,6,.2);
}
.btn--primary:hover {
    background: #B45309; transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(217,119,6,.25);
}
.btn--ghost {
    background: transparent; color: var(--t50);
    border: 1px solid var(--t15); padding: 13px 31px;
}
.btn--ghost:hover { background: var(--t04); color: var(--t90); border-color: var(--t30); }
.btn--dark {
    background: var(--bg-dark); color: #fff;
    box-shadow: 0 4px 16px rgba(17,24,39,.15);
}
.btn--dark:hover { background: #1F2937; transform: translateY(-2px); }
.btn--lg { padding: 18px 40px; font-size: 16px; border-radius: 12px; }
.btn--full { width: 100%; justify-content: center; }
.btn svg { width: 18px; height: 18px; }

/* ====== Section utilities ====== */
.section { padding: 120px 0; }
.section--alt { background: var(--bg-card); }
.section-label {
    font-family: var(--font-d); font-size: 11px; font-weight: 700;
    letter-spacing: .16em; color: var(--accent); text-transform: uppercase;
    margin-bottom: 16px; display: block;
}
.section-title {
    font-size: clamp(28px,4vw,40px); font-weight: 900;
    color: var(--t90); line-height: 1.2; letter-spacing: -.03em;
    margin-bottom: 16px;
}
.section-desc {
    font-size: 15px; color: var(--t50); line-height: 1.8;
    max-width: 560px; font-weight: 300;
}

/* ====== Dark section (inverted) ====== */
.section--dark { background: var(--bg-dark); }
.section--dark .section-label { color: var(--accent-light); }
.section--dark .section-title { color: #fff; }
.section--dark .section-desc { color: rgba(255,255,255,.4); }

/* ====== Big number display ====== */
.big-num {
    font-family: var(--font-d); font-weight: 900;
    line-height: 1; letter-spacing: -.04em;
}
.big-num--accent { color: var(--accent); }
.big-num--red { color: var(--red); }
.big-num--dark { color: var(--t90); }
.big-num-unit { font-size: .4em; font-weight: 700; margin-left: 4px; vertical-align: baseline; }

/* ====== Card base ====== */
.card {
    background: var(--white); border: 1px solid var(--t08);
    border-radius: 16px; padding: 32px;
    transition: border-color .3s, box-shadow .3s;
}
.card:hover { border-color: var(--t15); box-shadow: 0 8px 32px rgba(0,0,0,.06); }

/* ====== Tag / Badge ====== */
.tag {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; letter-spacing: .06em;
    padding: 5px 12px; border-radius: 6px;
}
.tag--red { background: var(--red-dim); color: var(--red); }
.tag--amber { background: var(--accent-dim); color: var(--accent); }
.tag--emerald { background: var(--emerald-dim); color: var(--emerald); }

/* ====== FOOTER ====== */
.footer { padding: 40px 0; border-top: 1px solid var(--t08); }
.footer-inner {
    display: flex; align-items: center; justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-brand .logo-mark { width: 24px; height: 24px; font-size: 11px; border-radius: 6px; }
.footer-brand .logo-text { font-size: 13px; }
.footer-by { font-size: 11px; color: var(--t30); margin-left: 4px; }
.footer-promise { font-size: 11.5px; color: var(--t50); margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--t08); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--t30); transition: color .2s; }
.footer-links a:hover { color: var(--t70); }
.footer-copy { font-size: 11px; color: var(--t30); }

/* ====== Form ====== */
.form-input {
    font-family: var(--font); font-size: 14px;
    padding: 14px 18px; border-radius: 10px;
    border: 1.5px solid var(--t08); background: var(--white);
    color: var(--t90); outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.form-input::placeholder { color: var(--t30); }
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,119,6,.08); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-input { flex: 1; }

/* ====== Responsive ====== */
@media (max-width: 768px) {
    html { scroll-behavior: auto; }
    .nav-cta { display: none; }
    .nav-menu-btn { display: block; }
    .nav-links {
        display: none; flex-direction: column; position: absolute;
        top: 100%; left: 0; right: 0;
        background: rgba(255,255,255,.97); backdrop-filter: blur(16px);
        padding: 12px 24px 20px; gap: 0;
        box-shadow: 0 8px 24px rgba(0,0,0,.08);
        border-top: 1px solid var(--t08);
    }
    .nav-links.is-open { display: flex; }
    .nav-links a {
        padding: 14px 0; border-bottom: 1px solid var(--t08);
        font-size: 15px; color: var(--t70);
    }
    .nav-links a:last-child { border-bottom: none; }
    .nav-links .nav-app-link {
        display: block; color: #fff; font-weight: 600; font-size: 14px;
        background: var(--accent); border-radius: 8px; text-align: center;
        padding: 12px 0; margin-top: 8px; border-bottom: none;
        transition: background .2s;
    }
    .nav-links .nav-app-link:hover { background: var(--accent-light); color: #fff; }
    .section { padding: 80px 0; }
    main .section {
        content-visibility: auto;
        contain-intrinsic-size: auto 720px;
    }
    .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
    .footer-brand { flex-wrap: wrap; justify-content: center; }
    .footer-promise { margin-left: 0; padding-left: 0; border-left: none; width: 100%; }
    .footer-links { justify-content: center; }
    .form-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
