/*
 * Template 1 — "Ember"
 *
 * Refined, magazine-quality restaurant template. Dark mood with warm
 * saffron-to-terracotta accents. Editorial serif display + clean sans body.
 *
 * Design system tokens are CSS custom properties so individual customers'
 * accents can be remapped via SITE_SETTING.color_primary without forking
 * the stylesheet.
 *
 * Layout: full-bleed sections, 1180px content max-width, 12-col-ish responsive
 * grid where useful, single-column collapse at 860px.
 */

/* ---------- Design tokens ---------- */
.template1 {
    --t1-bg:           #120906;             /* darkest wood */
    --t1-bg-2:         #1a0f0a;             /* surface */
    --t1-bg-3:         #221511;             /* surface raised */
    --t1-line:         rgba(245,230,211,0.08);
    --t1-line-strong:  rgba(245,230,211,0.18);

    --t1-accent:       #f5b400;             /* saffron */
    --t1-accent-2:     #d2691e;             /* terracotta */
    --t1-accent-grad:  linear-gradient(135deg, #f5b400 0%, #d2691e 100%);

    --t1-text:         #f0e2cf;             /* cream */
    --t1-text-2:       #cbbba2;             /* muted cream */
    --t1-text-3:       #8e7e68;             /* faint */

    --t1-display:      'Playfair Display', 'Cormorant Garamond', Georgia, serif;
    --t1-sans:         'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --t1-radius:       14px;
    --t1-radius-sm:    8px;

    background: var(--t1-bg);
    color: var(--t1-text);
    font-family: var(--t1-sans);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.template1 a { color: inherit; }
.template1 .t1-container {
    width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px;
}

/* ---------- Header ---------- */
.t1-header {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(18,9,6,0.72);
    border-bottom: 1px solid var(--t1-line);
}
.t1-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 0;
    gap: 24px;
}
.t1-brand {
    font-family: var(--t1-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--t1-text);
    text-decoration: none;
}
.t1-brand:hover { color: var(--t1-accent); }

/* Floating logo mark: anchored to the top-left of the page, NOT sticky.
   Bar stays slim — when a logo is set, the wordmark is removed from the bar
   and the nav floats right via justify-content (handled by the modifier
   below). Logo overflows downward into the hero area for a confident
   premium feel. */
.t1-logo-mark {
    position: absolute;
    top: 6px;
    left: 28px;
    z-index: 60;
    display: block;
    line-height: 0;
}
.t1-logo-mark img {
    display: block;
    width: auto;
    height: auto;
    max-width: 240px;
    max-height: 240px;
}
.t1-header--logo-floats .t1-header__inner {
    justify-content: flex-end;
}
@media (max-width: 860px) {
    .t1-logo-mark { top: 4px; left: 14px; }
    .t1-logo-mark img { max-width: 140px; max-height: 140px; }
}
.t1-nav {
    display: flex; align-items: center; gap: 28px;
    font-size: 0.92rem;
    font-weight: 500;
}
.t1-nav a { text-decoration: none; color: var(--t1-text-2); transition: color 0.2s ease; }
.t1-nav a:hover { color: var(--t1-accent); }
.t1-nav a.t1-cta {
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--t1-accent-grad);
    color: #1a0f0a;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.t1-nav a.t1-cta:hover { color: #1a0f0a; opacity: 0.9; }

.t1-hamburger {
    display: none;
    background: transparent;
    border: 1px solid var(--t1-line-strong);
    color: var(--t1-text);
    width: 44px; height: 44px;
    border-radius: var(--t1-radius-sm);
    cursor: pointer;
    align-items: center; justify-content: center;
}

/* ---------- Hero ---------- */
.t1-hero {
    position: relative;
    padding: 110px 0 120px;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 22%, rgba(245,180,0,0.10), transparent 55%),
        radial-gradient(circle at 82% 72%, rgba(210,105,30,0.14), transparent 55%),
        linear-gradient(160deg, #120906 0%, #1a0f0a 100%);
}
.t1-hero::before {
    /* subtle grid texture, masked to vignette */
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(245,230,211,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245,230,211,0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.95), transparent 70%);
            mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.95), transparent 70%);
    pointer-events: none;
}
.t1-hero__grid {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
}
.t1-eyebrow {
    display: inline-block;
    font-family: var(--t1-sans);
    font-size: 0.72rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--t1-accent);
    padding: 7px 16px;
    border: 1px solid rgba(245,180,0,0.4);
    border-radius: 999px;
    background: rgba(245,180,0,0.06);
}
.t1-title {
    font-family: var(--t1-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
    margin: 22px 0 18px;
    color: var(--t1-text);
}
.t1-title__highlight {
    background: var(--t1-accent-grad);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    font-style: italic;
}
.t1-tagline {
    font-size: 1.15rem;
    line-height: 1.65;
    color: var(--t1-text-2);
    max-width: 540px;
    margin: 0 0 32px;
}
.t1-cta-group {
    display: flex; gap: 14px; flex-wrap: wrap;
}
.t1-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 15px 28px;
    border-radius: var(--t1-radius-sm);
    font-family: var(--t1-sans);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    cursor: pointer;
}
.t1-btn--primary {
    background: var(--t1-accent-grad);
    color: #1a0f0a;
}
.t1-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(245,180,0,0.28);
    color: #1a0f0a; text-decoration: none;
}
.t1-btn--ghost {
    color: var(--t1-text);
    border: 1px solid var(--t1-line-strong);
}
.t1-btn--ghost:hover {
    background: rgba(245,230,211,0.06);
    color: var(--t1-text); text-decoration: none;
    border-color: var(--t1-text-2);
}

/* ---------- 3D rotating portrait card ----------
   A tall portrait photo (3:4) on a 2-face plane (front + back), slowly
   rotating around its vertical axis like a magazine cover on a stand.
   The back face is mirrored so the image reads correctly from behind. */
.t1-scene {
    perspective: 1600px;
    display: flex; justify-content: center; align-items: center;
    min-height: 540px;
    --t1-cube-w: 360px;
    --t1-cube-h: 480px;
    --t1-cube-d: 0px;   /* flat plane — no depth */
}
.t1-card {
    position: relative;
    width: var(--t1-cube-w); height: var(--t1-cube-h);
    transform-style: preserve-3d;
    animation: t1-spin 12s ease-out 1 forwards;
}
.t1-face {
    position: absolute; width: var(--t1-cube-w); height: var(--t1-cube-h);
    border-radius: var(--t1-radius);
    background: var(--t1-bg-3);
    border: 1px solid rgba(245,180,0,0.25);
    box-shadow:
        0 22px 56px rgba(0,0,0,0.55),
        inset 0 0 60px rgba(210,105,30,0.12);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.t1-face img {
    width: 100%; height: 100%; object-fit: cover;
    /* base treatment */
}
.t1-face::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(245,180,0,0.12) 0%, transparent 35%, transparent 65%, rgba(210,105,30,0.22) 100%);
    pointer-events: none;
}

/* CSS-only variation so one uploaded hero photo gives four distinct cube faces */
.t1-face--f img { filter: saturate(1.08); }
/* Back face: same image, no scaleX flip. The face element is already
   rotated 180° statically; when the card spins 180° the rotations
   cancel and content reads correctly without any extra mirror. */
.t1-face--b img { filter: saturate(1.08); }

/* Empty-state when no hero image is set */
.t1-face--empty {
    background: linear-gradient(135deg, #221511 0%, #1a0f0a 100%);
}
.t1-face--empty::before {
    content: "Y";
    font-family: var(--t1-display);
    font-size: 8rem;
    background: var(--t1-accent-grad);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.5;
}

.t1-face--f { transform: translateZ(1px); }
.t1-face--b { transform: rotateY(180deg) translateZ(1px); }

@keyframes t1-spin {
    0%   { transform: rotateX(-10deg) rotateY(0deg); }
    100% { transform: rotateX(-10deg) rotateY(360deg); }
}

/* ---------- Stats strip ---------- */
.t1-stats {
    background: var(--t1-bg-2);
    border-top: 1px solid var(--t1-line);
    border-bottom: 1px solid var(--t1-line);
    padding: 36px 0;
}
.t1-stats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 36px;
}
.t1-stat {
    border-left: 2px solid var(--t1-accent);
    padding-left: 16px;
}
.t1-stat__label {
    font-family: var(--t1-sans);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--t1-text-3);
    font-weight: 700;
}
.t1-stat__value {
    font-family: var(--t1-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--t1-text);
    margin-top: 4px;
    letter-spacing: -0.01em;
}

/* ---------- Section base ---------- */
.t1-section {
    padding: 90px 0;
}
.t1-section__eyebrow {
    font-family: var(--t1-sans);
    font-size: 0.72rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--t1-accent);
    margin-bottom: 14px;
}
.t1-section h2 {
    font-family: var(--t1-display);
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.15;
    color: var(--t1-text);
    margin: 0 0 18px;
}
.t1-section__lead {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--t1-text-2);
    max-width: 720px;
}

/* ---------- Numbered panels ---------- */
.t1-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin-top: 40px;
}
.t1-panel {
    background: linear-gradient(165deg, var(--t1-bg-3) 0%, var(--t1-bg-2) 100%);
    border: 1px solid var(--t1-line);
    border-radius: var(--t1-radius);
    padding: 30px;
    transition: transform 0.2s ease, border-color 0.2s ease;
    color: var(--t1-text);
    text-decoration: none;
    display: block;
}
.t1-panel:hover {
    transform: translateY(-4px);
    border-color: rgba(245,180,0,0.35);
    color: var(--t1-text);
    text-decoration: none;
}
.t1-panel__num {
    font-family: var(--t1-display);
    font-weight: 700;
    font-size: 1.75rem;
    background: var(--t1-accent-grad);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
}
.t1-panel h3 {
    font-family: var(--t1-display);
    color: var(--t1-text);
    font-size: 1.25rem;
    margin: 8px 0 12px;
    letter-spacing: -0.01em;
}
.t1-panel p {
    margin: 0;
    color: var(--t1-text-2);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* ---------- Bullet list ---------- */
.t1-bullets {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
    columns: 2;
    column-gap: 48px;
}
.t1-bullets li {
    padding: 14px 0 14px 30px;
    position: relative;
    color: var(--t1-text);
    border-bottom: 1px dashed var(--t1-line);
    break-inside: avoid;
}
.t1-bullets li::before {
    content: "▸";
    position: absolute; left: 0;
    color: var(--t1-accent);
    font-size: 0.9rem;
    top: 15px;
}

/* ---------- FAQs ---------- */
.t1-faq dl {
    display: grid;
    gap: 22px;
    margin: 32px 0 0;
}
.t1-faq dt {
    font-family: var(--t1-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--t1-text);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}
.t1-faq dd {
    margin: 0;
    color: var(--t1-text-2);
    line-height: 1.65;
}

/* ---------- CTA band ---------- */
.t1-cta-band {
    background: var(--t1-accent-grad);
    color: #1a0f0a;
    padding: 60px 0;
    text-align: center;
}
.t1-cta-band h3 {
    font-family: var(--t1-display);
    font-weight: 700;
    font-size: clamp(1.75rem, 3.4vw, 2.4rem);
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}
.t1-cta-band p {
    margin: 0 0 26px;
    font-size: 1.05rem;
    color: #2a1b14;
    opacity: 0.92;
}
.t1-cta-band a {
    background: #1a0f0a;
    color: var(--t1-accent);
    padding: 16px 36px;
    border-radius: var(--t1-radius-sm);
    font-weight: 700;
    text-decoration: none;
    font-family: var(--t1-sans);
    letter-spacing: 0.02em;
    display: inline-block;
    transition: transform 0.18s ease, background 0.18s ease;
}
.t1-cta-band a:hover {
    background: #000;
    color: var(--t1-text);
    transform: translateY(-2px);
    text-decoration: none;
}

/* ---------- Footer ---------- */
.t1-footer {
    border-top: 1px solid var(--t1-line);
    padding: 36px 0;
    text-align: center;
    color: var(--t1-text-3);
    font-size: 0.9rem;
}
.t1-footer__socials {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: center;
}
.t1-footer__socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: var(--t1-text-2);
    border: 1px solid var(--t1-line-strong);
    transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.t1-footer__socials a:hover {
    color: var(--t1-accent);
    border-color: var(--t1-accent);
    transform: translateY(-2px);
    text-decoration: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .t1-header__inner { padding: 14px 0; }
    .t1-nav { display: none; }
    .t1-hamburger { display: inline-flex; }

    .t1-hero { padding: 60px 0 70px; }
    .t1-hero__grid { grid-template-columns: 1fr; gap: 40px; }
    .t1-title { font-size: 2.2rem; }
    .t1-tagline { font-size: 1.05rem; }
    .t1-cta-group .t1-btn { flex: 1; justify-content: center; }

    .t1-scene {
        min-height: 400px;
        --t1-cube-w: 260px;
        --t1-cube-h: 347px;   /* keep 3:4 */
    }
    .t1-section { padding: 60px 0; }
    .t1-bullets { columns: 1; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .t1-cube { animation: none; }
    .t1-btn:hover, .t1-panel:hover, .t1-cta-band a:hover { transform: none; }
}
