/* ==========================================================================
   SiteKit — public site components
   ========================================================================== */

/* ---- Buttons ---------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
    padding: 14px 26px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
    text-align: center;
}

.btn--primary {
    background-color: var(--primary);
    color: var(--on-primary);
}

.btn--primary:hover {
    background-color: var(--moss-shadow);
    color: var(--on-primary);
    transform: translateY(-1px);
}

.btn--outline {
    background-color: var(--surface);
    color: var(--primary-bright);
    border-color: var(--soft-clay);
}

.btn--outline:hover {
    background-color: var(--surface-container);
    color: var(--primary-bright);
}

.btn--ghost {
    background: transparent;
    color: var(--primary-bright);
    border-color: var(--soft-clay);
}

.btn--ghost:hover {
    background-color: var(--surface-container);
    color: var(--primary-bright);
}

.btn--block {
    width: 100%;
}

.btn--lg {
    padding: 16px 32px;
    font-size: 15px;
}

/* ---- Header / navigation ---------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--surface-container-low);
    border-bottom: 1px solid transparent;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
    box-shadow: var(--shadow-sm);
    border-bottom-color: var(--surface-container-highest);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 18px;
    gap: var(--gutter);
}

.brand {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-bright);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.nav {
    display: none;
    align-items: center;
    gap: 32px;
}

.nav__link {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--on-surface-variant);
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.nav__link:hover {
    color: var(--secondary);
}

.nav__link.is-active {
    color: var(--primary-bright);
    border-bottom-color: var(--secondary);
}

.site-header__cta {
    display: none;
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 0;
    border-radius: var(--radius-full);
    color: var(--primary-bright);
}

.menu-toggle:hover {
    background-color: var(--surface-container);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px var(--margin-page-mobile) 20px;
    border-top: 1px solid var(--surface-container-highest);
    background-color: var(--surface-container-low);
}

.mobile-nav.is-open {
    display: flex;
}

.mobile-nav__link {
    padding: 12px 8px;
    font-weight: 600;
    color: var(--on-surface-variant);
    border-radius: var(--radius);
}

.mobile-nav__link:hover,
.mobile-nav__link.is-active {
    color: var(--primary-bright);
    background-color: var(--surface-container);
}

.mobile-nav .btn {
    margin-top: 8px;
}

@media (min-width: 880px) {
    .nav { display: flex; }
    .site-header__cta { display: inline-flex; }
    .menu-toggle { display: none; }
    .mobile-nav { display: none !important; }
}

/* ---- Sections --------------------------------------------------------- */
.section {
    padding-block: var(--space-12);
}

.section--tight {
    padding-block: var(--space-8);
}

.section--surface { background-color: var(--surface); }
.section--low { background-color: var(--surface-container-low); }

.section-head {
    text-align: center;
    max-width: 640px;
    margin-inline: auto;
    margin-bottom: var(--space-8);
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 32px);
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-head p {
    font-size: 18px;
    color: var(--on-surface-variant);
}

/* ---- Hero (home) ------------------------------------------------------ */
.hero {
    position: relative;
    min-height: 600px;
    height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(30, 42, 30, 0.32);
    z-index: 1;
}

.hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero__panel {
    max-width: 620px;
    padding: clamp(28px, 5vw, 52px);
    border-radius: var(--radius-lg);
    background: var(--hero-panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--hero-panel-bd);
}

.hero__panel h1 {
    font-size: clamp(40px, 6vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero__panel p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--on-surface-variant);
    margin-bottom: 28px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* ---- Cards (services) ------------------------------------------------- */
.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gutter);
}

@media (min-width: 768px) {
    .cards { grid-template-columns: repeat(3, 1fr); align-items: start; }
    .cards--staggered > :nth-child(2) { margin-top: 32px; }
    .cards--staggered > :nth-child(3) { margin-top: 64px; }
}

.card {
    background-color: var(--surface);
    border: 1px solid rgba(150, 150, 150, 0.2);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: border-color 0.3s ease, transform 0.3s ease;
    height: 100%;
}

.card:hover {
    border-color: var(--secondary-fixed-dim);
    transform: translateY(-2px);
}

.card__icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.card__icon svg { width: 26px; height: 26px; }
.card__icon--sage { background-color: var(--tertiary-fixed); color: var(--tertiary-container); }
.card__icon--forest { background-color: var(--primary-fixed); color: var(--primary-container); }
.card__icon--clay { background-color: var(--secondary-fixed); color: var(--on-secondary-container); }

.card h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.card p {
    color: var(--on-surface-variant);
    margin-bottom: 20px;
}

.card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.03em;
    color: var(--secondary);
}

.card__link svg { width: 16px; height: 16px; }

/* ---- Contact strip (home) -------------------------------------------- */
.contact-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    align-items: start;
}

@media (min-width: 900px) {
    .contact-split { grid-template-columns: 1fr 1fr; gap: 64px; }
}

.contact-split h2 {
    font-size: clamp(28px, 4vw, 32px);
    margin-bottom: 20px;
}

.contact-split__intro {
    font-size: 16px;
    color: var(--on-surface-variant);
    margin-bottom: 28px;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--on-surface-variant);
    margin-bottom: 14px;
}

.contact-detail svg { width: 22px; height: 22px; color: var(--secondary); flex: none; }

.panel {
    background-color: var(--surface-container);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 4vw, 40px);
}

.panel--raised {
    background-color: var(--surface-container-lowest);
    border: 1px solid rgba(150, 150, 150, 0.3);
    box-shadow: var(--shadow-md);
}

/* ---- Forms ------------------------------------------------------------ */
.form { display: flex; flex-direction: column; gap: 26px; }

.field { display: flex; flex-direction: column; gap: 8px; }

/* Honeypot: positioned off-screen so people never see it, but bots still fill it.
   (Uses absolute positioning rather than the `hidden` attribute, which the .field
   rule's display:flex would otherwise override.) */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

.field__label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--primary-bright);
}

.input,
.textarea,
.select {
    width: 100%;
    background-color: transparent;
    border: 0;
    border-bottom: 1px solid var(--natural-stone);
    border-radius: 0;
    padding: 10px 0;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--on-surface);
    transition: border-color 0.25s ease;
}

.input::placeholder,
.textarea::placeholder { color: var(--outline); }

.input:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-bottom-color: var(--secondary);
}

.textarea { resize: vertical; min-height: 120px; }

.select {
    appearance: none;
    background-image: var(--select-chevron);
    background-position: right 0 center;
    background-repeat: no-repeat;
    background-size: 1.4em 1.4em;
    padding-right: 28px;
}

.form__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
}

.form__note { font-size: 12px; color: var(--outline); max-width: 220px; }

.field-validation-error,
.validation-summary-errors {
    color: var(--error);
    font-size: 13px;
}

.validation-summary-errors ul { margin: 0; padding-left: 18px; }

.input.input-validation-error,
.textarea.input-validation-error,
.select.input-validation-error {
    border-bottom-color: var(--error);
}

/* ---- Alerts ----------------------------------------------------------- */
.alert {
    border-radius: var(--radius);
    padding: 14px 18px;
    font-size: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert--success {
    background-color: var(--alert-success-bg);
    color: var(--alert-success-fg);
    border-color: var(--alert-success-bd);
}

.alert--error {
    background-color: var(--error-container);
    color: var(--on-error-container);
    border-color: var(--alert-error-bd);
}

/* ---- About: hero ------------------------------------------------------ */
.about-hero {
    padding-block: var(--space-12) var(--space-8);
    background-color: var(--surface-container-low);
}

.about-hero__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    align-items: center;
}

@media (min-width: 992px) {
    .about-hero__grid { grid-template-columns: 7fr 5fr; gap: var(--gutter); }
}

.about-hero h1 {
    font-size: clamp(40px, 6vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 700;
    margin-bottom: 28px;
}

.about-hero p {
    font-size: 18px;
    line-height: 1.65;
    color: var(--on-surface-variant);
    max-width: 36rem;
}

.about-hero__grid > div:last-child {
    position: relative;
    isolation: isolate;
}

/* Soft blurred accent behind the portrait, matching the concept's organic depth. */
.about-hero__grid > div:last-child::before {
    content: "";
    position: absolute;
    top: -3rem;
    right: -3rem;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--surface-container-highest);
    opacity: 0.5;
    filter: blur(48px);
    z-index: -1;
    pointer-events: none;
}

.media-organic {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-full) var(--radius-full) var(--radius-lg) var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(150, 150, 150, 0.2);
}

.media-organic img,
.media-organic .bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-size: cover;
    background-position: center;
}

/* ---- About: story ----------------------------------------------------- */
.story__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    align-items: center;
}

@media (min-width: 992px) {
    .story__grid { grid-template-columns: 1fr 1fr; gap: var(--space-12); }
}

.story__media {
    position: relative;
    isolation: isolate; /* establish a stacking context so the offset accent is visible */
}

.story__media img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: clamp(360px, 50vw, 600px);
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(150, 150, 150, 0.1);
}

.story__media::before {
    content: "";
    position: absolute;
    inset: 0;
    transform: translate(16px, 16px);
    border-radius: var(--radius-lg);
    background: rgba(243, 186, 157, 0.18);
    z-index: 0;
}

.story h2 {
    font-size: clamp(28px, 4vw, 32px);
    margin-block: 12px 24px;
}

.prose { color: var(--on-surface-variant); }
.prose p { margin-bottom: 18px; line-height: 1.7; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 { font-size: 26px; margin-block: 28px 14px; }
.prose h3 { font-size: 21px; margin-block: 22px 12px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose a { text-decoration: underline; }

/* ---- About: values bento --------------------------------------------- */
.values-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gutter);
}

@media (min-width: 768px) {
    .values-grid { grid-template-columns: repeat(3, 1fr); align-items: start; }
    .value-card--featured { transform: translateY(-16px); }
}

.value-card {
    background-color: var(--surface);
    border: 1px solid rgba(150, 150, 150, 0.12);
    border-radius: var(--radius-xl);
    padding: 40px;
    transition: border-color 0.3s ease;
    height: 100%;
}

.value-card:hover { border-color: var(--soft-clay); }

.value-card--featured {
    background-color: var(--primary);
    color: var(--on-primary);
    border: 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.value-card__icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

.value-card__icon svg { width: 30px; height: 30px; }
.value-card__icon--sage { background-color: var(--tertiary-fixed); color: var(--tertiary); }
.value-card__icon--clay { background-color: rgba(243, 186, 157, 0.3); color: var(--secondary); }
.value-card--featured .value-card__icon { background-color: rgba(255, 255, 255, 0.1); color: var(--tertiary-fixed); }

.value-card__decor {
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 180px;
    height: 180px;
    border-radius: var(--radius-full);
    background: radial-gradient(circle, rgba(174, 190, 134, 0.18), transparent 70%);
    pointer-events: none;
}

.value-card h3 { font-size: 24px; margin-bottom: 16px; }
.value-card--featured h3 { color: var(--on-primary); }
.value-card p { color: var(--on-surface-variant); line-height: 1.65; }
.value-card--featured p { color: var(--primary-fixed-dim); position: relative; z-index: 1; }

/* ---- CTA -------------------------------------------------------------- */
.cta {
    position: relative;
    text-align: center;
    overflow: hidden;
}

.cta__dots {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    pointer-events: none;
    background-image: radial-gradient(circle at 2px 2px, var(--primary) 1px, transparent 0);
    background-size: 32px 32px;
}

.cta__inner { position: relative; max-width: 720px; margin-inline: auto; }
.cta h2 { font-size: clamp(32px, 5vw, 48px); line-height: 1.1; margin-bottom: 24px; }
.cta p { font-size: 18px; color: var(--on-surface-variant); margin-bottom: 36px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

/* ---- Contact page ----------------------------------------------------- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    align-items: start;
}

@media (min-width: 992px) {
    .contact-layout { grid-template-columns: 5fr 7fr; gap: 64px; }
}

.contact-intro h1 {
    font-size: clamp(40px, 6vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 700;
    margin-bottom: 24px;
}

.contact-intro p { font-size: 18px; color: var(--on-surface-variant); max-width: 28rem; }

.email-card {
    background-color: var(--surface-container);
    border: 1px solid rgba(150, 150, 150, 0.2);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-top: 40px;
}

.email-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background-color: rgba(58, 77, 57, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

.email-card h3 { font-size: 24px; margin-bottom: 10px; }
.email-card p { color: var(--on-surface-variant); margin-bottom: 22px; }

.email-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--secondary);
}

.contact-figure {
    margin-top: 32px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(150, 150, 150, 0.1);
    height: 260px;
}

.contact-figure img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Simple page (policies) ------------------------------------------ */
.simple-page { padding-block: var(--space-12); }
.simple-page__header { max-width: 760px; margin-bottom: var(--space-4); }
.simple-page h1 {
    font-size: clamp(36px, 5vw, 48px);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.simple-page__body { max-width: 760px; font-size: 17px; }

/* ---- Footer ----------------------------------------------------------- */
.site-footer {
    background-color: var(--primary);
    color: var(--on-primary);
    margin-top: auto;
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-block: var(--space-6);
    border-top: 1px solid rgba(150, 150, 150, 0.25);
}

@media (min-width: 768px) {
    .site-footer__inner { flex-direction: row; justify-content: space-between; align-items: center; }
}

.site-footer__brand .brand { color: var(--on-primary); }
.site-footer__tagline { color: var(--on-primary-container); font-size: 14px; margin-top: 6px; }
.site-footer__copyright { color: var(--on-primary-container); font-size: 12px; margin-top: 6px; }

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.site-footer__links a { color: var(--on-primary-container); font-size: 15px; }
.site-footer__links a:hover { color: var(--soft-clay); }

.site-footer__social { display: flex; gap: 14px; margin-top: 8px; }
.site-footer__social a { color: var(--on-primary-container); }
.site-footer__social a:hover { color: var(--soft-clay); }
.site-footer__social svg { width: 20px; height: 20px; }

/* --- Brand logo (shown in place of the text wordmark when a logo image is set) --- */
.brand-logo { display: inline-block; max-height: 38px; width: auto; vertical-align: middle; }
.admin-sidebar__brand .brand-logo { max-height: 34px; }
.auth-brand .brand-logo { max-height: 48px; }

/* ==========================================================================
   Dark theme — public-site fixes for tints that vanish on dark.
   ========================================================================== */
html[data-theme="dark"] .email-card__icon { background-color: rgba(166, 194, 161, 0.14); color: var(--primary-bright); }
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .email-card__icon { background-color: rgba(166, 194, 161, 0.14); color: var(--primary-bright); }
}