/* =====================================================================
   MALGOODI — style.css
   Colors sampled directly from the approved PDF.
   =====================================================================*/

:root {
    /* --- Palette (sampled from PDF) --- */
    --malgoodi-cream:      #EDE6DB;   /* parchment background            */
    --malgoodi-cream-soft: #F1EBE1;   /* lighter card interior          */
    --malgoodi-green:      #234602;   /* founding-member ticket green   */
    --malgoodi-green-txt:  #3C5A16;   /* "Founding Member Window" text  */
    --malgoodi-gold:       #C59049;   /* pricing box / accents          */
    --malgoodi-gold-line:  #B0813E;   /* icon line-art / distance nums  */
    --malgoodi-black:      #1a1815;   /* dark display + body dark text  */
    --malgoodi-ink:        #2b2822;   /* body copy                      */
    --malgoodi-muted:      #6b6459;   /* captions / secondary           */
    --malgoodi-border:     #cbc2b3;   /* thin box outlines              */
    --malgoodi-border-2:   #b8ae9d;   /* slightly darker (hover)        */

    /* --- Type --- */
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans:  "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* --- Layout --- */
    --page-max: 1200px;
    --gutter: clamp(20px, 5vw, 64px);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--sans);
    color: var(--malgoodi-ink);
    /* Fallback flat cream for when the cinematic sky layer isn't present.
       The #sky fixed layer (cinematic.css) renders behind this; the paper
       texture below is semi-transparent so the day/night sky shows through. */
    background-color: var(--malgoodi-cream);
    background-image:
        radial-gradient(120% 80% at 15% 0%, rgba(255,255,255,.28), transparent 60%),
        radial-gradient(100% 60% at 90% 15%, rgba(200,188,168,.14), transparent 55%),
        radial-gradient(90% 70% at 50% 100%, rgba(197,144,73,.05), transparent 60%);
    line-height: 1.5;
    overflow-x: hidden;
}
/* When JS/cinematic layer is active, let the sky show through the body. */
body.cinematic-on {
    background-color: transparent;
    background-image: none;
}
/* The content sits on its own parchment surface so copy stays readable even
   as the surrounding sky moves to night. This surface warms at dusk and cools
   only slightly at night (never dark enough to hurt legibility). It fades in
   from the sides so the hero art still blends into the open sky. */
body.cinematic-on main {
    position: relative;
    z-index: 1;
}
body.cinematic-on main::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(120% 80% at 15% 0%, rgba(255,255,255,.30), transparent 60%),
        radial-gradient(100% 60% at 90% 15%, rgba(200,188,168,.16), transparent 55%),
        /* base parchment veil, kept light and constant (no darkening on scroll) */
        linear-gradient(180deg,
            rgba(237,230,219, .78),
            rgba(237,230,219, .84));
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
    transition: background .3s linear;
}
/* Hero should stay open to the sky — pull the veil down below the hero. */
body.cinematic-on .hero { position: relative; z-index: 1; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

main { display: block; }

/* ---------------------------------------------------------------------
   BUTTONS
   ---------------------------------------------------------------------*/
.btn {
    display: inline-block;
    border: none;
    font-family: var(--sans);
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 500;
    transition: background-color .28s ease, transform .28s ease, box-shadow .28s ease;
}
.btn-dark {
    background: var(--malgoodi-black);
    color: #f3ede2;
    font-size: clamp(.72rem, 1.1vw, .82rem);
    padding: 14px 28px;
    border-radius: 2px;
}
.btn-dark:hover { background: #000; transform: translateY(-1px); }
.btn-dark:active { transform: translateY(0); }
.btn:focus-visible {
    outline: 2px solid var(--malgoodi-gold);
    outline-offset: 3px;
}

/* ---------------------------------------------------------------------
   HEADER (minimal, appears on scroll)
   ---------------------------------------------------------------------*/
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 60;
    background: rgba(237,230,219,.92);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--malgoodi-border);
    transform: translateY(-100%);
    transition: transform .4s ease;
}
.site-header.visible { transform: translateY(0); }
.header-inner {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 12px var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.header-logo {
    height: 34px;
    width: auto;
    display: block;
}
.header-cta {
    background: var(--malgoodi-black);
    color: #f3ede2;
    border: none;
    padding: 9px 18px;
    font-size: .68rem;
    letter-spacing: .12em;
    border-radius: 2px;
    transition: background-color .25s ease;
}
.header-cta:hover { background:#000; }
.header-hasiru { height: 30px; width: auto; }

/* ---------------------------------------------------------------------
   HERO
   ---------------------------------------------------------------------*/
.hero {
    position: relative;
    width: 100%;
    padding-bottom: clamp(28px, 4vw, 56px);
}
/* .hero-art positioning + gate layers now live in css/gate.css */

.hero-top {
    position: relative;
    z-index: 2;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: clamp(22px, 3vw, 40px) var(--gutter) 0;
    display: flex;
    justify-content: flex-end;
}
.hero-hasiru { height: clamp(42px, 4.4vw, 62px); width: auto; }

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: clamp(10px, 2vw, 30px) var(--gutter) 0;
}
.hero-wordmark {
    width: clamp(220px, 26vw, 340px);
    height: auto;
    margin-bottom: clamp(28px, 4vw, 54px);
}
.hero-theme {
    font-size: clamp(.95rem, 1.3vw, 1.05rem);
    color: var(--malgoodi-ink);
    margin-bottom: 6px;
    font-weight: 400;
}
.hero-title {
    font-family: var(--serif);
    font-weight: 600;
    color: var(--malgoodi-black);
    font-size: clamp(2.9rem, 6.2vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
}
.hero-project {
    font-size: clamp(.95rem, 1.3vw, 1.05rem);
    color: var(--malgoodi-ink);
    margin-bottom: clamp(20px, 2.6vw, 30px);
}
.hero-story {
    position: relative;
    z-index: 2;
    max-width: var(--page-max);
    margin: clamp(26px, 3.4vw, 44px) auto 0;
    padding: 0 var(--gutter);
    max-width: min(var(--page-max), 1120px);
    font-size: clamp(.86rem, 1.05vw, .95rem);
    color: var(--malgoodi-ink);
    line-height: 1.75;
    text-align: justify;
}
.hero-story {
    max-width: none;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}
.hero-story {
    /* constrain text column inside page */
    width: 100%;
}
.hero .hero-story { max-width: var(--page-max); }

/* ---------------------------------------------------------------------
   EXPERIENCE GRID
   ---------------------------------------------------------------------*/
.experience {
    max-width: var(--page-max);
    margin: clamp(40px, 5vw, 70px) auto 0;
    padding: 0 var(--gutter);
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 2vw, 26px);
}
.exp-box {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--malgoodi-border);
    border-radius: 22px;
    background: rgba(255,255,255,.14);
    padding: clamp(26px, 3vw, 40px) clamp(10px, 1.5vw, 24px);
}
.exp-item {
    position: relative;
    text-align: center;
    padding: 0 clamp(10px, 1.6vw, 26px);
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* vertical dividers between items */
.exp-item + .exp-item::before {
    content: "";
    position: absolute;
    left: 0; top: 8%;
    height: 84%;
    width: 1px;
    background: var(--malgoodi-border);
}
.exp-icon {
    height: clamp(52px, 5vw, 68px);
    width: auto;
    margin-bottom: clamp(16px, 1.8vw, 24px);
    object-fit: contain;
    transition: transform .3s ease;
}
.exp-title {
    font-family: var(--sans);
    font-weight: 500;
    color: var(--malgoodi-black);
    font-size: clamp(1rem, 1.5vw, 1.22rem);
    line-height: 1.2;
    margin-bottom: clamp(12px, 1.4vw, 18px);
    transition: color .3s ease;
}
.exp-caption {
    font-size: clamp(.76rem, .95vw, .86rem);
    color: var(--malgoodi-muted);
    line-height: 1.45;
}

/* ---------------------------------------------------------------------
   TIME CAPSULE + STATS
   ---------------------------------------------------------------------*/
.capsule {
    max-width: var(--page-max);
    margin: clamp(54px, 7vw, 96px) auto 0;
    padding: 0 var(--gutter);
    text-align: center;
}
.capsule-heading { display: block; }
.capsule-sub {
    display: block;
    font-family: var(--sans);
    font-weight: 400;
    color: var(--malgoodi-ink);
    font-size: clamp(1.15rem, 2.3vw, 1.7rem);
    margin-bottom: 4px;
}
.capsule-main {
    display: block;
    font-family: var(--sans);
    font-weight: 700;
    color: var(--malgoodi-black);
    font-size: clamp(1.5rem, 3.4vw, 2.55rem);
    letter-spacing: -0.005em;
}

.stats {
    margin-top: clamp(34px, 4.5vw, 58px);
    display: flex;
    justify-content: center;
    gap: clamp(16px, 2.4vw, 34px);
}
.stat {
    width: clamp(120px, 15vw, 165px);
    aspect-ratio: 165 / 200;
    border: 1px solid var(--malgoodi-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255,255,255,.10);
}
.stat-num {
    font-family: var(--serif);
    font-weight: 400;
    color: var(--malgoodi-black);
    font-size: clamp(2.6rem, 5.2vw, 4rem);
    line-height: 1;
    letter-spacing: .01em;
}
.stat-orn {
    color: var(--malgoodi-gold-line);
    font-size: .5rem;
    letter-spacing: .25em;
    opacity: .85;
}
.stat-label {
    font-family: var(--serif);
    font-weight: 400;
    color: var(--malgoodi-ink);
    font-size: clamp(.85rem, 1.2vw, 1.05rem);
}

/* ---------------------------------------------------------------------
   LOCATION
   ---------------------------------------------------------------------*/
.location {
    max-width: var(--page-max);
    margin: clamp(52px, 6.5vw, 88px) auto 0;
    padding: 0 var(--gutter);
}
.location-inner {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: clamp(26px, 3.4vw, 48px);
    align-items: center;
}
.map-wrap img { width: 100%; border-radius: 14px; }

.distances {
    display: flex;
    align-items: flex-start;
    gap: clamp(14px, 1.8vw, 26px);
    margin-bottom: clamp(20px, 2.4vw, 30px);
}
.distance { flex: 1; }
.dist-top {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-bottom: 8px;
}
.dist-num {
    font-family: var(--sans);
    font-weight: 700;
    color: var(--malgoodi-gold-line);
    font-size: clamp(1.9rem, 3.4vw, 2.9rem);
    line-height: 1;
}
.dist-unit {
    font-family: var(--sans);
    font-weight: 500;
    color: var(--malgoodi-gold-line);
    font-size: clamp(.9rem, 1.3vw, 1.1rem);
}
.dist-desc {
    font-size: clamp(.86rem, 1.1vw, .98rem);
    color: var(--malgoodi-ink);
    line-height: 1.35;
}
.dist-divider {
    width: 1px;
    align-self: stretch;
    background: var(--malgoodi-border);
    margin-top: 4px;
    min-height: 62px;
}
.location-copy {
    font-size: clamp(.86rem, 1.05vw, .96rem);
    color: var(--malgoodi-ink);
    line-height: 1.7;
    max-width: 46ch;
}

/* ---------------------------------------------------------------------
   OFFER + PRICE BOX
   ---------------------------------------------------------------------*/
.offer {
    max-width: var(--page-max);
    margin: clamp(56px, 7vw, 96px) auto 0;
    padding: 0 var(--gutter);
    text-align: center;
}
.offer-sub {
    display: block;
    font-family: var(--sans);
    font-weight: 400;
    color: var(--malgoodi-ink);
    font-size: clamp(1.15rem, 2.3vw, 1.7rem);
    margin-bottom: 4px;
}
.offer-main {
    display: block;
    font-family: var(--sans);
    font-weight: 700;
    color: var(--malgoodi-black);
    font-size: clamp(1.5rem, 3.4vw, 2.5rem);
    letter-spacing: -0.005em;
}
.price-box {
    margin: clamp(30px, 4vw, 52px) auto 0;
    max-width: 720px;
    background: var(--malgoodi-gold);
    border-radius: 16px;
    padding: clamp(26px, 3.4vw, 44px) clamp(20px, 3vw, 40px);
    color: var(--malgoodi-black);
}
.price-main {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    line-height: 1;
    flex-wrap: wrap;
}
.price-big {
    font-family: var(--sans);
    font-weight: 500;
    font-size: clamp(3rem, 8vw, 5.6rem);
    letter-spacing: -0.01em;
}
.price-unit {
    font-family: var(--sans);
    font-weight: 500;
    font-size: clamp(1.05rem, 2.4vw, 1.7rem);
}
.price-plots {
    font-family: var(--sans);
    font-weight: 500;
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    margin-left: 10px;
}
.price-rate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: clamp(8px, 1.4vw, 16px);
    font-family: var(--sans);
    font-weight: 500;
    font-size: clamp(1.05rem, 2.4vw, 1.7rem);
}
.price-rate .rule {
    height: 2px;
    width: clamp(48px, 9vw, 96px);
    background: var(--malgoodi-black);
    display: inline-block;
}

/* ---------------------------------------------------------------------
   VISIT CTA
   ---------------------------------------------------------------------*/
.visit-cta {
    max-width: var(--page-max);
    margin: clamp(52px, 6.5vw, 88px) auto 0;
    padding: 0 var(--gutter);
    text-align: center;
}
.visit-heading {
    font-family: var(--sans);
    font-weight: 400;
    color: var(--malgoodi-black);
    font-size: clamp(1.5rem, 3.6vw, 2.65rem);
    line-height: 1.25;
    margin-bottom: clamp(24px, 3vw, 38px);
}

/* ---------------------------------------------------------------------
   FOUNDING MEMBER TICKET
   ---------------------------------------------------------------------*/
.founding {
    max-width: var(--page-max);
    margin: clamp(52px, 6.5vw, 90px) auto 0;
    padding: 0 var(--gutter) clamp(50px, 6vw, 80px);
}
.ticket {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    background: var(--malgoodi-green);
    border-radius: 18px;
    padding: clamp(12px, 1.4vw, 18px);
    gap: clamp(12px, 1.4vw, 18px);
}
/* perforated inner outline created with a dashed/dotted ring */
.ticket-body {
    position: relative;
    background: var(--malgoodi-cream);
    border-radius: 12px;
    padding: clamp(30px, 4vw, 56px) clamp(28px, 4vw, 60px);
    /* scalloped border feel: dotted ring */
    outline: 3px dotted rgba(35,70,2,.28);
    outline-offset: -14px;
}
.ticket-title {
    font-family: var(--serif);
    font-weight: 600;
    color: var(--malgoodi-green-txt);
    font-size: clamp(1.6rem, 4vw, 3rem);
    line-height: 1.05;
    margin-bottom: clamp(14px, 1.8vw, 22px);
}
.ticket-lead {
    font-family: var(--sans);
    font-weight: 500;
    color: var(--malgoodi-black);
    font-size: clamp(1.05rem, 2.2vw, 1.6rem);
    margin-bottom: clamp(14px, 1.8vw, 20px);
}
.ticket-text {
    font-size: clamp(.78rem, 1vw, .9rem);
    color: var(--malgoodi-ink);
    line-height: 1.6;
    max-width: 60ch;
}
.ticket-stub {
    position: relative;
    background: var(--malgoodi-cream);
    border-radius: 12px;
    width: clamp(96px, 12vw, 150px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 8px;
    overflow: hidden;
}
/* dashed perforation line between body and stub */
.ticket-stub::before {
    content: "";
    position: absolute;
    left: -2px; top: 10%;
    height: 80%;
    border-left: 2px dashed rgba(35,70,2,.55);
}
.ticket-wordmark {
    transform: rotate(90deg);
    width: clamp(150px, 20vw, 240px);
    max-width: none;
    height: auto;
    opacity: .95;
}
.ticket-tc {
    position: absolute;
    right: clamp(6px, .9vw, 12px);
    bottom: 14px;
    writing-mode: vertical-rl;
    font-size: clamp(.6rem, .8vw, .72rem);
    color: var(--malgoodi-muted);
    letter-spacing: .04em;
}

/* ---------------------------------------------------------------------
   FOOTER
   ---------------------------------------------------------------------*/
.site-footer {
    text-align: center;
    padding: 30px var(--gutter) 46px;
    color: var(--malgoodi-muted);
    font-size: .82rem;
    letter-spacing: .04em;
}

/* ---------------------------------------------------------------------
   MODAL
   ---------------------------------------------------------------------*/
.modal-overlay[hidden] { display: none !important; }
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(26,24,21,.55);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(16px, 4vh, 48px) 16px;
    overflow-y: auto;
    opacity: 0;
    transition: opacity .28s ease;
}
.modal-overlay.open { opacity: 1; }
.modal {
    position: relative;
    width: 100%;
    max-width: 640px;
    background: var(--malgoodi-cream);
    border: 1px solid var(--malgoodi-border);
    border-radius: 16px;
    padding: clamp(28px, 4vw, 46px);
    box-shadow: 0 24px 70px rgba(26,24,21,.35);
    transform: translateY(16px) scale(.985);
    transition: transform .3s ease;
    background-image: radial-gradient(120% 80% at 20% 0%, rgba(255,255,255,.4), transparent 60%);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    font-size: 1.9rem;
    line-height: 1;
    color: var(--malgoodi-muted);
    padding: 6px;
    transition: color .2s ease;
}
.modal-close:hover { color: var(--malgoodi-black); }
.modal-close:focus-visible { outline: 2px solid var(--malgoodi-gold); outline-offset: 2px; }

.modal-eyebrow {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--malgoodi-green-txt);
    margin-bottom: 4px;
}
.modal-title {
    font-family: var(--serif);
    font-weight: 600;
    color: var(--malgoodi-black);
    font-size: clamp(1.5rem, 3.4vw, 2rem);
    line-height: 1.1;
    margin-bottom: 6px;
}
.modal-sub {
    color: var(--malgoodi-muted);
    font-size: .92rem;
    margin-bottom: clamp(18px, 2.4vw, 26px);
}

/* Form */
#visitForm { display: flex; flex-direction: column; gap: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
    font-size: .8rem;
    font-weight: 500;
    color: var(--malgoodi-ink);
    letter-spacing: .01em;
}
.field .req { color: var(--malgoodi-gold-line); }
.field input,
.field select {
    font-family: var(--sans);
    font-size: .92rem;
    color: var(--malgoodi-black);
    background: rgba(255,255,255,.6);
    border: 1px solid var(--malgoodi-border);
    border-radius: 6px;
    padding: 10px 12px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--malgoodi-gold-line);
    box-shadow: 0 0 0 3px rgba(197,144,73,.18);
}
.field input.invalid,
.field select.invalid { border-color: #b23c2b; }
.err {
    color: #b23c2b;
    font-size: .74rem;
    min-height: .9em;
}
.err-consent { display: block; margin-top: -6px; }
/* Netlify honeypot — visually hidden, off-screen, not focusable */
.hidden-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden;
}
.consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: .85rem;
    color: var(--malgoodi-ink);
    margin-top: 4px;
    cursor: pointer;
}
.consent input { margin-top: 3px; accent-color: var(--malgoodi-green); }
.modal-submit { align-self: flex-start; margin-top: 10px; }

/* Success */
.modal-success-view { text-align: center; padding: 12px 0; }
.success-mark { width: 200px; margin: 0 auto clamp(18px, 2.4vw, 26px); }
.modal-success-view .modal-sub { margin-bottom: 24px; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
