﻿/* ============================================================
   Saiban Associates – Custom CSS
   Companion to Tailwind CDN. Defines utilities, components,
   and overrides that cannot be expressed inline.
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* ── CSS Custom Properties ────────────────────────────────── */
:root {
    --gold:          #f58634;
    --gold-light:    #FFAA6E;
    --gold-dark:     #D4641A;
    --black:         #0A0A0A;
    --surface:       #111111;
    --border:        #2A2A2A;
    --border-light:  #1E1E1E;
    --text-primary:  #F5F2EC;
    --text-muted:    #888888;
    --font-serif:    'Playfair Display', Georgia, serif;
    --font-sans:     'Source Sans 3', 'Source Sans Pro', system-ui, sans-serif;
}

/* ── Alpine x-cloak (hide before Alpine boots) ────────────── */
[x-cloak] { display: none !important; }

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background-color: var(--black);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ── Typography ───────────────────────────────────────────── */
.font-serif,
h1, h2, h3, h4, h5, h6 { font-family: var(--font-serif); }

/* ── Gold Gradient Text ───────────────────────────────────── */
.gold-text,
.text-gold-gradient {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Gold Divider ─────────────────────────────────────────── */
.gold-divider {
    display: block;
    width: 3rem;          /* 48px */
    height: 2px;
    background: linear-gradient(to right, var(--gold), transparent);
    margin-bottom: 1.5rem;
}

.gold-divider--center {
    width: 4rem;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

/* ── Section Padding ──────────────────────────────────────── */
.section-pad { padding-top: 5rem; padding-bottom: 5rem; }
@media (min-width: 1024px) {
    .section-pad { padding-top: 7rem; padding-bottom: 7rem; }
}

/* ── Container ────────────────────────────────────────────── */
.container-xl {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}
@media (min-width: 640px)  { .container-xl { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .container-xl { padding-left: 2rem;   padding-right: 2rem;   } }

/* ── Luxury Card ──────────────────────────────────────────── */
.luxury-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2px;            /* rounded-sm equivalent */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.luxury-card:hover {
    border-color: rgba(245, 134, 52, 0.35);
    box-shadow: 0 0 0 1px rgba(245, 134, 52, 0.08), 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Dark inner card (on black background) */
.card-dark {
    background-color: var(--black);
    border: 1px solid var(--border-light);
    border-radius: 2px;
    transition: border-color 0.3s ease;
}

.card-dark:hover { border-color: rgba(245, 134, 52, 0.2); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 2px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-sans);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    line-height: 1;
}

.btn-gold {
    background-color: var(--gold);
    color: #000;
    border-color: var(--gold);
}
.btn-gold:hover {
    background-color: var(--gold-light);
    border-color: var(--gold-light);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}
.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-ghost {
    background-color: transparent;
    color: var(--gold);
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
}
.btn-ghost:hover { color: var(--gold-light); }

/* ── Badge / Tag ──────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.badge-gold    { background: rgba(245,134,52,0.12); color: var(--gold); border: 1px solid rgba(245,134,52,0.3); }
.badge-green   { background: rgba(34,197,94,0.1);   color: #4ade80; }
.badge-orange  { background: rgba(249,115,22,0.1);  color: #fb923c; }

/* ── Stat Counter ─────────────────────────────────────────── */
.stat-number {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--gold-light), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10,10,10,0.35) 0%,
        rgba(10,10,10,0.55) 60%,
        rgba(10,10,10,0.92) 100%
    );
}

/* ── Slider Dots ──────────────────────────────────────────── */
.slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background-color: rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    padding: 0;
}
.slider-dot.active,
.slider-dot[aria-current="true"] {
    background-color: var(--gold);
    width: 24px;
}

/* ── Navbar ───────────────────────────────────────────────── */
.nav-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
    position: relative;
    padding-bottom: 2px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--gold);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ── Image Hover Zoom ─────────────────────────────────────── */
.img-zoom-wrap { overflow: hidden; }
.img-zoom-wrap img { transition: transform 0.7s ease; }
.img-zoom-wrap:hover img { transform: scale(1.05); }

/* ── Form Inputs ──────────────────────────────────────────── */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 2px;
    border: 1px solid var(--border);
    background-color: var(--black);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: var(--font-sans);
    transition: border-color 0.2s ease;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(245,134,52,0.08);
}

.form-input::placeholder,
.form-textarea::placeholder { color: #555; }

.form-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}

/* ── Table ────────────────────────────────────────────────── */
.luxury-table th {
    padding: 0.875rem 1rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold);
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.luxury-table td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.luxury-table tr:hover td { background-color: var(--surface); }

/* ── Blog Content (prose) ─────────────────────────────────── */
.blog-content {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.75;
    color: #BBBBBB;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4 {
    font-family: var(--font-serif);
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.blog-content h2 { font-size: 1.5rem; font-weight: 600; }
.blog-content h3 { font-size: 1.25rem; font-weight: 600; }
.blog-content h4 { font-size: 1.1rem;  font-weight: 600; }

.blog-content p { margin-bottom: 1.25rem; }

.blog-content a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}
.blog-content a:hover { color: var(--gold-light); }

.blog-content strong { color: var(--text-primary); font-weight: 600; }

.blog-content ul,
.blog-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.blog-content ul { list-style: disc; }
.blog-content ol { list-style: decimal; }

.blog-content li { margin-bottom: 0.5rem; }

.blog-content blockquote {
    border-left: 3px solid var(--gold);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
}

.blog-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

.blog-content img {
    width: 100%;
    height: auto;
    border-radius: 2px;
    margin: 1.5rem 0;
}

.blog-content code {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.8em;
    color: var(--gold);
}

.blog-content pre {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 2px;
    overflow-x: auto;
    margin-bottom: 1.25rem;
}

/* ── Timeline ─────────────────────────────────────────────── */
.timeline-node {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    background-color: rgba(245,134,52,0.1);
    border: 2px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
}

/* ── Testimonial ──────────────────────────────────────────── */
.testimonial-stars {
    display: flex;
    gap: 2px;
    margin-bottom: 0.75rem;
}
.testimonial-stars span {
    color: var(--gold);
    font-size: 0.875rem;
}

/* ── Page Header (hero shorthand) ────────────────────────── */
.page-hero {
    padding-top: 7rem;
    padding-bottom: 4rem;
    background-color: var(--black);
    position: relative;
    overflow: hidden;
}

/* ── Glow Effects ─────────────────────────────────────────── */
.glow-gold {
    position: absolute;
    border-radius: 9999px;
    background-color: var(--gold);
    filter: blur(100px);
    opacity: 0.06;
    pointer-events: none;
}

/* ── AOS Customisation ────────────────────────────────────── */
[data-aos] { pointer-events: none; }
[data-aos].aos-animate { pointer-events: auto; }

/* ── Responsive Images ────────────────────────────────────── */
img { max-width: 100%; height: auto; }

/* ── Dark mode class toggle (via Alpine) ──────────────────── */
html.dark body { background-color: var(--black); }
html:not(.dark) body {
    background-color: #F8F6F1;
    color: #1A1A1A;
}

/* ── Light Mode Overrides ─────────────────────────────────── */
/*
 * The Tailwind CDN generates fixed hex classes (bg-[#0A0A0A] etc.).
 * These overrides target those classes when html.light is active,
 * giving the whole site a warm-cream light theme.
 */
html.light {
    --black:        #F8F6F1;
    --surface:      #EDEAE3;
    --border:       #D4CFC6;
    --border-light: #E2DED7;
    --text-primary: #1A1A1A;
    --text-muted:   #5A5A5A;
}

/* Body */
html.light body {
    background-color: #F8F6F1 !important;
    color: #1A1A1A !important;
}

/* Dark backgrounds → light cream */
html.light .bg-\[\#0A0A0A\]  { background-color: #F8F6F1 !important; }
html.light .bg-\[\#111111\]  { background-color: #EDEAE3 !important; }
html.light .bg-\[\#0D1B2A\]  { background-color: #E8E4DC !important; }

/* Text colours */
html.light .text-\[\#F5F2EC\] { color: #1A1A1A !important; }
html.light .text-\[\#888888\] { color: #5A5A5A !important; }
html.light .text-\[\#BBBBBB\] { color: #4A4A4A !important; }

/* Borders */
html.light .border-\[\#2A2A2A\]  { border-color: #D4CFC6 !important; }
html.light .border-\[\#1E1E1E\]  { border-color: #DEDAD3 !important; }
html.light .border-\[\#2A2A2A\]\/20 { border-color: rgba(180,172,160,0.5) !important; }

/* Navbar */
html.light header.fixed {
    background-color: rgba(248,246,241,0.96) !important;
    border-bottom-color: #D4CFC6 !important;
}
html.light .bg-\[\#0A0A0A\]\/95 { background-color: rgba(248,246,241,0.96) !important; }
html.light .bg-\[\#0A0A0A\]\/98 { background-color: rgba(248,246,241,0.98) !important; }

/* Mobile menu */
html.light header .bg-\[\#0A0A0A\]\/98 { background-color: rgba(248,246,241,0.98) !important; }

/* Cards and panels */
html.light .luxury-card  { background-color: #EDEAE3; border-color: #D4CFC6; }
html.light .card-dark    { background-color: #F8F6F1; border-color: #DEDAD3; }

/* Form inputs */
html.light .bg-\[\#0A0A0A\].text-\[\#F5F2EC\] {
    background-color: #FFFFFF !important;
    color: #1A1A1A !important;
    border-color: #C8C3BA !important;
}

/* Stat counter gradient — keep gold, just adjust glow */
html.light .stat-number { filter: brightness(0.85); }

/* Blog prose in light mode */
html.light .blog-content        { color: #3A3A3A; }
html.light .blog-content strong { color: #1A1A1A; }
html.light .blog-content h2,
html.light .blog-content h3,
html.light .blog-content h4     { color: #1A1A1A; }

/* Tables */
html.light .luxury-table th { background-color: #EDEAE3; border-bottom-color: #D4CFC6; }
html.light .luxury-table td { border-bottom-color: #DEDAD3; color: #1A1A1A; }
html.light .luxury-table tr:hover td { background-color: #F2EFE8; }

/* Gradient glow blobs — reduce in light mode */
html.light .glow-gold { opacity: 0.04 !important; }

/* Scrollbar in light mode */
html.light::-webkit-scrollbar-track { background: #F8F6F1; }
html.light::-webkit-scrollbar-thumb { background: #D4CFC6; }

/* ── Print ────────────────────────────────────────────────── */
@media print {
    nav, footer, .no-print { display: none !important; }
    body { background: white; color: black; }
    .blog-content { color: #222; }
}

/* ── Accessibility ────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 1rem;
    background: var(--gold);
    color: #000;
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 0 0 4px 4px;
    transition: top 0.2s;
    z-index: 9999;
}
.skip-link:focus { top: 0; }

/* ── Utility: line-clamp ──────────────────────────────────── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}
