/*
Theme Name: Gary Cook Organbuilder
Theme URI: https://garycookorganbuilder.co.uk
Author: Gary Cook Organbuilder
Author URI: https://garycookorganbuilder.co.uk
Description: A bespoke classical theme for Gary Cook Organbuilder — pipe organ tuning, restoration, and repair. Typography and palette drawn directly from the workshop's logo; sections are editable via Gutenberg block patterns.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gary-cook-organbuilder
Tags: custom-menu, featured-images, translation-ready, block-patterns, one-column
*/

/* =============================================================
   Gary Cook Organbuilder — bespoke theme styles
   ============================================================= */

:root {
    --navy:       #1c2a4d;
    --navy-soft:  #2a3a63;
    --gold:       #b08a3a;
    --gold-soft:  #c9a558;
    --cream:      #faf6ec;
    --cream-warm: #f3ecd9;
    --ink:        #2a2a2a;
    --ink-soft:   #585450;
    --rule:       #e2d9c2;
    --teal:       #2b7a8a;
    --shadow: 0 1px 0 rgba(28,42,77,.04), 0 12px 30px -10px rgba(28,42,77,.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-size: 19px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    margin: 0;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Reveal animation on load ---------- */
.gco-reveal { opacity: 0; transform: translateY(8px); animation: gco-rise .9s ease forwards; }
.gco-reveal-2 { animation-delay: .15s; }
.gco-reveal-3 { animation-delay: .3s; }
.gco-reveal-4 { animation-delay: .45s; }
@keyframes gco-rise { to { opacity: 1; transform: none; } }

/* =============================================================
   HEADER
   ============================================================= */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--rule);
    position: sticky; top: 0; z-index: 50;
}
.site-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.site-header__logo { display: block; line-height: 0; }
.site-header__logo img {
    height: 92px;
    width: auto;
}
.site-header__logo--text {
    font-family: 'Cinzel', serif;
    font-weight: 500;
    font-size: 22px;
    letter-spacing: 0.06em;
    color: var(--navy);
    text-transform: uppercase;
    line-height: 1;
}
.site-header__nav {
    display: flex;
    gap: 38px;
    align-items: center;
}
.site-header__nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 38px;
    align-items: center;
}
.site-header__nav a {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--navy);
    padding: 8px 0;
    border-bottom: 1px solid transparent;
    transition: border-color .25s ease, color .25s ease;
}
.site-header__nav a:hover,
.site-header__nav .current-menu-item > a { border-bottom-color: var(--gold); }
.site-header__nav .cta > a,
.site-header__nav a.cta {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* =============================================================
   BUTTONS (used inside patterns via Gutenberg .wp-block-button)
   ============================================================= */
.wp-block-button__link,
.gco-btn {
    display: inline-block;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 16px 32px;
    border-radius: 0;
    transition: all .25s ease;
    background: var(--navy);
    color: var(--cream);
    border: 1px solid var(--navy);
}
.wp-block-button__link:hover,
.gco-btn:hover { background: var(--navy-soft); color: var(--cream); }

.wp-block-button.is-style-outline .wp-block-button__link {
    background: transparent;
    color: var(--navy);
    border-color: var(--navy);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: var(--navy);
    color: var(--cream);
}

.gco-btn-link {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--navy);
    border-bottom: 1px solid var(--navy);
    padding: 4px 0;
    display: inline-block;
    transition: color .25s ease, border-color .25s ease;
}
.gco-btn-link:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* =============================================================
   TYPOGRAPHY UTILITIES (used by block patterns)
   ============================================================= */
.gco-overline {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold);
    display: inline-block;
    margin-bottom: 20px;
}
.gco-overline--with-rule {
    position: relative;
    padding-left: 44px;
}
.gco-overline--with-rule::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    width: 32px; height: 1px;
    background: var(--gold);
}

.gco-display {
    font-family: 'Cinzel', serif !important;
    font-weight: 500 !important;
    line-height: 1.1 !important;
    color: var(--navy);
    letter-spacing: 0.005em;
}
.gco-display em, .gco-italic-accent {
    font-family: 'Cormorant Garamond', serif !important;
    font-style: italic;
    font-weight: 400;
    color: var(--gold);
    text-transform: none;
    letter-spacing: 0;
}

.gco-lede {
    font-size: 22px;
    line-height: 1.55;
    color: var(--ink-soft);
    max-width: 36ch;
}

.gco-section-eyebrow {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold);
    text-align: center;
    display: block;
    margin-bottom: 20px;
}
.gco-section-heading {
    font-family: 'Cinzel', serif !important;
    font-weight: 500 !important;
    font-size: clamp(32px, 3.4vw, 46px) !important;
    color: var(--navy);
    text-align: center;
    line-height: 1.15;
    margin: 0 auto 24px;
}
.gco-section-sub {
    text-align: center;
    color: var(--ink-soft);
    font-size: 20px;
    max-width: 58ch;
    margin: 0 auto 72px;
    font-style: italic;
}

/* =============================================================
   HERO SECTION
   ============================================================= */
.gco-hero {
    background:
      radial-gradient(ellipse at 20% 0%, rgba(176,138,58,.06), transparent 60%),
      var(--cream);
    padding: 96px 48px 88px;
}
.gco-hero__grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}
.gco-hero__title {
    font-family: 'Cinzel', serif;
    font-weight: 500;
    font-size: clamp(40px, 4.6vw, 64px);
    line-height: 1.08;
    color: var(--navy);
    margin: 0 0 28px;
}
.gco-hero__title em {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 0;
    text-transform: none;
}
.gco-hero__image {
    position: relative;
    aspect-ratio: 4 / 5;
    background: linear-gradient(135deg, #2a3a63 0%, #1c2a4d 55%, #14203d 100%);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.gco-hero__image::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(201,165,88,.35);
    pointer-events: none;
    z-index: 2;
}
.gco-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}
.gco-hero__image--placeholder .gco-placeholder-caption {
    position: absolute;
    bottom: 50px; left: 28px;
    color: rgba(250,246,236,.55);
    font-style: italic;
    font-size: 15px;
    max-width: 70%;
}
.gco-hero__image--placeholder .gco-placeholder-tag {
    position: absolute;
    bottom: 28px; left: 28px;
    color: rgba(250,246,236,.78);
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}
.gco-hero__pipes {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    padding: 0 18%;
    opacity: 0.18;
    z-index: 1;
}
.gco-hero__pipes span {
    display: block;
    background: linear-gradient(to top, transparent 0%, rgba(201,165,88,.6) 30%, rgba(201,165,88,.9) 100%);
    width: 8%;
    border-radius: 6px 6px 0 0;
}

/* =============================================================
   SERVICES SECTION
   ============================================================= */
.gco-services {
    background: #fff;
    padding: 110px 48px 0;
}
.gco-services__header {
    max-width: 1280px;
    margin: 0 auto 40px;
    text-align: center;
}
.gco-services__grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 0 110px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
}
.gco-service {
    background: #fff;
    padding: 56px 44px;
    transition: background .3s ease;
}
.gco-service:hover { background: var(--cream); }
.gco-service__numeral {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    color: var(--gold);
    letter-spacing: 0.24em;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-transform: uppercase;
}
.gco-service__numeral::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--rule);
}
.gco-service__title {
    font-family: 'Cinzel', serif !important;
    font-weight: 500 !important;
    font-size: 22px !important;
    color: var(--navy);
    margin: 0 0 20px !important;
    letter-spacing: 0.02em;
}
.gco-service__body {
    color: var(--ink-soft);
    margin-bottom: 28px;
    line-height: 1.65;
}
.gco-service__more {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--navy);
    border-bottom: 1px solid var(--gold);
    padding-bottom: 3px;
    display: inline-block;
    transition: color .25s ease;
}
.gco-service:hover .gco-service__more { color: var(--gold); }

/* =============================================================
   CRAFT / ABOUT SECTION
   ============================================================= */
.gco-craft {
    background: var(--cream);
    padding: 130px 48px;
}
.gco-craft__grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 5fr 6fr;
    gap: 96px;
    align-items: center;
}
.gco-craft__image {
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, var(--cream-warm) 0%, #ddd0aa 100%);
    position: relative;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.gco-craft__image::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(176,138,58,.3);
    z-index: 2;
}
.gco-craft__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}
.gco-craft__image--placeholder .gco-placeholder-caption {
    position: absolute;
    bottom: 50px; left: 28px;
    color: var(--navy);
    opacity: .55;
    font-style: italic;
    font-size: 15px;
    max-width: 80%;
}
.gco-craft__image--placeholder .gco-placeholder-tag {
    position: absolute;
    bottom: 28px; left: 28px;
    color: var(--navy);
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}
.gco-craft__title {
    font-family: 'Cinzel', serif !important;
    font-weight: 500 !important;
    font-size: clamp(30px, 3vw, 42px) !important;
    color: var(--navy);
    line-height: 1.2 !important;
    margin: 0 0 36px !important;
}
.gco-craft__title em {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 400;
    color: var(--gold);
    text-transform: none;
    letter-spacing: 0;
}
.gco-craft__body p {
    color: var(--ink-soft);
    font-size: 19px;
    line-height: 1.7;
    margin: 0 0 22px;
}
.gco-craft__signature {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 18px;
    color: var(--navy);
    margin-top: 32px !important;
    padding-top: 24px;
    border-top: 1px solid var(--rule);
}

/* =============================================================
   FEATURED WORK SECTION
   ============================================================= */
.gco-featured {
    background: #fff;
    padding: 130px 48px;
}
.gco-featured__inner { max-width: 1280px; margin: 0 auto; }
.gco-work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 24px;
}
.gco-work {
    cursor: pointer;
}
.gco-work__image {
    aspect-ratio: 4 / 5;
    background: linear-gradient(160deg, #e8dfc8 0%, #c9b78a 100%);
    position: relative;
    margin-bottom: 24px;
    overflow: hidden;
}
.gco-work__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(28,42,77,.4), transparent 60%);
    opacity: 0;
    transition: opacity .35s ease;
}
.gco-work:hover .gco-work__image::after { opacity: 1; }
.gco-work__image img {
    width: 100%; height: 100%;
    object-fit: cover;
    position: absolute; inset: 0;
}
.gco-work__image .gco-placeholder-tag {
    position: absolute;
    top: 24px; left: 24px;
    color: var(--navy);
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    opacity: .65;
    z-index: 2;
}
.gco-work__title {
    font-family: 'Cinzel', serif !important;
    font-weight: 500 !important;
    font-size: 18px !important;
    color: var(--navy);
    margin: 0 0 8px !important;
    letter-spacing: 0.02em;
}
.gco-work__meta {
    font-style: italic;
    color: var(--ink-soft);
    font-size: 16px;
    margin: 0;
}

/* =============================================================
   WORKSHOP / CONTACT SECTION
   ============================================================= */
.gco-workshop {
    background: var(--navy);
    color: var(--cream);
    padding: 130px 48px;
    position: relative;
    overflow: hidden;
}
.gco-workshop::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 80% 20%, rgba(201,165,88,.08), transparent 50%);
    pointer-events: none;
}
.gco-workshop__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 5fr 6fr;
    gap: 96px;
    align-items: start;
    position: relative;
}
.gco-workshop__eyebrow {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold-soft);
    display: block;
    margin-bottom: 20px;
}
.gco-workshop__title {
    font-family: 'Cinzel', serif !important;
    font-weight: 500 !important;
    font-size: clamp(30px, 3vw, 42px) !important;
    line-height: 1.2 !important;
    color: var(--cream);
    margin: 0 0 28px !important;
}
.gco-workshop__title em {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 400;
    color: var(--gold-soft);
    text-transform: none;
}
.gco-workshop__intro {
    color: rgba(250,246,236,.7);
    font-size: 19px;
    line-height: 1.7;
    margin: 0;
}
.gco-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}
.gco-contact__label {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold-soft);
    display: block;
    margin-bottom: 14px;
}
.gco-contact__value {
    font-size: 19px;
    color: var(--cream);
    line-height: 1.65;
    margin: 0 0 36px;
}
.gco-contact__value a {
    border-bottom: 1px solid rgba(201,165,88,.4);
    padding-bottom: 1px;
    transition: border-color .25s ease;
}
.gco-contact__value a:hover { border-bottom-color: var(--gold-soft); }

/* =============================================================
   FOOTER
   ============================================================= */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--rule);
    padding: 48px;
}
.site-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.site-footer__mark {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--navy);
}
.site-footer__small {
    font-size: 14px;
    color: var(--ink-soft);
    font-style: italic;
    margin: 0;
}
.site-footer__links {
    display: flex;
    align-items: center;
}
.site-footer__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 24px;
    align-items: center;
}
.site-footer__menu a {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--navy);
    border-bottom: 1px solid transparent;
    padding-bottom: 3px;
    transition: border-color .25s ease, color .25s ease;
}
.site-footer__menu a:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 900px) {
    .site-header__inner { padding: 14px 24px; }
    .site-header__logo img { height: 64px; }
    .site-header__nav { display: none; }

    .gco-hero,
    .gco-services,
    .gco-craft,
    .gco-featured,
    .gco-workshop { padding-left: 24px; padding-right: 24px; }

    .gco-hero__grid,
    .gco-craft__grid,
    .gco-workshop__inner { grid-template-columns: 1fr; gap: 56px; }

    .gco-services__grid,
    .gco-work-grid { grid-template-columns: 1fr; }

    .site-footer { padding: 32px 24px; }
    .site-footer__inner { flex-direction: column; text-align: center; gap: 20px; }
    .site-footer__menu { justify-content: center; flex-wrap: wrap; }
}

/* =============================================================
   BLOCK EDITOR SCOPING — ensures patterns look right in the admin
   ============================================================= */
.editor-styles-wrapper {
    background: var(--cream);
    font-family: 'Cormorant Garamond', Georgia, serif;
}
