/*
Theme Name: NORDFORM Maynooth Child
Theme URI: https://nordform.cc
Description: Custom NORDFORM Child Theme based on Maynooth design.
Author: NORDFORM
Author URI: https://nordform.cc
Template: astra
Version: 1.0.0
Text Domain: nordform-child
*/

:root {
    --nf-bg: #fbf9f7;
    --nf-surface: #ffffff;
    --nf-surface-soft: #f3f1ee;
    --nf-text: #1b1c1c;
    --nf-muted: #686764;
    --nf-primary: #9a4600;
    --nf-primary-light: #f47920;
    --nf-border: rgba(90, 70, 60, 0.16);
    --nf-max-width: 1280px;
    --nf-gutter: 28px;
}

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--nf-bg);
    color: var(--nf-text);
    font-family: "Hanken Grotesk", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    overflow-x: hidden;
}

body.admin-bar .nf-header { top: 32px; }
* { box-sizing: border-box; }
img { max-width: 100%; }
a { text-decoration: none; }

.nf-container {
    width: min(calc(100% - 80px), var(--nf-max-width));
    margin-left: auto;
    margin-right: auto;
}

/* TYPOGRAPHY */
.nf-display, .nf-hero-title {
    font-family: "Libre Caslon Text", Georgia, serif;
    font-size: 48px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nf-heading {
    font-family: "Hanken Grotesk", Arial, sans-serif;
    font-size: 32px;
    line-height: 1.3;
    font-weight: 600;
}

.nf-subheading, .nf-product-title {
    font-family: "Libre Caslon Text", Georgia, serif;
    font-size: 24px;
    line-height: 1.4;
    font-weight: 600;
}

.nf-body { font-size: 16px; line-height: 1.5; font-weight: 400; }

.nf-label, .nf-nav a, .nf-button, .nf-view-all, .nf-story-link, .nf-newsletter button {
    font-family: "Hanken Grotesk", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nf-product-category {
    font-family: "Hanken Grotesk", Arial, sans-serif;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--nf-muted);
}

.nf-hero-text {
    font-family: "Hanken Grotesk", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 400;
}

/* HEADER */
.nf-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    background: rgba(251, 249, 247, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(90, 70, 60, 0.12);
}
.nf-header-inner {
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}
.nf-logo { display: flex; align-items: center; }
.nf-logo img { height: 40px; width: auto; display: block; }
.nf-nav { display: flex; align-items: center; gap: 34px; }
.nf-nav a { color: #555350; transition: color 0.25s ease; }
.nf-nav a:hover, .nf-nav a.active { color: var(--nf-primary); }
.nf-actions { display: flex; align-items: center; gap: 14px; }
.nf-icon-btn {
    width: 38px; height: 38px;
    border: 0; background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--nf-text);
    font-size: 21px;
    transition: color 0.25s ease;
}
.nf-icon-btn:hover { color: var(--nf-primary); }
.nf-mobile-toggle { display: none; }

/* HERO */
.nf-hero {
    position: relative;
    min-height: 720px;
    height: 88vh;
    max-height: 900px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.nf-hero-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.nf-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.15) 100%);
}
.nf-hero-content {
    position: relative;
    z-index: 2;
    width: min(900px, calc(100% - 80px));
    text-align: center;
    color: white;
}
.nf-hero-title { margin: 0 0 22px; color: #ffffff; }
.nf-hero-text { max-width: 680px; margin: 0 auto 34px; color: rgba(255,255,255,0.92); }
.nf-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 30px;
    background: var(--nf-primary-light);
    color: white;
    font-family: "Hanken Grotesk", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}
.nf-button:hover { background: var(--nf-primary); color: white; transform: translateY(-2px); }

/* MAIN */
.nf-main { padding: 92px 0; }
.nf-section { margin-bottom: 80px; }
.nf-section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    margin-bottom: 38px;
}
.nf-section-header-left h2 { margin: 0 0 6px; }
.nf-section-header-left p { margin: 0; color: var(--nf-muted); }

/* SECTOR Bento */
.nf-sector-bento { display: flex; flex-direction: column; gap: var(--nf-gutter); }
.nf-bento-row--first {
    display: flex;
    gap: var(--nf-gutter);
    height: 600px;
}
.nf-sector-card--large {
    flex: 2;
    position: relative;
    overflow: hidden;
    background: #dedbd6;
}
.nf-bento-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--nf-gutter);
}
.nf-sector-card--small {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #dedbd6;
}
.nf-bento-row--second {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--nf-gutter);
}
.nf-bento-row--second .nf-sector-card--small {
    aspect-ratio: 4 / 3;
}
.nf-sector-card--large .nf-sector-image,
.nf-sector-card--small .nf-sector-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.7s ease;
}
.nf-sector-card--large:hover .nf-sector-image,
.nf-sector-card--small:hover .nf-sector-image {
    transform: scale(1.06);
}
.nf-sector-card--large .nf-sector-overlay,
.nf-sector-card--small .nf-sector-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.68), rgba(0,0,0,0.04) 65%);
}
.nf-sector-card--large .nf-sector-content,
.nf-sector-card--small .nf-sector-content {
    position: absolute;
    z-index: 2;
    left: 26px;
    right: 26px;
    bottom: 24px;
    color: white;
}
.nf-sector-card--large .nf-sector-content h3,
.nf-sector-card--small .nf-sector-content h3 {
    margin: 0 0 6px;
    font-family: "Hanken Grotesk", Arial, sans-serif;
    font-size: 24px;
    line-height: 1.4;
    font-weight: 600;
    color: white;
}
.nf-sector-card--large .nf-sector-content span,
.nf-sector-card--small .nf-sector-content span {
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    font-family: "Hanken Grotesk", Arial, sans-serif;
    color: rgba(255,255,255,0.85);
    opacity: 0;
    transform: translateY(8px);
    display: inline-block;
    transition: all 0.3s ease;
}
.nf-sector-card--large:hover .nf-sector-content span,
.nf-sector-card--small:hover .nf-sector-content span {
    opacity: 1;
    transform: translateY(0);
}

/* PRODUCTS */
.nf-products-section {
    background: var(--nf-surface-soft);
    padding: 90px 0;
}
.nf-products-header {
    max-width: 700px;
    margin: 0 auto 46px;
    text-align: center;
}
.nf-products-header h2 { margin: 0 0 15px; }
.nf-products-header p { margin: 0; color: var(--nf-muted); }
.nf-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--nf-gutter);
}
.nf-product {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.nf-product-link { display: block; overflow: hidden; }
.nf-product-image {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: white;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nf-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transform: scale(0.8);  /* 缩小到 80% */
    transition: transform 0.55s ease;
}
.nf-product-link:hover .nf-product-image img {
    transform: scale(0.85);  /* 悬停时略微放大到 85%，仍保留边距 */
}
.nf-product-link:hover .nf-product-image img {
    transform: scale(1.045);
}
}
.nf-product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.nf-product-category {
    font-family: "Hanken Grotesk", Arial, sans-serif;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--nf-muted);
}
.nf-product-title {
    font-family: "Libre Caslon Text", Georgia, serif;
    font-size: 24px;
    line-height: 1.4;
    font-weight: 600;
    margin: 0;
}
.nf-product-title a {
    color: var(--nf-text);
    transition: color 0.25s ease;
}
.nf-product-title a:hover {
    color: var(--nf-primary);
}
.nf-product-price {
    font-family: "Hanken Grotesk", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 700;
    color: var(--nf-primary);
    margin: 0;
}
.nf-products-title {
    font-family: "Hanken Grotesk", Georgia, serif;
    font-size: 36px;
    line-height: 1.2;
    font-weight: 700;
    color: #9a4600 !important;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.nf-products-description {
    font-family: "Hanken Grotesk", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 400;
    color: var(--nf-muted);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* STORY */
.nf-story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}
.nf-story-image {
    height: 650px;
    background-size: cover;
    background-position: center;
}
.nf-story-content { padding-right: 50px; }
.nf-story-label {
    display: block;
    margin-bottom: 18px;
    color: var(--nf-primary);
}
.nf-story-content h2 { margin: 0 0 25px; }
.nf-story-content p {
    color: var(--nf-muted);
    font-size: 17px;
    line-height: 1.75;
    margin-bottom: 20px;
}
.nf-story-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    color: var(--nf-text);
    border-bottom: 1px solid var(--nf-text);
    padding-bottom: 6px;
}

/* FOOTER */
.nf-footer {
    background: #f1efec;
    border-top: 1px solid var(--nf-border);
}
.nf-footer-main {
    padding: 75px 0;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1.5fr;
    gap: 60px;
}
.nf-footer-logo { margin-bottom: 18px; }
.nf-footer-logo img { height: 40px; width: auto; display: block; }
.nf-footer p { color: var(--nf-muted); line-height: 1.6; }
.nf-footer h4 {
    margin: 0 0 18px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.nf-footer ul { list-style: none; padding: 0; margin: 0; }
.nf-footer li { margin-bottom: 10px; }
.nf-footer a { color: #676562; font-size: 14px; }
.nf-footer a:hover { color: var(--nf-primary); }
.nf-newsletter { display: flex; margin-top: 20px; }
.nf-newsletter input {
    flex: 1; min-width: 0; height: 48px;
    padding: 0 15px;
    border: 1px solid var(--nf-border);
    background: white;
    outline: none;
}
.nf-newsletter button {
    border: 0; background: var(--nf-primary);
    color: white; padding: 0 20px;
}
.nf-footer-bottom {
    border-top: 1px solid var(--nf-border);
    padding: 23px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.nf-footer-bottom p { margin: 0; font-size: 13px; }

/* ASTRA OVERRIDES */
.ast-container, .site-content, .content-area, .site-main {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
#primary, #secondary { width: 100% !important; }
.entry-content { margin: 0 !important; }
.site-content { min-height: 0 !important; }
body.page-template-front-page .site-header,
body.page-template-front-page .site-footer {
    display: none !important;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .nf-nav { gap: 20px; }
    .nf-footer-main { grid-template-columns: repeat(2, 1fr); }
    .nf-story-content { padding-right: 0; }
}
@media (max-width: 800px) {
    .nf-container { width: min(calc(100% - 50px), var(--nf-max-width)); }
    .nf-header-inner { height: 70px; }
    .nf-nav {
        display: none;
        position: absolute;
        left: 0; right: 0; top: 70px;
        background: var(--nf-bg);
        border-bottom: 1px solid var(--nf-border);
        padding: 22px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }
    .nf-nav.nf-mobile-open { display: flex; }
    .nf-mobile-toggle { display: flex; }
    .nf-actions { margin-left: auto; }
    .nf-hero { min-height: 650px; height: 78vh; }
    .nf-hero-title, .nf-display { font-size: 32px; line-height: 1.2; }
    .nf-hero-text { font-size: 16px; line-height: 1.5; }
    .nf-hero-content { width: min(900px, calc(100% - 50px)); }
    .nf-main { padding: 65px 0; }
    .nf-section { margin-bottom: 75px; }
    .nf-section-header { align-items: flex-start; flex-direction: column; margin-bottom: 25px; }
    .nf-bento-row--first { flex-direction: column; height: auto; }
    .nf-bento-side { flex-direction: row; gap: var(--nf-gutter); }
    .nf-sector-card--large { flex: none; height: 300px; }
    .nf-sector-card--small { flex: 1; aspect-ratio: 4 / 3; min-height: 200px; }
    .nf-bento-row--second { grid-template-columns: repeat(2, 1fr); gap: var(--nf-gutter); }
    .nf-product-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .nf-products-section { padding: 65px 0; }
    .nf-story { grid-template-columns: 1fr; gap: 40px; }
    .nf-story-image { height: 500px; }
    .nf-footer-main { grid-template-columns: 1fr; gap: 38px; padding: 55px 0; }
    .nf-footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
    .nf-container { width: calc(100% - 40px); }
    .nf-hero-content { width: calc(100% - 40px); }
    .nf-logo img { height: 30px; }
    .nf-footer-logo img { height: 30px; }
    .nf-actions { gap: 5px; }
    .nf-icon-btn { width: 34px; }
    .nf-hero { min-height: 620px; }
    .nf-hero-title { font-size: 30px; }
    .nf-bento-side { flex-direction: column; }
    .nf-bento-row--second { grid-template-columns: 1fr; }
    .nf-product-grid { grid-template-columns: 1fr; gap: 18px; }
    .nf-story-image { height: 420px; }
    .nf-newsletter { flex-direction: column; }
    .nf-newsletter input, .nf-newsletter button { width: 100%; }
    .nf-newsletter button { height: 48px; }
}