/* Shared typography and component refinements. Loaded after Ghost's theme settings. */
@font-face {
    font-family: "Lora";
    src: url("../fonts/lora-latin-variable.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
}

body.is-font-system {
    --nc-serif: "Lora", Georgia, serif;
    --nc-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --nc-ink: #302a26;
    --nc-muted: #655c55;
    --nc-accent: #8a603d;
    --nc-accent-hover: #704a2d;
    --nc-line: rgba(83, 65, 49, .2);
    --font-title: var(--nc-serif);
    --font-text: var(--nc-sans);
    --font-display: var(--nc-sans);
    --ghost-accent-color: var(--nc-accent);
    font-family: var(--nc-sans);
    color: var(--nc-ink);
    line-height: 1.65;
}

body.is-font-system :is(h1, h2, h3, h4, h5, h6) {
    font-family: var(--nc-serif);
    color: var(--nc-ink);
    font-weight: 400;
    letter-spacing: -.025em;
    line-height: 1.2;
    text-wrap: pretty;
}

body.is-font-system h1 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); }
body.is-font-system h2 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); }
body.is-font-system h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
body.is-font-system h4 { font-size: 1.4rem; }
body.is-font-system :is(h5, h6) { font-size: 1.15rem; }

body.is-font-system .home-intro h1 {
    font-size: clamp(2.8rem, 6.5vw, 5rem);
    line-height: 1.14;
    margin-top: 1.25rem;
}

.home-intro .macaw-description {
    max-width: 60ch;
    font-size: 1.0625rem;
    line-height: 1.8;
    opacity: 1;
    color: var(--nc-muted);
}

.home-intro .macaw-actions > div { max-width: 100%; }
.home-intro .social-links { gap: .25rem; }
.home-intro aside { padding-top: 1.25rem; }

body.is-font-system .prose { color: var(--nc-ink); }
body.is-font-system .prose p { line-height: 1.8; }
body.is-font-system .prose :is(h1, h2, h3, h4) { margin-top: 1.6em; }
body.is-font-system .prose > :first-child { margin-top: 0; }
body.is-font-system .gh-title { text-transform: none; }

body.is-font-system .content > header h3 {
    font-size: clamp(1.9rem, 3.2vw, 2.5rem);
    font-weight: 400;
    letter-spacing: -.025em;
}

.content > header p { color: var(--nc-muted); font-size: 1rem; }

/* Filled camel buttons identify the primary action. */
body.is-font-system .bg-acc {
    background-color: var(--nc-accent);
    color: #fff;
}

body.is-font-system .bg-acc:hover {
    background-color: var(--nc-accent-hover);
    opacity: 1;
}

body.is-font-system :is(.gh-button, .macaw-button) {
    font-family: var(--nc-sans);
    font-weight: 500;
    letter-spacing: .025em;
    text-transform: none;
    box-shadow: none;
}

body.is-font-system a { color: var(--nc-accent-hover); }
body.is-font-system a.bg-acc { color: #fff; }
body.is-font-system .header a:not(.gh-button),
body.is-font-system .footer a { color: var(--nc-muted); }
body.is-font-system .header a:not(.gh-button):hover,
body.is-font-system .footer a:hover { color: var(--nc-ink); }

body.is-font-system .content a.view-all {
    color: var(--nc-accent-hover);
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding-left: 0;
    padding-right: 1.7rem;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--nc-line);
    text-underline-offset: .35em;
}

.content a.view-all i { right: .2rem; font-size: .65rem; }
body.is-font-system a:focus-visible,
body.is-font-system button:focus-visible {
    outline: 2px solid var(--nc-accent);
    outline-offset: 5px;
}

.social-links img { width: 21px; height: 21px; object-fit: contain; }
.social-links img, .footer .social-icons img { filter: grayscale(1); opacity: .7; }
.social-links a:hover img, .footer .social-icons a:hover img { opacity: 1; }
.social-links a { padding: .6rem; }
.social-links a:hover { bottom: 0; }

body.is-font-system .footer h4 {
    font-family: var(--nc-sans);
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: .015em;
    margin-bottom: .65rem;
}

.content-preview-card,
.content-preview-wrapper:hover .content-preview-card {
    box-shadow: 0 2px 10px rgba(53, 42, 33, .08);
    transform: none;
}

.content-cta > div {
    box-shadow: 0 5px 24px rgba(53, 42, 33, .055);
    border: 1px solid rgba(83, 65, 49, .08);
}

body.is-font-system .content-cta h4 {
    font-size: clamp(1.65rem, 3vw, 2rem);
    padding-inline: 0;
    font-weight: 400;
    letter-spacing: -.025em;
}

.content-cta p { color: var(--nc-muted); }
.content-cta .text-xs { font-size: .875rem; opacity: 1; }
form[data-members-form] input[data-members-email] {
    padding-right: 9.5rem;
    font-family: var(--nc-sans);
    font-size: 1rem;
}

/* Newsletter issues: chronological rows with real publication dates. */
.newsletter-list {
    max-width: 1040px;
    margin-inline: auto;
    border-top: 1px solid var(--nc-line);
}

.newsletter-entry { border-bottom: 1px solid var(--nc-line); }
body.is-font-system .newsletter-entry-link {
    display: grid;
    grid-template-columns: 8rem minmax(0, 1fr) 1.5rem;
    gap: 2rem;
    align-items: start;
    padding: 1.8rem .5rem;
    color: var(--nc-ink);
    text-decoration: none;
    transition: background-color .2s ease;
}

.newsletter-entry-link:hover { background: rgba(255, 255, 255, .22); }
.newsletter-entry-date {
    padding-top: .35rem;
    color: var(--nc-muted);
    font-size: .8125rem;
    font-variant-numeric: tabular-nums;
}

body.is-font-system .newsletter-entry-copy h3 {
    margin: 0 0 .55rem;
    font-size: clamp(1.35rem, 2.1vw, 1.65rem);
    line-height: 1.35;
}

.newsletter-entry-copy p {
    max-width: 68ch;
    margin: 0;
    font-size: .9375rem;
    line-height: 1.7;
    color: var(--nc-muted);
}

.newsletter-entry-arrow { color: var(--nc-accent); font-size: 1.4rem; line-height: 1.5; }

/* Product categories stay quiet; every product gets the same image frame. */
.product-section { scroll-margin-top: 2rem; }
body.is-font-system .product-section-intro h2 {
    font-size: clamp(2rem, 3.1vw, 2.65rem);
    max-width: 16ch;
}

.product-section-intro > p { font-size: 1.0625rem; line-height: 1.7; color: var(--nc-muted); max-width: 32ch; }
.product-categories { display: flex; flex-direction: column; align-items: flex-start; margin-top: 1.5rem; }
body.is-font-system .product-category-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .5rem 0;
    font-size: .9375rem;
    line-height: 1.35;
    color: var(--nc-muted);
    border-bottom: 1px solid transparent;
    text-decoration: none;
}

body.is-font-system .product-category-link:hover,
body.is-font-system .product-category-link:focus-visible {
    color: var(--nc-ink);
    border-bottom-color: var(--nc-accent);
}

.favorite-products-page .product-grid { gap: 2.5rem 1.75rem; }
.favorite-products-page .favorite-product-card { display: flex; flex-direction: column; min-width: 0; padding: 0; }
.product-media {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(83, 65, 49, .1);
    border-radius: 8px;
    margin-bottom: 1.1rem;
}

.product-media :is(.favorite-product-image, .favorite-product-image-placeholder) {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: clamp(.8rem, 2vw, 1.6rem);
    object-fit: contain;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
}

.product-media .favorite-product-image-placeholder { display: grid; place-items: center; color: var(--nc-muted); font-size: .875rem; }
body.is-font-system .favorite-products-page .favorite-product-card h3 {
    font-family: var(--nc-sans);
    font-size: 1.0625rem;
    line-height: 1.5;
    font-weight: 500;
    letter-spacing: 0;
}

body.is-font-system .favorite-products-page .favorite-product-card h3 a { color: var(--nc-ink); }
.favorite-products-page .favorite-product-card > p { font-size: 1rem; line-height: 1.7; color: var(--nc-muted); margin-top: .65rem; }
.product-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: .25rem; }
body.is-font-system .product-card-actions a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; text-underline-offset: .35em; }
.product-card-actions .favorite-product-button { font-weight: 500; text-decoration: underline; }
body.is-font-system .product-card-actions .product-details-link { color: var(--nc-muted); }
body.is-font-system #product-info h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

/* Tutorial titles are deliberately smaller than collection-page headings. */
.tutorial-header { margin-bottom: 1.75rem; }
.tutorial-header .tutorial-eyebrow {
    margin: 0 0 .6rem;
    font-family: var(--nc-sans);
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .12em;
    line-height: 1.5;
    text-transform: uppercase;
    color: var(--nc-muted);
}
body.is-font-system .tutorial-header .gh-title {
    max-width: 26ch;
    margin-bottom: 0;
    font-size: clamp(2rem, 3.5vw, 2.5rem);
    line-height: 1.2;
}

/* A thin underline keeps the current section visible without another button. */
.header .nav a, .header-contact-link {
    text-decoration-line: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 1px;
    text-underline-offset: .5em;
    transition: color .18s ease, text-decoration-color .18s ease;
}
body.is-font-system .header .nav a:is(:hover, :focus-visible),
body.is-font-system .header-contact-link:is(:hover, :focus-visible),
body.is-font-system .header .nav-current a,
body.tag-hair-tutorial .header .nav-hair-tutorials a,
body.page-contact .header .header-contact-link {
    color: var(--nc-ink);
    text-decoration-color: var(--nc-accent);
}

/* Shared play marker for gallery cards and the smaller membership previews. */
.content-preview-wrapper { display: block; border-radius: 10px; }
.content-preview-card { transition: box-shadow .18s ease; }
.content-preview-card > img { transition: transform .2s ease; }
.video-play-indicator {
    position: absolute;
    right: .65rem;
    bottom: .65rem;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 50%;
    background: rgba(48, 42, 38, .8);
    color: #fff;
    pointer-events: none;
    transition: background-color .18s ease;
}
.video-play-indicator svg { width: 1.1rem; height: 1.1rem; }
aside.restricted .video-play-indicator {
    right: .2rem;
    bottom: .2rem;
    width: 1rem;
    height: 1rem;
}
aside.restricted .video-play-indicator svg { width: .7rem; height: .7rem; }
.content-preview-wrapper:focus-visible .video-play-indicator { background: var(--nc-accent-hover); }

@media (hover: hover) and (pointer: fine) {
    .content-preview-wrapper:hover .content-preview-card { box-shadow: 0 4px 16px rgba(53, 42, 33, .14); }
    .content-preview-wrapper:hover .content-preview-card > img { transform: scale(1.02); }
    .content-preview-wrapper:hover .video-play-indicator { background: var(--nc-accent-hover); }
}

body.is-font-system :is(.gh-button, .macaw-button) {
    transition: background-color .18s ease, color .18s ease, opacity .18s ease;
}
.product-category-link { transition: color .18s ease, border-color .18s ease; }
.social-links img, .footer .social-icons img { transition: opacity .18s ease; }
.footer a { transition: color .18s ease; }

@media (max-width: 767px) {
    body.is-font-system .newsletter-entry-link { grid-template-columns: minmax(0, 1fr) 1.25rem; gap: .65rem 1rem; padding: 1.4rem 0; }
    .newsletter-entry-date { grid-column: 1; padding-top: 0; }
    .newsletter-entry-copy { grid-column: 1; }
    .newsletter-entry-arrow { grid-column: 2; grid-row: 2; }
    .product-categories { flex-direction: row; flex-wrap: nowrap; align-items: stretch; gap: 1.25rem; overflow-x: auto; padding-bottom: .35rem; border-bottom: 1px solid var(--nc-line); }
    .product-category-link { flex: 0 0 auto; white-space: nowrap; }
    .product-section-intro > p { max-width: 40ch; }
    .home-intro .macaw-description { font-size: 1rem; }
    .content a.view-all { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
    .newsletter-entry-link, .content-preview-card, .content-preview-card > img,
    .video-play-indicator, .social-links a, .social-links img, .footer .social-icons img,
    .header .nav a, .header-contact-link, .footer a, .product-category-link,
    body.is-font-system :is(.gh-button, .macaw-button) { transition: none; }
    .content-preview-wrapper:hover .content-preview-card > img { transform: none; }
}
