/* =====================================================
   DESIGN TOKENS — Piattaforma ISDS
   Brand: I Segreti dello Stile
   Direction: Luxury club / editorial / dark-first
   ===================================================== */

:root {
    /* ── Display serif (editorial) ─────────────────── */
    --font-display: "Fraunces", "Playfair Display", Georgia, serif;
    /* Existing: --font-inter, --font-barlow already defined in style.css */

    /* ── Gold accent (membership / premium) ─────────
       Used ONLY for: primary CTAs, premium badges, live
       indicators, recommended tier, focus rings.
       Never decorative. */
    --gold: 38 32% 58%;           /* hsl(38, 32%, 58%)  — muted brass */
    --gold-soft: 38 30% 70%;      /* hover / highlight  */
    --gold-deep: 36 30% 42%;      /* pressed / active   */
    --gold-ink: 36 35% 18%;       /* ink on gold bg     */

    /* ── Semantic status (warm-harmonised) ───────────
       Replaces Bootstrap #198754 / #dc3545 / #ffc107 */
    --status-pending: 38 55% 55%;     /* ochre          */
    --status-pending-bg: 38 40% 14%;
    --status-approved: 95 25% 45%;    /* olive green    */
    --status-approved-bg: 95 20% 14%;
    --status-rejected: 8 50% 50%;     /* brick red      */
    --status-rejected-bg: 8 35% 14%;
    --status-info: 200 25% 55%;       /* dust blue      */
    --status-info-bg: 200 20% 14%;

    /* ── Surfaces (dark-first) ───────────────────────
       Extend shadcn tokens from style.css */
    --surface-1: 24 6% 8%;        /* base dark page bg   */
    --surface-2: 24 6% 11%;       /* card surface        */
    --surface-3: 24 6% 14%;       /* raised card / modal */
    --hairline: 30 10% 22%;       /* subtle dividers     */

    /* ── Motion ──────────────────────────────────────
       Luxury motion: slower, ease-out, interruptible */
    --dur-fast: 180ms;
    --dur-base: 320ms;
    --dur-slow: 480ms;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in: cubic-bezier(0.64, 0, 0.78, 0);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

    /* ── Editorial type scale (display) ─────────────
       Used for serif titles. Body/UI keep the Inter
       scale already defined in style.css. */
    --fs-display: clamp(2rem, 4vw + 1rem, 3.5rem);   /* 32→56 */
    --fs-h1: clamp(1.75rem, 2.4vw + 1rem, 2.5rem);   /* 28→40 */
    --fs-h2: clamp(1.375rem, 1.2vw + 1rem, 1.75rem); /* 22→28 */
    --fs-h3: clamp(1.125rem, 0.6vw + 1rem, 1.375rem);/* 18→22 */
    --fs-kicker: 0.75rem;   /* 12 — eyebrow uppercase tracked */
}

/* =====================================================
   GLOBAL A11Y & MOTION
   ===================================================== */

/* Visible focus ring for keyboard users only */
*:focus-visible {
    outline: 2px solid hsl(var(--gold));
    outline-offset: 2px;
    border-radius: 3px;
}
/* Remove default webkit/moz dotted ring when focus-visible is active */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
    outline: none;
}

/* Respect user motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =====================================================
   EDITORIAL TYPOGRAPHY HELPERS
   ===================================================== */

.tt-serif { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }
.tt-serif-italic { font-family: var(--font-display); font-style: italic; font-weight: 400; }

.tt-eyebrow {
    font-family: var(--font-inter);
    font-size: var(--fs-kicker);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: hsl(var(--gold));
    display: inline-block;
}
.tt-eyebrow--muted { color: rgba(255,255,255,0.55); }

.tt-display { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-display); line-height: 1.05; letter-spacing: -0.02em; color: #fff; }
.tt-h1-serif { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-h1); line-height: 1.12; letter-spacing: -0.015em; color: #fff; }
.tt-h2-serif { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-h2); line-height: 1.2; letter-spacing: -0.01em; color: #fff; }
.tt-h3-serif { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-h3); line-height: 1.3; color: #fff; }

/* =====================================================
   GOLD BUTTON (membership / primary CTA)
   Use on: paywall CTA, "Entra nel club", hero convert.
   ===================================================== */

.tt-btn-gold {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px 26px;
    font-family: var(--font-inter);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
    color: hsl(var(--gold-ink));
    background: linear-gradient(180deg, hsl(var(--gold-soft)), hsl(var(--gold)));
    border: 1px solid hsl(var(--gold));
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--dur-base) var(--ease-out),
                box-shadow var(--dur-base) var(--ease-out),
                background var(--dur-base) var(--ease-out);
    box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 8px 24px -10px rgba(180,140,60,0.35);
}
.tt-btn-gold:hover {
    background: linear-gradient(180deg, hsl(var(--gold)), hsl(var(--gold-deep)));
    transform: translateY(-1px);
    color: hsl(var(--gold-ink));
    box-shadow: 0 2px 0 rgba(255,255,255,0.2) inset, 0 14px 32px -12px rgba(180,140,60,0.5);
}
.tt-btn-gold:active { transform: translateY(0); }
.tt-btn-gold--outline {
    background: transparent;
    color: hsl(var(--gold));
    border-color: hsl(var(--gold));
    box-shadow: none;
}
.tt-btn-gold--outline:hover {
    background: rgba(192, 165, 116, 0.1);
    color: hsl(var(--gold-soft));
}

/* =====================================================
   STATUS PILL (reusable, semantic)
   ===================================================== */

.tt-status {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 11px;
    font-family: var(--font-inter);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-radius: 999px;
    border: 1px solid transparent;
    line-height: 1.4;
    white-space: nowrap;
}
.tt-status::before {
    content: "";
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.tt-status--pending  { color: hsl(var(--status-pending));  background: hsl(var(--status-pending-bg));  border-color: hsla(var(--status-pending) / 0.35); }
.tt-status--approved { color: hsl(var(--status-approved)); background: hsl(var(--status-approved-bg)); border-color: hsla(var(--status-approved) / 0.35); }
.tt-status--rejected { color: hsl(var(--status-rejected)); background: hsl(var(--status-rejected-bg)); border-color: hsla(var(--status-rejected) / 0.35); }
.tt-status--info     { color: hsl(var(--status-info));     background: hsl(var(--status-info-bg));     border-color: hsla(var(--status-info) / 0.35); }
.tt-status--premium  { color: hsl(var(--gold));            background: hsla(var(--gold) / 0.1);           border-color: hsla(var(--gold) / 0.4); }
.tt-status--white    { color: #1a1208;                      background: #fff;                            border-color: #fff; }
.tt-status--no-dot::before { display: none; }

/* =====================================================
   GOLD SEAL (membership marker, recommended tier badge)
   Sits above cards. Tiny, refined, NOT a giant gradient badge.
   ===================================================== */

.tt-seal {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 14px;
    font-family: var(--font-inter);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: hsl(var(--gold-ink));
    background: linear-gradient(180deg, hsl(var(--gold-soft)), hsl(var(--gold)));
    border-radius: 999px;
    box-shadow: 0 4px 16px -4px rgba(180,140,60,0.45);
    white-space: nowrap;
}
.tt-seal--muted {
    color: hsl(var(--gold));
    background: hsla(var(--gold) / 0.1);
    border: 1px solid hsla(var(--gold) / 0.4);
    box-shadow: none;
}
.tt-seal svg { width: 12px; height: 12px; }

/* =====================================================
   ALERT (flash messages) — override Bootstrap warm-toned
   ===================================================== */

.alert {
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid transparent;
    line-height: 1.5;
}
.alert-success  { color: hsl(var(--status-approved)); background: hsl(var(--status-approved-bg)); border-color: hsla(var(--status-approved) / 0.3); }
.alert-danger   { color: hsl(var(--status-rejected)); background: hsl(var(--status-rejected-bg)); border-color: hsla(var(--status-rejected) / 0.3); }
.alert-info     { color: hsl(var(--status-info));     background: hsl(var(--status-info-bg));     border-color: hsla(var(--status-info) / 0.3); }
.alert-warning  { color: hsl(var(--status-pending));  background: hsl(var(--status-pending-bg));  border-color: hsla(var(--status-pending) / 0.3); }

/* =====================================================
   TEXT CONTRAST HELPERS (AA compliant on dark surface)
   Replace rgba(255,255,255,0.4/0.5) with these:
   ===================================================== */

.tt-text-dim   { color: rgba(255, 255, 255, 0.72); }
.tt-text-muted { color: rgba(255, 255, 255, 0.62); }
.tt-text-soft  { color: rgba(255, 255, 255, 0.82); }

/* Inline text-button used inside alerts/banners */
.tt-link-inline {
    background: none;
    border: none;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
}
.tt-link-inline:hover { opacity: 0.8; }

/* =====================================================
   PRESS FEEDBACK on tappable cards
   ===================================================== */

.tt-tappable {
    transition: transform var(--dur-base) var(--ease-out),
                box-shadow var(--dur-base) var(--ease-out),
                border-color var(--dur-base) var(--ease-out);
    will-change: transform;
}
.tt-tappable:active { transform: scale(0.985); }
