/*
Theme Name: CRETAN Dummy
Theme URI: https://www.cretan.com
Author: team:orange
Author URI: https://teamorange.de
Description: Reference implementation theme for the CRETAN tour booking platform. Integrates Barba.js, GSAP+ScrollTrigger, and Lenis for page transitions. Compatible with Preact Custom Element widgets via cretan-widgets.php MU-plugin.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cretan-dummy
*/

/* ============================================================
   CRETAN Dummy Theme — Functional Base Styles
   NOT a copy of Banana Design styles — just enough to work.
   Full nav/header/footer styles are inlined in header.php
   (mirrored from cretan-shell-template.php).
   ============================================================ */

/* --- CSS Custom Properties (subset used by theme templates) --- */
:root {
    --space: clamp(20px, 2.083vw, 40px);
    --container-width: calc(1800px + (2 * var(--space)));
    --trans-timing-function: cubic-bezier(.215, .61, .355, 1);
    --trans-duration-sm: 300ms;
    --trans-duration-md: 600ms;
    --font-main: "TT Norms", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-alt: "PF Din", "Arial Narrow", Arial, sans-serif;
    --font-base: clamp(14px, 0.83vw, 16px);
    --font-compact: clamp(12px, 0.73vw, 14px);
    --font-tiny: clamp(11px, 0.63vw, 12px);
    --font-xs: clamp(16px, 1.04vw, 20px);
    --font-s: clamp(20px, 1.88vw, 36px);
    --font-xxl: clamp(52px, 6.67vw, 128px);
    --font-us: clamp(60px, 12.4vw, 238px);
    --header-height: 100px;
    --color-brand: 0, 0, 0;
    --color-accent: 235, 192, 95;
    --color-white: 255, 255, 255;
    --color-grey: 152, 146, 137;
    --xxs-size: 16px;
    --xs-size: clamp(20px, 1.25vw, 24px);
    --s-size: clamp(24px, 1.667vw, 32px);
    --m-size: clamp(32px, 2.083vw, 40px);
    --l-size: clamp(36px, 2.5vw, 48px);
    --xl-size: clamp(40px, 3.333vw, 64px);
    --xxl-size: clamp(48px, 4.167vw, 80px);
    --g-size: clamp(52px, 6.25vw, 120px);
    --t-size: 8px;
}

/* --- Base Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: auto; /* Lenis handles smooth scrolling */
}

body {
    background-color: #0a0a0a;
    color: #ffffff;
    font-family: var(--font-main);
    font-size: var(--font-base);
    font-weight: 300;
    line-height: normal;
    margin: 0;
    overflow-y: auto;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #ffffff;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
    color: rgb(var(--color-accent));
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    line-height: 1.1;
}

/* --- Main Content Area --- */
.cretan-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
    min-height: 60vh;
}

/* --- Barba container transition base --- */
[data-barba="container"] {
    min-height: 60vh;
}

/* --- Active nav state --- */
.site-header__nav a.is-active,
.verm-menu .header-menu a.is-active {
    color: rgb(var(--color-accent));
}

/* --- Hero (used by front-page, tours, calendar) --- */
.cretan-hero {
    position: relative;
    height: clamp(450px, 70vh, 780px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (max-width: 768px) {
    .cretan-hero {
        height: 70vh;
    }
}

.cretan-hero__content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-size);
}

.cretan-hero__kicker {
    font-size: var(--font-compact);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.7;
}

.cretan-hero__title {
    font-family: var(--font-alt);
    font-size: var(--font-us);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin: 0;
}

.cretan-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.cretan-hero__bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.2);
    will-change: transform;
}

.cretan-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

/* --- Tab navigation (Tours / Calendar) --- */
.cretan-tabs {
    display: flex;
    gap: 0;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.cretan-tabs__item {
    padding: 1rem 1.5rem;
    font-family: "PF Din", "TT Norms", system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.35);
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    margin-bottom: -1px; /* overlap container border */
}

.cretan-tabs__item:hover {
    color: rgba(255, 255, 255, 0.7);
}

.cretan-tabs__item--active {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

/* --- Layout utilities mirrored from shell --- */
.section--boxed {
    max-width: var(--container-width);
    margin-right: auto;
    margin-left: auto;
    width: 100%;
    padding-right: var(--space);
    padding-left: var(--space);
}

/* --- Post/Blog templates --- */
.cretan-post-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cretan-post-title {
    font-family: var(--font-alt);
    font-size: var(--font-xxl);
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 0.5rem;
}

.cretan-post-meta {
    font-size: var(--font-compact);
    color: rgba(255, 255, 255, 0.5);
}

.cretan-post-content {
    line-height: 1.7;
    max-width: 760px;
}

.cretan-post-content p { margin: 0 0 1.5em; }
.cretan-post-content h2, .cretan-post-content h3 { margin: 2em 0 0.75em; }

.cretan-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-compact);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2rem;
    opacity: 0.6;
    transition: opacity 300ms;
}

.cretan-back-link:hover {
    opacity: 1;
    color: #ffffff;
}

/* --- Archive grid --- */
.cretan-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.cretan-archive-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    transition: border-color 300ms;
}

.cretan-archive-card:hover {
    border-color: rgba(var(--color-accent), 0.5);
}

.cretan-archive-card__title {
    font-size: var(--font-xs);
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.cretan-archive-card__meta {
    font-size: var(--font-compact);
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
}

.cretan-archive-card__excerpt {
    font-size: var(--font-compact);
    opacity: 0.7;
    line-height: 1.6;
}

/* --- 404 page --- */
.cretan-404 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60vh;
    gap: 1.5rem;
}

.cretan-404__number {
    font-family: var(--font-alt);
    font-size: clamp(100px, 20vw, 240px);
    font-weight: 700;
    line-height: 1;
    color: rgba(var(--color-accent), 0.3);
    margin: 0;
}

.cretan-404__title {
    font-size: var(--font-s);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

.cretan-404__text {
    font-size: var(--font-compact);
    opacity: 0.6;
    max-width: 400px;
}

.cretan-404__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-compact);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgb(var(--color-accent));
    border-bottom: 1px solid rgb(var(--color-accent));
    padding-bottom: 2px;
    transition: opacity 300ms;
}

.cretan-404__link:hover {
    opacity: 0.7;
    color: rgb(var(--color-accent));
}

/* --- Front page featured section --- */
.cretan-fp-intro {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    padding: 4rem 0 3rem;
}

.cretan-fp-intro__kicker {
    font-size: var(--font-compact);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgb(var(--color-accent));
    margin-bottom: 1rem;
}

.cretan-fp-intro__title {
    font-family: var(--font-alt);
    font-size: var(--font-xxl);
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 1.5rem;
}

.cretan-fp-intro__text {
    font-size: var(--font-xs);
    opacity: 0.7;
    line-height: 1.6;
}

/* --- anim-elem for GSAP scroll triggers --- */
.anim-elem { }

/* --- Overflow lock when mobile menu open --- */
.menu-open {
    overflow: hidden;
}
