@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap');

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

:root {
    --canvas: #f7f7f4;
    --canvas-soft: #fafaf7;
    --surface-card: #ffffff;
    --surface-strong: #e6e5e0;
    --primary: #f54e00;
    --primary-active: #d04200;
    --ink: #26251e;
    --body: #5a5852;
    --body-strong: #26251e;
    --muted: #807d72;
    --muted-soft: #a09c92;
    --on-primary: #ffffff;
    --hairline: #e6e5e0;
    --hairline-soft: #efeee8;
    --hairline-strong: #cfcdc4;
    --success: #1f8a65;
    --error: #cf2d56;
    --rounded-xs: 4px;
    --rounded-sm: 6px;
    --rounded-md: 8px;
    --rounded-lg: 12px;
    --rounded-xl: 16px;
    --rounded-pill: 9999px;
}

html {
    font-family: 'Inter', system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: var(--body);
    background-color: var(--canvas);
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--canvas);
    color: var(--body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--ink);
    text-decoration: none;
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    color: var(--ink);
    font-weight: 400;
    line-height: 1.2;
}

h1 { font-size: 72px; letter-spacing: -2.16px; }
h2 { font-size: 36px; letter-spacing: -0.72px; }
h3 { font-size: 26px; letter-spacing: -0.325px; }
h4 { font-size: 22px; letter-spacing: -0.11px; }

.title-md { font-size: 18px; font-weight: 600; letter-spacing: 0; line-height: 1.4; }
.title-sm { font-size: 16px; font-weight: 600; letter-spacing: 0; line-height: 1.4; }
.body-md { font-size: 16px; font-weight: 400; line-height: 1.5; }
.body-sm { font-size: 14px; font-weight: 400; line-height: 1.5; }
.caption { font-size: 13px; font-weight: 400; line-height: 1.4; color: var(--muted); }
.caption-upper { font-size: 11px; font-weight: 600; line-height: 1.4; letter-spacing: 0.88px; text-transform: uppercase; }
.code { font-family: 'JetBrains Mono', monospace; font-size: 13px; }

p { font-size: 16px; line-height: 1.5; color: var(--body); margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }

/* ===== TOP NAV ===== */
.top-nav {
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    height: 64px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.nav-logo {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.3px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-logo span.accent {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--body);
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--ink);
}

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: all 0.2s;
}

.nav-mobile {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    padding: 16px 24px;
    z-index: 99;
}

.nav-mobile.open {
    display: block;
}

.nav-mobile ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-mobile ul a {
    display: block;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--body);
    border-bottom: 1px solid var(--hairline-soft);
}

/* ===== HERO ===== */
.hero-band {
    background: var(--canvas);
    padding: 80px 0;
    text-align: center;
}

.hero-band h1 {
    max-width: 800px;
    margin: 0 auto 20px;
}

.hero-band .hero-sub {
    font-size: 18px;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.5;
}

.hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface-strong);
    padding: 4px 12px;
    border-radius: var(--rounded-pill);
    margin-bottom: 24px;
}

/* ===== BADGE PILL ===== */
.badge-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--surface-strong);
    padding: 4px 10px;
    border-radius: var(--rounded-pill);
}

/* ===== SECTION ===== */
.section {
    padding: 80px 0;
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.section-title {
    font-size: 36px;
    font-weight: 400;
    letter-spacing: -0.72px;
    color: var(--ink);
    margin-bottom: 16px;
}

.section-sub {
    font-size: 16px;
    color: var(--muted);
    max-width: 560px;
    line-height: 1.5;
    margin-bottom: 48px;
}

.divider {
    border: none;
    border-top: 1px solid var(--hairline);
    margin: 0;
}

/* ===== CARDS ===== */
.feature-card {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    padding: 24px;
}

.feature-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
    letter-spacing: 0;
    line-height: 1.4;
}

.feature-card p {
    font-size: 14px;
    color: var(--body);
    line-height: 1.5;
    margin-bottom: 0;
}

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

.card-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ===== ARTICLE CARDS ===== */
.article-card {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s;
}

.article-card:hover {
    border-color: var(--hairline-strong);
}

.article-card-img {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--canvas-soft);
}

.article-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card-body {
    padding: 20px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.article-card-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0;
    line-height: 1.4;
    margin-bottom: 8px;
}

.article-card-body p {
    font-size: 14px;
    color: var(--body);
    flex: 1;
    margin-bottom: 16px;
}

.read-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.read-link:hover {
    color: var(--primary-active);
}

/* ===== ARTICLE CONTENT ===== */
.article-content {
    max-width: 720px;
    margin: 0 auto;
}

.article-content h2 {
    font-size: 26px;
    letter-spacing: -0.325px;
    margin: 40px 0 16px;
}

.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0;
    margin: 32px 0 12px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
    padding-left: 24px;
    margin-bottom: 20px;
}

.article-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.article-content .article-img {
    border-radius: var(--rounded-lg);
    overflow: hidden;
    margin: 32px 0;
    border: 1px solid var(--hairline);
}

.article-content .article-img img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.article-content .article-img figcaption {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--muted);
    background: var(--canvas-soft);
}

.info-box {
    background: var(--canvas-soft);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    padding: 20px 24px;
    margin: 24px 0;
}

.info-box .title-sm {
    color: var(--ink);
    margin-bottom: 8px;
    display: block;
}

.info-box p {
    margin-bottom: 0;
    font-size: 14px;
}

.article-header {
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 48px;
}

.article-header .badge-pill {
    margin-bottom: 16px;
}

.article-header h1 {
    font-size: 42px;
    letter-spacing: -1.2px;
    max-width: 680px;
    margin-bottom: 16px;
}

.article-header .article-meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--muted);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    padding: 16px 0;
}

.breadcrumb a {
    color: var(--muted);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .sep {
    color: var(--hairline-strong);
}

/* ===== CONTACT FORM ===== */
.contact-section {
    background: var(--canvas-soft);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    padding: 80px 0;
}

.contact-form {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    padding: 40px;
    max-width: 560px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--surface-card);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--rounded-md);
    padding: 12px 16px;
    height: 44px;
    font-size: 14px;
    color: var(--ink);
    font-family: inherit;
    transition: border-color 0.15s;
    outline: none;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--ink);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--muted-soft);
}

.btn-primary {
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    border-radius: var(--rounded-md);
    padding: 10px 18px;
    height: 40px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
    font-family: inherit;
}

.btn-primary:hover {
    background: var(--primary-active);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-success {
    display: none;
    background: var(--canvas-soft);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-md);
    padding: 16px;
    font-size: 14px;
    color: var(--success);
    margin-top: 16px;
}

.form-success.visible {
    display: block;
}

/* ===== EXTERNAL LINK ===== */
.ext-link {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ext-link:hover {
    color: var(--primary-active);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--canvas);
    border-top: 1px solid var(--hairline);
    padding: 64px 0 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 48px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin-top: 12px;
}

.footer-col h5 {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col ul a {
    font-size: 14px;
    color: var(--body);
    text-decoration: none;
}

.footer-col ul a:hover {
    color: var(--ink);
}

.footer-bottom {
    border-top: 1px solid var(--hairline);
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--muted);
}

.footer-bottom a {
    color: var(--muted);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--ink);
}

/* ===== COOKIE BANNER ===== */
#cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--ink);
    color: var(--canvas);
    padding: 16px 24px;
    z-index: 200;
    border-top: 1px solid rgba(255,255,255,0.1);
}

#cookie-banner.visible {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

#cookie-banner p {
    font-size: 14px;
    color: var(--canvas);
    margin: 0;
    flex: 1;
}

#cookie-banner a {
    color: #aaa9a3;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 8px;
}

.btn-cookie-accept {
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    border-radius: var(--rounded-md);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

.btn-cookie-reject {
    background: transparent;
    color: var(--canvas);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--rounded-md);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

/* ===== PAGE CONTENT ===== */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 0 80px;
}

.page-content h1 {
    font-size: 42px;
    letter-spacing: -1.2px;
    margin-bottom: 8px;
}

.page-content .page-updated {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 40px;
}

.page-content h2 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.11px;
    margin: 36px 0 12px;
}

.page-content p {
    margin-bottom: 16px;
    color: var(--body);
}

.page-content ul {
    padding-left: 24px;
    margin-bottom: 16px;
}

.page-content li {
    margin-bottom: 6px;
    line-height: 1.6;
    color: var(--body);
}

/* ===== ABOUT ===== */
.about-hero {
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 48px;
}

.about-hero h1 {
    font-size: 42px;
    letter-spacing: -1.2px;
    margin-bottom: 16px;
}

/* ===== DISCLAIMER ===== */
.disclaimer-bar {
    background: var(--canvas-soft);
    border-bottom: 1px solid var(--hairline);
    padding: 10px 0;
    font-size: 12px;
    color: var(--muted);
    text-align: center;
}

/* ===== TABLE OF CONTENTS ===== */
.toc {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    padding: 20px 24px;
    margin-bottom: 32px;
}

.toc .title-sm {
    color: var(--ink);
    margin-bottom: 12px;
    display: block;
}

.toc ol {
    padding-left: 20px;
    margin: 0;
}

.toc li {
    margin-bottom: 4px;
}

.toc a {
    font-size: 14px;
    color: var(--body);
}

.toc a:hover {
    color: var(--primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    h1 { font-size: 56px; }
    .hero-band h1 { font-size: 56px; }
    .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 768px) {
    h1 { font-size: 36px; }
    .hero-band { padding: 60px 0; }
    .hero-band h1 { font-size: 36px; letter-spacing: -1px; }
    .section { padding: 60px 0; }
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .card-grid-3 { grid-template-columns: 1fr; }
    .card-grid-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .contact-form { padding: 24px; }
    .article-header h1 { font-size: 30px; }
    .page-content h1 { font-size: 32px; }
    #cookie-banner.visible { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .footer-grid { grid-template-columns: 1fr; }
}
