@import './fonts/fonts.css';

/* ── Design Tokens ──────────────────────────────────────────────── */
:root {
    --at-orange:      #ff5300;
    --at-orange-dk:   #d94600;
    --at-black:       #111111;
    --at-dark:        #1c1c1c;
    --at-gray:        #4f4f4f;
    --at-mid:         #8a8a8a;
    --at-muted:       #b0aea9;
    --at-bg:          #f7f6f4;
    --at-white:       #ffffff;
    --at-border:      #e4e2dc;
    --at-card-shadow: 0 2px 12px rgba(0,0,0,.08);
    --at-radius:      4px;
    --at-font-d:      'Bebas Neue', 'Arial Black', sans-serif;
    --at-font-b:      'Outfit', 'Helvetica Neue', Arial, sans-serif;
    --at-nav-h:       78px;
    --at-trans:       .18s ease;
}

/* ── Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--at-font-b);
    font-size: 15px;
    line-height: 1.65;
    color: var(--at-dark);
    background: var(--at-bg);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

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

h1, h2, h3, h4, h5 {
    font-family: var(--at-font-b);
    font-weight: 700;
    line-height: 1.25;
    margin-top: 0;
}

/* ── Site Wrapper ───────────────────────────────────────────────── */
.at-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.at-main { flex: 1; padding-bottom: 60px; }

/* ── Header / Nav ───────────────────────────────────────────────── */
.at-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--at-white);
    height: var(--at-nav-h);
    display: flex;
    align-items: center;
    border-bottom: 3px solid var(--at-orange);
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}

.at-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
}

.at-logo-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    line-height: 1;
}

.at-logo { height: 58px; width: auto; }

.at-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 2px;
}

.at-nav-links a {
    font-family: var(--at-font-b);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--at-dark);
    padding: 7px 13px;
    border-radius: var(--at-radius);
    transition: color var(--at-trans), background var(--at-trans);
    display: block;
    white-space: nowrap;
}

.at-nav-links a:hover {
    color: var(--at-orange);
    background: rgba(255,83,0,.06);
}

.at-nav-links a.active { color: var(--at-orange); }

.at-nav-links .at-nav-nl a {
    background: var(--at-orange);
    color: var(--at-white);
    font-weight: 600;
    padding: 7px 16px;
    margin-left: 6px;
}

.at-nav-links .at-nav-nl a:hover,
.at-nav-links .at-nav-nl a.active {
    background: var(--at-orange-dk);
    color: var(--at-white);
}

/* hamburger */
.at-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 6px;
    background: none;
    border: 1px solid var(--at-border);
    border-radius: var(--at-radius);
    cursor: pointer;
    flex-shrink: 0;
}

.at-hamburger span {
    display: block;
    height: 2px;
    background: var(--at-dark);
    border-radius: 2px;
    transition: all var(--at-trans);
    transform-origin: center;
}

.at-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.at-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.at-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Breadcrumb ─────────────────────────────────────────────────── */
.at-breadcrumb-bar {
    background: var(--at-white);
    border-bottom: 1px solid var(--at-border);
    padding: 6px 0;
}

.at-breadcrumb-bar .breadcrumb {
    margin-bottom: 0;
    font-size: 12px;
    color: var(--at-mid);
}

.at-breadcrumb-bar .breadcrumb-item a {
    color: var(--at-mid);
    transition: color var(--at-trans);
}

.at-breadcrumb-bar .breadcrumb-item a:hover { color: var(--at-orange); }

.at-breadcrumb-bar .breadcrumb-item.active { color: var(--at-gray); }

.at-breadcrumb-bar .breadcrumb-item + .breadcrumb-item::before { color: var(--at-muted); }

/* ── Home Hero ──────────────────────────────────────────────────── */
.at-hero {
    background: var(--at-black);
    color: var(--at-white);
    padding: 52px 0 48px;
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
}

.at-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        rgba(255,83,0,.035) 0,
        rgba(255,83,0,.035) 1px,
        transparent 1px,
        transparent 80px
    );
    pointer-events: none;
}

.at-hero-title {
    font-family: var(--at-font-d);
    font-size: clamp(52px, 7vw, 92px);
    letter-spacing: .01em;
    line-height: 1;
    margin-bottom: 14px;
    color: var(--at-white);
}

.at-hero-title em {
    color: var(--at-orange);
    font-style: normal;
}

.at-hero-body {
    font-size: 16px;
    font-weight: 400;
    color: #9a9896;
    max-width: 540px;
    line-height: 1.65;
    margin-bottom: 0;
}

/* ── Category section header ────────────────────────────────────── */
.at-section { margin-bottom: 56px; }

.at-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--at-border);
    position: relative;
}

.at-section-head::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 44px;
    height: 2px;
    background: var(--at-orange);
}

.at-section-head h2 {
    font-family: var(--at-font-d);
    font-size: 28px;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 0;
    color: var(--at-dark);
}

.at-section-all {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--at-orange);
    white-space: nowrap;
    transition: color var(--at-trans);
}

.at-section-all:hover { color: var(--at-orange-dk); }

/* ── Cards ──────────────────────────────────────────────────────── */
.at-card {
    background: var(--at-white);
    border-radius: var(--at-radius);
    box-shadow: var(--at-card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow var(--at-trans), transform var(--at-trans);
}

.at-card:hover {
    box-shadow: 0 6px 28px rgba(0,0,0,.13);
    transform: translateY(-2px);
}

.at-card > a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

/* CLS-safe: reserve image space before image loads */
.at-card-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--at-border);
}

.at-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
    display: block;
}

.at-card:hover .at-card-img img { transform: scale(1.04); }

.at-card-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.at-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--at-orange);
    border: 1px solid rgba(255,83,0,.28);
    padding: 2px 8px;
    border-radius: 2px;
    margin-bottom: 8px;
}

.at-card-date {
    font-size: 11px;
    color: var(--at-muted);
    margin-bottom: 6px;
}

.at-card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--at-dark);
}

.at-card-excerpt {
    font-size: 13px;
    color: var(--at-gray);
    line-height: 1.55;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Featured card (hero variant) ───────────────────────────────── */
.at-card--featured {
    flex-direction: row;
    height: auto;
    margin-bottom: 16px;
}

.at-card--featured > a {
    flex-direction: row;
}

.at-card--featured .at-card-img {
    width: 55%;
    aspect-ratio: 16 / 10;
    flex-shrink: 0;
}

.at-card--featured .at-card-body {
    padding: 28px 32px;
    justify-content: center;
}

.at-card--featured .at-badge { margin-bottom: 12px; }

.at-card--featured .at-card-title {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.at-card--featured .at-card-excerpt {
    font-size: 14px;
    -webkit-line-clamp: 4;
}

/* ── Article grid ───────────────────────────────────────────────── */
.at-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* ── Article page ───────────────────────────────────────────────── */
.at-article-wrap { padding-top: 32px; }

.at-article-wrap h1 {
    font-family: var(--at-font-d);
    font-size: clamp(32px, 4.5vw, 54px);
    letter-spacing: .02em;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 22px;
    color: var(--at-dark);
}

/* CLS-safe hero image */
.at-article-hero {
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    border-radius: var(--at-radius);
    margin-bottom: 10px;
    background: var(--at-border);
}

.at-article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.at-article-date {
    font-size: 12px;
    color: var(--at-muted);
    margin-bottom: 28px;
}

.at-article-content {
    font-size: 16px;
    line-height: 1.78;
    color: var(--at-dark);
}

.at-article-content h2 {
    font-family: var(--at-font-d);
    font-size: 26px;
    letter-spacing: .03em;
    text-transform: uppercase;
    margin-top: 40px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--at-border);
}

.at-article-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 10px;
}

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

.at-article-content a {
    color: var(--at-orange);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.at-article-content img {
    border-radius: var(--at-radius);
    margin: 24px 0;
}

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

.at-article-content li { margin-bottom: 6px; }

.at-related {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 2px solid var(--at-border);
    grid-column: 1 / -1;
}

.at-related-title {
    font-family: var(--at-font-d);
    font-size: 24px;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--at-border);
    position: relative;
}

.at-related-title::before {
    content: '';
    position: absolute;
    left: 0; bottom: -2px;
    width: 44px; height: 2px;
    background: var(--at-orange);
}

/* ── Category page ──────────────────────────────────────────────── */
.at-cat-intro { padding: 32px 0 24px; }

.at-cat-intro h1 {
    font-family: var(--at-font-d);
    font-size: clamp(36px, 5.5vw, 62px);
    letter-spacing: .03em;
    text-transform: uppercase;
    line-height: 1.05;
    margin-bottom: 10px;
}

.at-cat-intro p {
    font-size: 15px;
    color: var(--at-gray);
    max-width: 600px;
    margin-bottom: 0;
}

/* ── Sidebar ────────────────────────────────────────────────────── */
.at-sidebar { padding-left: 12px; }

.at-newsletter-box {
    background: var(--at-black);
    color: var(--at-white);
    border-radius: var(--at-radius);
    padding: 28px 22px;
    margin-bottom: 20px;
    border-top: 3px solid var(--at-orange);
}

.at-nl-label {
    display: block;
    font-family: var(--at-font-d);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--at-orange);
    margin-bottom: 6px;
}

.at-newsletter-box h3 {
    font-family: var(--at-font-d);
    font-size: 26px;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--at-white);
    line-height: 1.1;
    margin-bottom: 10px;
}

.at-newsletter-box p {
    font-size: 13px;
    color: #8a8886;
    line-height: 1.5;
    margin-bottom: 18px;
}

.at-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--at-radius);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    cursor: pointer;
    transition: background var(--at-trans), transform var(--at-trans);
}

.at-btn--primary {
    background: var(--at-orange);
    color: var(--at-white);
    width: 100%;
    text-align: center;
    display: block;
}

.at-btn--primary:hover {
    background: var(--at-orange-dk);
    color: var(--at-white);
    transform: translateY(-1px);
}

.at-sidebar-cats {
    background: var(--at-white);
    border-radius: var(--at-radius);
    box-shadow: var(--at-card-shadow);
    overflow: hidden;
}

.at-sidebar-cats-title {
    font-family: var(--at-font-d);
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--at-mid);
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--at-border);
    margin: 0;
}

.at-sidebar-cats ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.at-sidebar-cats li a {
    display: block;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--at-dark);
    transition: background var(--at-trans), color var(--at-trans);
    border-left: 3px solid transparent;
}

.at-sidebar-cats li a:hover,
.at-sidebar-cats li a.active {
    background: var(--at-bg);
    color: var(--at-orange);
    border-left-color: var(--at-orange);
}

/* ── Pagination ─────────────────────────────────────────────────── */
.at-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--at-border);
}

.at-pagination a,
.at-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--at-radius);
    border: 1px solid var(--at-border);
    color: var(--at-dark);
    background: var(--at-white);
    transition: all var(--at-trans);
}

.at-pagination a:hover {
    border-color: var(--at-orange);
    color: var(--at-orange);
}

.at-pg-active {
    background: var(--at-orange) !important;
    border-color: var(--at-orange) !important;
    color: var(--at-white) !important;
    font-weight: 600 !important;
}

.at-pg-disabled { opacity: .35; pointer-events: none; cursor: default; }

.at-pg-ellipsis { border-color: transparent !important; background: transparent !important; pointer-events: none; }

/* ── Footer ─────────────────────────────────────────────────────── */
.at-footer {
    background: var(--at-black);
    border-top: 3px solid var(--at-orange);
    padding: 26px 0;
    margin-top: auto;
}

.at-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.at-footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.at-footer-logo img {
    height: 28px;
    width: auto;
    opacity: .65;
    transition: opacity var(--at-trans);
}

.at-footer-logo:hover img { opacity: 1; }

.at-footer-copy {
    font-size: 12px;
    color: #585654;
    margin: 0;
}

.footer-nav { display: flex; gap: 2px; flex-wrap: wrap; }

.footer-nav a {
    font-size: 12px;
    font-weight: 500;
    color: #6c6a68;
    padding: 4px 10px;
    border-radius: var(--at-radius);
    transition: color var(--at-trans);
}

.footer-nav a:hover { color: var(--at-orange); }

/* ── Page (Impressum, Datenschutz, etc.) ────────────────────────── */
.at-page-wrap { padding: 36px 0; }

.at-page-wrap h1 {
    font-family: var(--at-font-d);
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: .03em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.at-page-wrap h2 {
    font-family: var(--at-font-d);
    font-size: 22px;
    letter-spacing: .03em;
    text-transform: uppercase;
    margin-top: 32px;
    margin-bottom: 10px;
}

.at-page-wrap p,
.at-page-wrap li { font-size: 15px; line-height: 1.7; }

.at-page-wrap a {
    color: var(--at-orange);
    text-underline-offset: 3px;
}

/* ── Newsletter confirmation ────────────────────────────────────── */
.at-confirm-wrap {
    padding: 64px 0 80px;
    text-align: center;
}

.at-confirm-icon {
    width: 64px;
    height: 64px;
    background: var(--at-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
}

.at-confirm-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.at-confirm-wrap h1 {
    font-family: var(--at-font-d);
    font-size: clamp(32px, 5vw, 52px);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.at-confirm-wrap p {
    font-size: 15px;
    color: var(--at-gray);
    max-width: 500px;
    margin: 0 auto 10px;
    line-height: 1.65;
}

.at-confirm-wrap .at-btn {
    margin-top: 28px;
    display: inline-block;
    width: auto;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1199px) {
    .at-nav-links a { font-size: 12px; padding: 7px 10px; }
}

@media (max-width: 991px) {
    .at-hamburger { display: flex; }

    .at-header-inner { position: relative; }

    .at-nav-links {
        display: none;
        position: absolute;
        top: var(--at-nav-h);
        left: 0;
        right: 0;
        background: var(--at-white);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px;
        border-bottom: 2px solid var(--at-orange);
        box-shadow: 0 6px 16px rgba(0,0,0,.1);
        z-index: 199;
    }

    .at-nav-links.is-open { display: flex; }

    .at-nav-links a { padding: 12px 14px; font-size: 14px; color: var(--at-dark); }
    .at-nav-links .at-nav-nl { margin-top: 4px; }
    .at-nav-links .at-nav-nl a { margin-left: 0; }

    .at-card--featured { flex-direction: column; }
    .at-card--featured > a { flex-direction: column; }
    .at-card--featured .at-card-img { width: 100%; }
    .at-card--featured .at-card-body { padding: 20px; }

    .at-grid { grid-template-columns: repeat(2, 1fr); }

    .at-sidebar { padding-left: 0; margin-top: 40px; }

    .at-article-hero { aspect-ratio: 16 / 9; }
}

@media (max-width: 575px) {
    .at-hero { padding: 36px 0 32px; }
    .at-grid { grid-template-columns: 1fr; }
    .at-footer-inner { flex-direction: column; align-items: flex-start; }
    .at-card--featured .at-card-title { font-size: 17px; }
}
