/* bada.news - Maritime News Broadsheet */
/* Palette: #f5f0e8, #1a1a1a, #0d0d0d, #1b3a5c, #c8c0b0, #c41e3a, #8b7355 */
/* Fonts: Playfair Display, Noto Serif, Lora, Oswald */

:root {
    --newsprint: #f5f0e8;
    --ink: #1a1a1a;
    --headline: #0d0d0d;
    --navy: #1b3a5c;
    --rule: #c8c0b0;
    --red: #c41e3a;
    --sepia: #8b7355;
}

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

body {
    background-color: var(--newsprint);
    color: var(--ink);
    font-family: 'Lora', serif;
    font-weight: 400;
    line-height: 1.55;
    font-size: 15px;
    overflow-x: hidden;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes ruleDrawLeft {
    from { transform: scaleX(0); transform-origin: right center; }
    to   { transform: scaleX(1); transform-origin: right center; }
}

@keyframes ruleDrawRight {
    from { transform: scaleX(0); transform-origin: left center; }
    to   { transform: scaleX(1); transform-origin: left center; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes compassSpin {
    0%   { transform: rotate(0deg); }
    70%  { transform: rotate(380deg); }
    85%  { transform: rotate(355deg); }
    100% { transform: rotate(360deg); }
}

@keyframes breakingPulse {
    0%   { background-color: var(--red); box-shadow: 0 0 0 0 rgba(196, 30, 58, 0.5); }
    50%  { background-color: #e02040; box-shadow: 0 0 8px 2px rgba(196, 30, 58, 0.3); }
    100% { background-color: var(--red); box-shadow: 0 0 0 0 rgba(196, 30, 58, 0); }
}

@keyframes waveDrift {
    0%   { transform: translateX(0); }
    50%  { transform: translateX(-8px); }
    100% { transform: translateX(0); }
}

@keyframes shipBob {
    0%   { transform: translateY(0) rotate(0deg); }
    25%  { transform: translateY(-2px) rotate(1deg); }
    50%  { transform: translateY(0) rotate(0deg); }
    75%  { transform: translateY(1px) rotate(-0.5deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

@keyframes sectionReveal {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   MASTHEAD
   ============================================ */

.masthead {
    text-align: center;
    padding: 1.2rem 2rem 1rem;
    background: var(--navy);
    color: var(--newsprint);
    position: relative;
}

.mh-rule {
    height: 1px;
    background: rgba(245, 240, 232, 0.3);
    margin: 0.5rem 0;
}

.mh-rule-top {
    margin-bottom: 0.75rem;
    animation: ruleDrawRight 0.8s ease-out forwards;
}

.mh-rule-bottom {
    margin-top: 0.75rem;
    animation: ruleDrawLeft 0.8s ease-out 0.2s both;
}

.mh-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    animation: fadeIn 1s ease-out 0.3s both;
}

.mh-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    color: var(--newsprint);
    letter-spacing: 0.02em;
    animation: fadeInUp 0.9s ease-out 0.5s both;
}

.mh-title-sm {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--navy);
    text-align: center;
    letter-spacing: 0.02em;
}

.compass-rose {
    animation: compassSpin 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s both;
}

.mh-info-left,
.mh-info-right {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(245, 240, 232, 0.6);
    animation: fadeIn 1s ease-out 0.8s both;
}

.mh-motto {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(245, 240, 232, 0.4);
    margin-top: 0.5rem;
    animation: fadeIn 1s ease-out 1s both;
}

/* ============================================
   PAPER SECTIONS
   ============================================ */

.paper-section {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem;
    opacity: 0;
    transform: translateY(20px);
}

.paper-section.visible {
    animation: sectionReveal 0.8s ease-out forwards;
}

/* ============================================
   NEWS GRID
   ============================================ */

.news-grid {
    display: grid;
    gap: 0;
}

.grid-fold {
    grid-template-columns: repeat(3, 1fr);
}

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

.grid-2 {
    grid-template-columns: 2fr 1fr;
    gap: 0;
}

/* ============================================
   STORIES
   ============================================ */

.story {
    padding: 1rem 1.25rem;
    border-left: 1px solid var(--rule);
    transition: background-color 0.3s ease;
}

.story:first-child {
    border-left: none;
}

.story:hover {
    background-color: rgba(200, 192, 176, 0.1);
}

.story-lead {
    grid-column: 1 / -1;
    border-left: none;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 1.5rem;
    margin-bottom: 0.5rem;
}

.lead-columns {
    column-count: 2;
    column-gap: 24px;
    column-rule: 1px solid var(--rule);
}

/* ============================================
   CATEGORIES
   ============================================ */

.category {
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: inline-block;
    padding: 0.15rem 0.5rem;
    margin-bottom: 0.5rem;
    transition: opacity 0.3s ease;
}

.cat-breaking {
    background: var(--red);
    color: #fff;
    animation: breakingPulse 0.8s ease-in-out 1.2s 1;
}

.cat-maritime {
    background: var(--navy);
    color: #fff;
}

.cat-weather {
    color: var(--navy);
    border: 1px solid var(--navy);
}

.cat-dispatch {
    color: var(--sepia);
    border: 1px solid var(--sepia);
}

.cat-opinion {
    color: var(--red);
    border: 1px solid var(--red);
}

/* ============================================
   HEADLINES
   ============================================ */

.headline {
    font-family: 'Noto Serif', serif;
    color: var(--headline);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.hl-lead {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.15;
    color: var(--headline);
}

.hl-secondary {
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.3;
}

.hl-tertiary {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
}

.hl-feature {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--headline);
}

/* ============================================
   BYLINE & BODY
   ============================================ */

.byline {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sepia);
    margin-bottom: 0.75rem;
}

.body-text {
    font-family: 'Lora', serif;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--ink);
    margin-bottom: 0.75rem;
}

.body-text em {
    font-style: italic;
}

.continued {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 0.7rem;
    color: var(--sepia);
    text-align: right;
    margin-top: 0.5rem;
    transition: color 0.3s ease;
}

.continued:hover {
    color: var(--navy);
}

/* ============================================
   DROP CAP
   ============================================ */

.drop-cap-text::first-letter {
    float: left;
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 4em;
    line-height: 0.8;
    margin-right: 0.08em;
    color: var(--navy);
}

/* ============================================
   PULL QUOTE
   ============================================ */

.story-pullquote {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pullquote {
    border-top: 2px solid var(--navy);
    border-bottom: 1px solid var(--rule);
    padding: 1.25rem 0;
    margin-bottom: 0.5rem;
}

.pullquote p {
    font-family: 'Noto Serif', serif;
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--headline);
}

.pq-attr {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 0.7rem;
    color: var(--sepia);
    letter-spacing: 0.05em;
}

/* ============================================
   WAVE RULES
   ============================================ */

.wave-rule {
    max-width: 960px;
    margin: 0.5rem auto;
    padding: 0 2rem;
}

.wave-rule svg path {
    animation: waveDrift 6s ease-in-out infinite;
}

.wave-rule-inner {
    padding: 0;
    margin: 1rem 0;
}

/* ============================================
   WEATHER TABLE
   ============================================ */

.weather-table {
    padding: 1rem 1.25rem;
    border-left: 1px solid var(--rule);
}

.wt-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--navy);
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--navy);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wt-icon {
    flex-shrink: 0;
}

.wt-grid {
    display: flex;
    flex-direction: column;
}

.wt-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px dotted var(--rule);
    font-size: 0.8rem;
    transition: background-color 0.2s ease;
}

.wt-row:hover {
    background-color: rgba(27, 58, 92, 0.04);
}

.wt-label {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--sepia);
    letter-spacing: 0.05em;
}

.wt-val {
    font-family: 'Lora', serif;
    font-size: 0.8rem;
    color: var(--ink);
    font-weight: 500;
}

.wt-notice {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rule);
    margin-top: 0.75rem;
    text-align: center;
}

/* ============================================
   FEATURES
   ============================================ */

.story-feature {
    border-left: none;
}

/* ============================================
   CLOSING / FOOTER
   ============================================ */

.closing {
    text-align: center;
    padding: 3rem 2rem 4rem;
}

.ship-silhouette {
    margin: 1.5rem auto;
    opacity: 0.5;
    animation: shipBob 5s ease-in-out infinite;
}

.pub-notice {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--sepia);
}

.pub-notice-copy {
    margin-top: 0.4rem;
    color: var(--rule);
}

/* ============================================
   DIAMOND ORNAMENTS ON COLUMN RULES
   ============================================ */

.grid-3 .story:not(:first-child)::before,
.grid-fold .story:not(.story-lead):not(:nth-child(2))::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: var(--rule);
    transform: rotate(45deg);
    position: absolute;
    top: -3px;
    left: -4px;
}

.grid-3 .story,
.grid-fold .story:not(.story-lead) {
    position: relative;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .grid-fold {
        grid-template-columns: 1fr;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .lead-columns {
        column-count: 1;
    }

    .story {
        border-left: none;
        border-bottom: 1px solid var(--rule);
    }

    .weather-table {
        border-left: none;
        border-top: 1px solid var(--rule);
    }

    .mh-content {
        flex-wrap: wrap;
    }

    .compass-rose {
        display: none;
    }

    .paper-section {
        padding: 1.5rem 1rem;
    }

    .mh-info-left,
    .mh-info-right {
        display: none;
    }
}

@media (max-width: 480px) {
    .mh-title {
        font-size: 2rem;
    }

    .hl-lead {
        font-size: 1.4rem;
    }

    .hl-feature {
        font-size: 1.4rem;
    }
}
