/*
Theme Name: Oriszen
Theme URI: https://oriszen.com
Author: Oriszen
Author URI: https://oriszen.com
Description: Custom block theme for oriszen.com, built on the locked Eclipse design system: dark ground, gold light, silver structure.
Version: 0.1.0
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oriszen
*/

/* ---------------------------------------------------------------------
   Eclipse structural CSS. Design tokens come from theme.json; this file
   holds only what theme.json cannot express. Depth comes from surface
   steps and the single permitted radial glow: no drop shadows.
   --------------------------------------------------------------------- */

/* Focus */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--wp--preset--color--focus);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip link */
.orz-skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 100;
    padding: 10px 20px;
    background: var(--wp--preset--color--gold);
    color: var(--wp--preset--color--on-gold);
    border-radius: var(--wp--custom--radius--pill);
    font-weight: 600;
}
.orz-skip-link:focus { top: 16px; }

/* Wordmark: "ORISZEN" in Michroma, the R in gold */
.orz-wordmark {
    font-family: var(--wp--preset--font-family--michroma);
    font-size: var(--wp--preset--font-size--wordmark);
    letter-spacing: var(--wp--custom--tracking-wordmark);
    text-transform: uppercase;
    color: var(--wp--preset--color--ink);
    line-height: 1;
}
.orz-wordmark .orz-r { color: var(--wp--preset--color--gold-text); }

/* Eyebrow + heading block */
.orz-eyebrow {
    font-family: var(--wp--preset--font-family--michroma);
    font-size: var(--wp--preset--font-size--eyebrow);
    letter-spacing: var(--wp--custom--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--wp--preset--color--gold-text);
    line-height: 1.4;
}
.orz-heading-block { max-width: var(--wp--custom--heading-max); }

/* Sections: space-7 vertical rhythm, alternating ground/surface bands */
.orz-section {
    padding-top: var(--wp--preset--spacing--space-7);
    padding-bottom: var(--wp--preset--spacing--space-7);
}
.orz-band-surface { background: var(--wp--preset--color--surface); }

@media (max-width: 768px) {
    .orz-section {
        padding-top: 72px;
        padding-bottom: 72px;
    }
}

/* Cards */
.orz-card {
    background: var(--wp--preset--color--surface-raised);
    border: 1px solid var(--wp--preset--color--line);
    border-radius: var(--wp--custom--radius--md);
    padding: 32px;
}
.orz-card-pillar { border-top: 2px solid var(--wp--preset--color--gold); }

/* Buttons */
.wp-block-button__link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.is-style-orz-secondary .wp-block-button__link,
.wp-block-button.is-style-orz-secondary .wp-block-button__link {
    background: transparent;
    color: var(--wp--preset--color--ink);
    border: 1px solid var(--wp--preset--color--line-strong);
}
.is-style-orz-header .wp-block-button__link,
.wp-block-button.is-style-orz-header .wp-block-button__link {
    background: transparent;
    color: var(--wp--preset--color--ink);
    border: 1px solid var(--wp--preset--color--gold);
}

/* Comparison table: Oriszen column in gold-tint with gold-text header */
.orz-compare { overflow-x: auto; }
.orz-compare table { width: 100%; border-collapse: collapse; }
.orz-compare th, .orz-compare td {
    text-align: left;
    padding: 14px 18px;
    border-bottom: 1px solid var(--wp--preset--color--line);
    font-size: var(--wp--preset--font-size--body-sm);
}
.orz-compare .orz-col-oriszen { background: var(--wp--preset--color--gold-tint); }
.orz-compare th.orz-col-oriszen { color: var(--wp--preset--color--gold-text); font-weight: 600; }

/* Before/after rows */
.orz-ba-before { color: var(--wp--preset--color--ink-faint); text-decoration: line-through; }
.orz-ba-after { color: var(--wp--preset--color--gold-text); font-weight: 600; }

/* Foundation band */
.orz-foundation {
    display: inline-block;
    border: 1px solid var(--wp--preset--color--line-strong);
    border-radius: var(--wp--custom--radius--pill);
    padding: 12px 28px;
    color: var(--wp--preset--color--silver);
    text-align: center;
}

/* The one permitted gradient: a soft radial gold glow, off-centre,
   behind the hero or the closing CTA. Never behind body text. */
.orz-glow { position: relative; }
.orz-glow::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--wp--custom--glow);
    background-position: 30% 40%;
    background-repeat: no-repeat;
    pointer-events: none;
}
.orz-glow > * { position: relative; }

/* Header: hides on scroll down, reveals on scroll up, blur after 40px.
   Behaviour is added in assets/js; these are the visual states. */
.orz-site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--wp--preset--color--ground);
    transition: transform 0.3s ease, background-color 0.3s ease;
}
.orz-site-header.orz-header-hidden { transform: translateY(-100%); }
.orz-site-header.orz-header-scrolled {
    background: color-mix(in srgb, var(--wp--preset--color--ground) 82%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--wp--preset--color--line);
}

@media (prefers-reduced-motion: reduce) {
    .orz-site-header { transition: none; }
}

/* ---------------------------------------------------------------------
   Components (blocks and patterns)
   --------------------------------------------------------------------- */

/* Container */
.orz-container {
    max-width: var(--wp--custom--content-max, 1200px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* Section variants */
.orz-band { background: var(--wp--preset--color--surface); }
.orz-section-lead {
    color: var(--wp--preset--color--ink-muted);
    font-size: var(--wp--preset--font-size--body-lg, 19px);
    max-width: var(--wp--custom--heading-max, 740px);
    line-height: 1.6;
}
.orz-page-hero h1 { max-width: var(--wp--custom--heading-max, 740px); }

/* Card grid */
.orz-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--wp--preset--spacing--space-4, 32px);
    margin-top: var(--wp--preset--spacing--space-5, 48px);
}
.orz-card .orz-icon { color: var(--wp--preset--color--silver); margin-bottom: 16px; }
.orz-card h3 { margin: 0 0 12px; }
.orz-card p { color: var(--wp--preset--color--ink-muted); margin: 0 0 12px; }
.orz-card-result { color: var(--wp--preset--color--silver); font-weight: 600; }
.orz-problem-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Hero */
.orz-hero {
    position: relative;
    overflow: hidden;
    padding-top: var(--wp--preset--spacing--space-6);
    padding-bottom: var(--wp--preset--spacing--space-7);
    min-height: 72vh;
    display: flex;
    align-items: center;
}
.orz-hero-glow,
.orz-cta .orz-hero-glow {
    position: absolute;
    inset: 0;
    background: var(--wp--custom--glow);
    background-position: 30% 40%;
    background-repeat: no-repeat;
    pointer-events: none;
}
.orz-hero-inner { position: relative; }
.orz-hero-emblem img {
    display: block;
    width: min(460px, 70vw);
    height: auto;
    margin-bottom: var(--wp--preset--spacing--space-5, 48px);
}
.orz-hero h1 { max-width: 12em; margin: 0 0 24px; }
.orz-hero-lead {
    color: var(--wp--preset--color--ink-muted);
    font-size: var(--wp--preset--font-size--body-lg, 19px);
    line-height: 1.6;
    max-width: 560px;
    margin: 0 0 var(--wp--preset--spacing--space-4, 32px);
}
.orz-hero-ctas, .orz-cta-row { display: flex; flex-wrap: wrap; gap: 16px; }
.orz-btn-primary {
    background: var(--wp--preset--color--gold);
    color: var(--wp--preset--color--on-gold);
    border-radius: 999px;
    padding: 12px 28px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--wp--preset--color--gold);
}
.orz-btn-primary:hover { background: var(--wp--preset--color--gold-glow); border-color: var(--wp--preset--color--gold-glow); }
.orz-btn-outline {
    background: transparent;
    color: var(--wp--preset--color--ink);
    border: 1px solid var(--wp--preset--color--line-strong);
    border-radius: 999px;
    padding: 12px 28px;
    font-weight: 600;
    text-decoration: none;
}
.orz-btn-outline:hover { border-color: var(--wp--preset--color--gold-text); color: var(--wp--preset--color--gold-text); }
.orz-scroll-hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--wp--preset--color--ink-faint);
}
/* Split headline (JS wraps words; without JS the plain headline shows) */
.orz-word { display: inline-block; overflow: hidden; vertical-align: bottom; }
.orz-word-inner { display: inline-block; }

/* Process steps */
.orz-steps-list { position: relative; list-style: none; margin: var(--wp--preset--spacing--space-5, 48px) 0 0; padding: 0; }
.orz-steps-line {
    position: absolute;
    left: 22px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--wp--preset--color--line);
}
.orz-step {
    position: relative;
    display: flex;
    gap: 24px;
    padding: 24px 0 24px 64px;
}
.orz-step-num {
    position: absolute;
    left: 0;
    top: 24px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wp--preset--color--ground);
    border: 1px solid var(--wp--preset--color--line-strong);
    border-radius: 50%;
    font-family: var(--wp--preset--font-family--michroma);
    font-size: 13px;
    color: var(--wp--preset--color--gold-text);
}
.orz-step h3 { margin: 0 0 8px; }
.orz-step p { color: var(--wp--preset--color--ink-muted); margin: 0; max-width: 560px; }

/* Comparison table (block markup classes) */
.orz-table-wrap { overflow-x: auto; margin-top: var(--wp--preset--spacing--space-5, 48px); }
.orz-table { width: 100%; min-width: 560px; border-collapse: collapse; }
.orz-table th, .orz-table td {
    text-align: left;
    padding: 14px 18px;
    border-bottom: 1px solid var(--wp--preset--color--line);
    font-size: var(--wp--preset--font-size--body-sm, 15px);
    vertical-align: top;
}
.orz-table thead th {
    font-family: var(--wp--preset--font-family--sora);
    font-weight: 600;
    border-bottom-color: var(--wp--preset--color--line-strong);
}
.orz-cell-gold { background: var(--wp--preset--color--gold-tint); color: var(--wp--preset--color--gold-text); font-weight: 600; }

/* Analogy line */
.orz-analogy { padding-top: var(--wp--preset--spacing--space-5, 48px); padding-bottom: var(--wp--preset--spacing--space-5, 48px); }
.orz-analogy-line {
    color: var(--wp--preset--color--silver);
    font-size: var(--wp--preset--font-size--body-lg, 19px);
    font-style: italic;
    max-width: var(--wp--custom--heading-max, 740px);
    margin: 0 auto;
    text-align: center;
}

/* Before / after list */
.orz-ba-list { list-style: none; margin: var(--wp--preset--spacing--space-5, 48px) 0 0; padding: 0; }
.orz-ba-item {
    display: grid;
    grid-template-columns: 1fr 40px 1fr;
    align-items: center;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--wp--preset--color--line);
}
.orz-ba-arrow { color: var(--wp--preset--color--gold-text); display: flex; justify-content: center; }
@media (max-width: 640px) {
    .orz-ba-item { grid-template-columns: 1fr; gap: 8px; }
    .orz-ba-arrow { justify-content: flex-start; }
}

/* Value list */
.orz-value-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px 32px;
    margin: var(--wp--preset--spacing--space-5, 48px) 0;
    padding: 0;
    list-style: none;
}
.orz-value-list li {
    padding: 14px 18px;
    background: var(--wp--preset--color--surface-raised);
    border: 1px solid var(--wp--preset--color--line);
    border-radius: var(--wp--custom--radius--sm, 10px);
    color: var(--wp--preset--color--ink);
}

/* Stat / proof panel */
.orz-stat-panel {
    margin-top: var(--wp--preset--spacing--space-5, 48px);
    padding: var(--wp--preset--spacing--space-5, 48px);
    background: var(--wp--preset--color--surface-raised);
    border: 1px solid var(--wp--preset--color--line);
    border-radius: var(--wp--custom--radius--lg, 20px);
    text-align: center;
}
.orz-stat {
    font-family: var(--wp--preset--font-family--sora);
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 700;
    color: var(--wp--preset--color--gold-text);
    margin: 0 0 8px;
}
.orz-stat-label { color: var(--wp--preset--color--silver); margin: 0 0 8px; }
.orz-link { color: var(--wp--preset--color--gold-text); }

/* CTA band */
.orz-cta { position: relative; overflow: hidden; text-align: center; }
.orz-cta .orz-container { position: relative; }
.orz-cta h2 { margin-left: auto; margin-right: auto; max-width: var(--wp--custom--heading-max, 740px); }
.orz-cta .orz-section-lead { margin-left: auto; margin-right: auto; }
.orz-cta-row { justify-content: center; margin-top: var(--wp--preset--spacing--space-4, 32px); }

/* FAQ */
.orz-faq-list { margin-top: var(--wp--preset--spacing--space-5, 48px); max-width: 840px; }
.orz-faq-item { border-bottom: 1px solid var(--wp--preset--color--line); }
.orz-faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
    cursor: pointer;
    list-style: none;
    font-family: var(--wp--preset--font-family--sora);
    font-weight: 600;
    font-size: var(--wp--preset--font-size--heading-3, 20px);
    color: var(--wp--preset--color--ink);
}
.orz-faq-item summary::-webkit-details-marker { display: none; }
.orz-faq-icon { flex: none; color: var(--wp--preset--color--silver); transition: transform 0.2s ease; }
.orz-faq-item[open] .orz-faq-icon { transform: rotate(45deg); }
.orz-faq-answer p { color: var(--wp--preset--color--ink-muted); margin: 0 0 20px; max-width: 640px; }

/* Contact form */
.orz-contact .orz-container { max-width: 720px; }
.orz-contact-form {
    margin-top: var(--wp--preset--spacing--space-5, 48px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
}
.orz-contact-form .orz-field { margin: 0; }
.orz-contact-form .orz-field-wide { grid-column: 1 / -1; }
.orz-contact-form label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--wp--preset--font-family--sora);
    font-size: 14px;
    font-weight: 600;
    color: var(--wp--preset--color--ink);
}
.orz-contact-form input,
.orz-contact-form select,
.orz-contact-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    background: var(--wp--preset--color--surface-raised);
    border: 1px solid var(--wp--preset--color--line);
    border-radius: 12px;
    color: var(--wp--preset--color--ink);
    font-family: var(--wp--preset--font-family--inter);
    font-size: 16px;
}
.orz-contact-form input:focus,
.orz-contact-form select:focus,
.orz-contact-form textarea:focus {
    outline: 2px solid var(--wp--preset--color--focus);
    outline-offset: 1px;
    border-color: var(--wp--preset--color--line-strong);
}
.orz-contact-form textarea { resize: vertical; }
.orz-contact-form .orz-form-actions { grid-column: 1 / -1; margin: 4px 0 0; }
.orz-contact-form .orz-form-actions .wp-block-button__link { cursor: pointer; border: 0; border-radius: 999px; padding: 12px 28px; }
.orz-contact-form .orz-form-actions .wp-block-button__link:disabled { opacity: 0.6; cursor: default; }
.orz-form-status { grid-column: 1 / -1; margin: 0; color: var(--wp--preset--color--signal-good); }
.orz-form-status.is-error { color: var(--wp--preset--color--signal-critical); }
.orz-hp { position: absolute; left: -9999px; top: -9999px; height: 1px; width: 1px; overflow: hidden; }
@media (max-width: 600px) {
    .orz-contact-form { grid-template-columns: 1fr; }
}

/* Header internals (display mirrors the WP flex layout engine) */
.orz-header-brand { display: flex; align-items: center; gap: 12px; }
.orz-header-right { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; }
.orz-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding-top: 16px;
    padding-bottom: 16px;
}
.orz-header-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.orz-header-emblem img { display: block; width: 44px; height: auto; border-radius: 0; }
.orz-header-nav { display: flex; align-items: center; gap: 28px; }
.orz-header-nav a { color: var(--wp--preset--color--ink-muted); text-decoration: none; font-size: 15px; }
.orz-header-nav a:hover { color: var(--wp--preset--color--ink); }
.orz-header-cta {
    border: 1px solid var(--wp--preset--color--gold);
    color: var(--wp--preset--color--gold-text);
    border-radius: 999px;
    padding: 10px 22px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}
.orz-header-cta:hover { background: var(--wp--preset--color--gold); color: var(--wp--preset--color--on-gold); }
@media (max-width: 900px) { .orz-header-nav { display: none; } }

/* Header part root */
.orz-header { position: sticky; top: 0; z-index: 50; }

/* Footer */
footer.orz-band-surface > .wp-block-group,
footer .orz-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    max-width: var(--wp--custom--content-max, 1200px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}
footer .orz-header-nav { display: flex; flex-wrap: wrap; justify-content: center; }
footer .orz-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}
footer .orz-footer-bottom p { margin: 0; color: var(--wp--preset--color--ink-muted); font-size: var(--wp--preset--font-size--body-sm, 15px); }
footer .orz-footer-bottom a { color: var(--wp--preset--color--ink-muted); }

@media (max-width: 640px) {
    .orz-header-inner { gap: 12px; }
    .orz-header-right { gap: 12px !important; }
    .is-style-orz-header .wp-block-button__link,
    .wp-block-button.is-style-orz-header .wp-block-button__link {
        padding: 8px 14px;
        font-size: 13px;
        min-height: 40px;
        white-space: nowrap;
    }
    .orz-wordmark { font-size: 13px; }
    .orz-header-emblem img { width: 38px; height: auto; }
}



/* Workflow illustration behind the hero: faint silver lines, drawn via JS. */
.orz-flow {
    position: absolute;
    right: -5%;
    bottom: 0;
    width: min(60%, 600px);
    height: auto;
    color: var(--wp--preset--color--line-strong);
    opacity: 0.5;
    pointer-events: none;
}

/* Active process step */
.orz-step-active .orz-step-num {
    border-color: var(--wp--preset--color--gold);
    color: var(--wp--preset--color--gold);
}
.orz-step-active h3 { color: var(--wp--preset--color--gold-text); }

/* Page-to-page transitions (View Transitions API, no fallback needed) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: orz-vt-out 0.18s ease; }
::view-transition-new(root) { animation: orz-vt-in 0.24s ease; }
@keyframes orz-vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes orz-vt-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* Hero composition: proposition left, emblem right, first viewport carries both */
.orz-hero-inner {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: var(--wp--preset--spacing--space-6, 64px);
    width: 100%;
}
.orz-hero-emblem { display: flex; justify-content: center; }
.orz-hero-emblem img {
    display: block;
    width: min(520px, 100%);
    height: auto;
    border-radius: 0;
    filter: drop-shadow(0 0 40px rgba(212, 165, 90, 0.18));
}
@media (max-width: 900px) {
    .orz-hero { min-height: 0; }
    .orz-hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .orz-hero-emblem { order: -1; }
    .orz-hero-emblem img { width: min(220px, 60vw); }
}

/* Header CTA: gold-outline pill, self-sufficient (not reliant on theme.json element styles) */
.is-style-orz-header .wp-block-button__link,
.wp-block-button.is-style-orz-header .wp-block-button__link {
    border-radius: 999px;
    padding: 10px 22px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
}
.is-style-orz-header .wp-block-button__link:hover,
.wp-block-button.is-style-orz-header .wp-block-button__link:hover {
    background: var(--wp--preset--color--gold);
    color: var(--wp--preset--color--on-gold);
}

/* Mobile: brand row, CTA on its own row; overlay menu owns nav links */
@media (max-width: 900px) {
    .orz-header-inner { justify-content: center; }
    .orz-header-brand { justify-content: center; width: 100%; padding-right: 56px; }
    .orz-header-right { width: 100%; justify-content: center; }
}

/* Harness/overlay mobile nav affordance */
.orz-nav-toggle { display: none; }
@media (max-width: 900px) {
    .orz-nav-toggle {
        display: block;
        position: absolute;
        top: 16px;
        right: 24px;
    }
    .orz-nav-toggle summary {
        list-style: none;
        cursor: pointer;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--wp--preset--color--ink);
        border: 1px solid var(--wp--preset--color--line-strong);
        border-radius: 10px;
    }
    .orz-nav-toggle summary::-webkit-details-marker { display: none; }
    .orz-nav-toggle nav {
        position: absolute;
        right: 0;
        top: 52px;
        display: flex;
        flex-direction: column;
        gap: 4px;
        background: var(--wp--preset--color--surface-raised);
        border: 1px solid var(--wp--preset--color--line);
        border-radius: 18px;
        padding: 12px;
        min-width: 220px;
    }
    .orz-nav-toggle nav a { padding: 12px 16px; border-radius: 10px; text-decoration: none; color: var(--wp--preset--color--ink); }
    .orz-nav-toggle nav a:hover { background: var(--wp--preset--color--surface); }
}
