/* Design tokens */
:root {
    --navy: #1e3449;
    --navy-mid: #2a4a66;
    --navy-deep: #16283a;
    --orange: #e18a2a;
    --paper: #f4f1ea;
    --paper-deep: #ece7dc;
    --ink: #23262b;
    --muted: #5f6672;
    --rule: rgba(30, 52, 73, 0.16);

    --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
    --font-body: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header styling */
.header {
    background: linear-gradient(135deg, #1e3449 0%, #2a4a66 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 80px;
    width: auto;
    margin: 0;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    transition: color 0.3s var(--ease);
    position: relative;
}

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

.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--orange);
    transition: width 0.3s var(--ease);
}

.nav a:hover::after {
    width: 100%;
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 50%, var(--navy) 100%);
    color: white;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    min-height: min(82vh, 760px);
    padding: 160px 0 clamp(56px, 8vh, 96px);
}

/* Hero background video */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

/* Directional tint: dense behind the type, open on the right so the footage reads */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(22, 40, 58, 0.6) 0%, rgba(22, 40, 58, 0) 26%),
        linear-gradient(90deg, rgba(22, 40, 58, 0.9) 0%, rgba(22, 40, 58, 0.66) 45%, rgba(22, 40, 58, 0.22) 100%);
}

.hero-section .container {
    position: relative;
    z-index: 3;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 60ch;
}

/* Eyebrow above the headline */
.hero-kicker {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 28px;
}

.hero-kicker::after {
    content: '';
    flex: 0 0 72px;
    height: 1px;
    background: rgba(225, 138, 42, 0.5);
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.75rem, 7.4vw, 5.5rem);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -0.022em;
    margin-bottom: 24px;
    text-wrap: balance;
}

.hero-subtitle {
    font-size: clamp(1.02rem, 1.5vw, 1.25rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
    max-width: 44ch;
    margin-bottom: 44px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: var(--orange);
    color: var(--navy-deep);
    padding: 17px 30px;
    text-decoration: none;
    border-radius: 2px;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.cta-button:hover {
    background: #fff;
}

/* Fall back to the poster frame when motion is not wanted */
@media (prefers-reduced-motion: reduce) {
    .hero-video {
        display: none;
    }

    .hero-section {
        background-image: url('hero-poster.jpg');
        background-size: cover;
        background-position: center;
    }

    .cta-button {
        transition: none;
    }
}

/* Main section styling */
.main-section {
    padding: clamp(64px, 9vw, 120px) 0 clamp(56px, 7vw, 96px);
    background: var(--paper);
}

/* Editorial section label */
.section-label {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin-bottom: clamp(28px, 4vw, 48px);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--navy);
}

.section-label .rule {
    flex: 1;
    height: 1px;
    background: var(--rule);
}

.section-label .count {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.9rem);
    font-weight: 500;
    letter-spacing: -0.015em;
    color: var(--navy);
    margin-bottom: 14px;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 52ch;
    margin: 0 auto;
}

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

/* Index list — the forum's entry points, read as an editorial contents page */
.index-list {
    border-bottom: 1px solid var(--rule);
}

.index-row {
    position: relative;
    display: grid;
    grid-template-columns: clamp(3rem, 6vw, 5rem) 1fr auto;
    align-items: start;
    gap: 0 clamp(1rem, 3vw, 2.5rem);
    padding: clamp(24px, 3.2vw, 38px) clamp(12px, 2vw, 24px) clamp(24px, 3.2vw, 38px) 0;
    border-top: 1px solid var(--rule);
    text-decoration: none;
    color: inherit;
    isolation: isolate;
}

/* Wash that sweeps in from the left on hover */
.index-row::before {
    content: '';
    position: absolute;
    inset: 0 0 0 -24px;
    z-index: -1;
    background: linear-gradient(90deg, rgba(30, 52, 73, 0.06), rgba(30, 52, 73, 0));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--ease);
}

.index-row:hover::before,
.index-row:focus-visible::before {
    transform: scaleX(1);
}

.index-mark {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-top: 4px;
}

.index-mark i {
    font-size: 1.15rem;
    color: var(--navy);
    opacity: 0.3;
    transition: color 0.35s var(--ease), opacity 0.35s var(--ease);
}

.index-num {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: var(--orange);
    font-variant-numeric: tabular-nums;
}

.index-title {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.1vw, 2.35rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.015em;
    color: var(--navy);
    transition: transform 0.4s var(--ease);
}

.index-desc {
    display: block;
    margin-top: 8px;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--muted);
    max-width: 54ch;
    transition: transform 0.4s var(--ease);
}

.index-arrow {
    align-self: center;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--navy);
    opacity: 0.28;
    transition: transform 0.4s var(--ease), opacity 0.35s var(--ease), color 0.35s var(--ease);
}

.index-row:hover .index-title,
.index-row:hover .index-desc,
.index-row:focus-visible .index-title,
.index-row:focus-visible .index-desc {
    transform: translateX(10px);
}

.index-row:hover .index-arrow,
.index-row:focus-visible .index-arrow {
    opacity: 1;
    color: var(--orange);
    transform: translateX(8px);
}

.index-row:hover .index-mark i,
.index-row:focus-visible .index-mark i {
    opacity: 1;
    color: var(--orange);
}

.index-row:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .index-row::before,
    .index-title,
    .index-desc,
    .index-arrow,
    .index-mark i {
        transition: none;
    }

    .index-row:hover .index-title,
    .index-row:hover .index-desc,
    .index-row:hover .index-arrow {
        transform: none;
    }
}

.box-icon {
    color: var(--navy);
}

/* Footer section styling */
.footer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding: clamp(48px, 7vw, 80px) 0 0;
    background: none;
}

/* Social icons styling */
.social-icons {
    display: flex;
    gap: 25px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--rule);
    background: none;
    color: var(--navy);
    text-decoration: none;
    font-size: 1.05rem;
    transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.social-link:hover {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.social-link.facebook:hover {
    background: linear-gradient(135deg, #1877f2, #0d5cbf);
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* Website link styling */
.website-link {
    margin-top: 15px;
}

.website-link a {
    color: var(--navy);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 15px 30px;
    border: 1px solid var(--navy);
    border-radius: 2px;
    transition: background 0.3s var(--ease), color 0.3s var(--ease);
    display: inline-block;
}

.website-link a:hover {
    background: var(--navy);
    color: #fff;
}

/* Main Footer */
.footer {
    background: var(--navy);
    color: white;
    padding: 60px 0 40px;
    margin-top: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.footer-logo-section {
    display: flex;
    align-items: flex-start;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.footer-brand h3 {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 0 5px 0;
    color: white;
}

.footer-brand p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
}

.footer-contact h4 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: white;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.contact-item i {
    color: #ff8c00;
    font-size: 1rem;
    min-width: 20px;
}

.footer-social h4 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: white;
}

.footer-social-icons {
    display: flex;
    gap: 15px;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    background-color: #e18a2a;
    color: white;
}

.footer-social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.footer-social-link.twitter:hover {
    background-color: #41474b;
}

.footer-social-link.facebook:hover {
    background-color: #1877F2;
}

.footer-social-link.youtube:hover {
    background-color: #FF0000;
}

.footer-social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.footer-social-link.linkedin:hover {
    background-color: #0077B5;
}

/* Footer credit styling */
.footer-credit {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 30px;
}

.footer-credit p {
    font-size: 0.9rem;
    color: #b0b0b0;
    margin: 0;
}

.footer-credit a {
    color: #e18a2a;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-credit a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .header {
        padding: 10px 0;
    }
    
    .header-content {
        flex-direction: row;
        gap: 15px;
        min-height: auto;
        padding: 0 15px;
    }
    
    .logo img {
        height: 60px;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 70px);
        background: linear-gradient(135deg, #1e3449 0%, #2a4a66 100%);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 0;
        transition: right 0.3s ease;
        padding: 40px 0;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        margin: 15px 0;
    }
    
    .nav a {
        font-size: 1.2rem;
        padding: 10px 20px;
        display: block;
        text-align: center;
    }
    
    .footer-section {
        padding: 40px 0 20px;
    }
    
    .social-icons {
        gap: 20px;
    }
    
    .social-link {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .website-link a {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-logo img {
        width: 60px;
        height: 60px;
    }
    
    .footer-social-icons {
        justify-content: center;
    }
    
    .footer-social-link {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 640px) {
    .nav-menu {
        width: 100%;
        right: -100%;
    }

    .hero-section {
        min-height: 68vh;
        padding-top: 120px;
    }

    .index-row {
        grid-template-columns: 1fr auto;
        gap: 0 1rem;
    }

    .index-mark {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
        padding-top: 0;
    }
    
}

@media (max-width: 480px) {
    .header {
        padding: 8px 0;
    }
    
    .header-content {
        min-height: auto;
        padding: 0 10px;
    }
    
    .logo img {
        height: 50px;
    }
    
    .nav-menu {
        top: 65px;
        height: calc(100vh - 65px);
        padding: 30px 0;
    }
    
    .nav-menu li {
        margin: 12px 0;
    }
    
    .nav a {
        font-size: 1.1rem;
        padding: 8px 15px;
    }
    
    .footer-section {
        padding: 30px 0 15px;
        gap: 20px;
    }
    
    .social-icons {
        gap: 15px;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .website-link a {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .footer {
        padding: 30px 0 15px;
    }
    
    .footer-content {
        gap: 25px;
    }
    
    .footer-logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-logo img {
        width: 50px;
        height: 50px;
    }
    
    .footer-brand {
        text-align: center;
    }
    
    .footer-brand h3 {
        font-size: 1.5rem;
    }
    
    .footer-contact h4,
    .footer-social h4 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .contact-item {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }
    
    .footer-social-icons {
        gap: 10px;
    }
    
    .footer-social-link {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .container {
        padding: 0 10px;
    }
}

/* Questionnaire page specific styles */
.questionnaire-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin: 60px 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.questionnaire-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: #fff;
    color: var(--ink);
    padding: clamp(32px, 4vw, 52px) clamp(26px, 3.5vw, 44px);
    border: 1px solid var(--rule);
    border-radius: 2px;
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: border-color 0.35s var(--ease);
}

/* Accent rail that fills down the left edge on hover */
.questionnaire-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: var(--orange);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.45s var(--ease);
}

.questionnaire-box:hover::before {
    transform: scaleY(1);
}

.questionnaire-box:hover {
    border-color: rgba(30, 52, 73, 0.35);
}

.questionnaire-box .box-icon {
    font-size: 1.35rem;
    color: var(--navy);
    opacity: 0.32;
    margin-bottom: 22px;
    transition: color 0.35s var(--ease), opacity 0.35s var(--ease);
}

.questionnaire-box:hover .box-icon {
    color: var(--orange);
    opacity: 1;
}

.questionnaire-box h3 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.015em;
    margin-bottom: 14px;
    color: var(--navy);
}

.questionnaire-box p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--muted);
    margin-bottom: 30px;
    max-width: 46ch;
}

.questionnaire-button {
    margin-top: auto;
    background: var(--navy);
    color: white;
    border: none;
    padding: 16px 28px;
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    justify-content: center;
}

.questionnaire-button:hover {
    background: var(--orange);
    color: var(--navy-deep);
}

.questionnaire-button i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.questionnaire-button:hover i {
    transform: translateX(3px);
}

/* Three-option variant (Interpretation page) */
.questionnaire-grid--three {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
}

.questionnaire-button.is-disabled {
    background: var(--rule);
    color: var(--muted);
    cursor: default;
    pointer-events: none;
}

.back-to-home {
    text-align: center;
    margin: 60px 0 40px 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--navy);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 14px 26px;
    border: 1px solid var(--rule);
    border-radius: 2px;
    transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.back-link:hover {
    background: #1e3449;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 52, 73, 0.2);
}

.back-link i {
    transition: transform 0.3s ease;
}

.back-link:hover i {
    transform: translateX(-3px);
}

/* Responsive styles for questionnaire page */
@media (max-width: 768px) {
    .questionnaire-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        margin: 40px 0;
    }
    
    .questionnaire-box {
        padding: 40px 25px;
    }
    
    .questionnaire-box .box-icon {
        font-size: 3rem;
    }
    
    .questionnaire-box h3 {
        font-size: 1.5rem;
    }
    
    .questionnaire-box p {
        font-size: 1rem;
    }
    
    .questionnaire-button {
        padding: 12px 25px;
        font-size: 1rem;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .questionnaire-box {
        padding: 30px 20px;
    }
    
    .questionnaire-box .box-icon {
        font-size: 2.5rem;
    }
    
    .questionnaire-box h3 {
        font-size: 1.3rem;
    }
    
    .questionnaire-button {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-width: 160px;
    }
}
