/* ══════════════════════════════════════════════════════════════════════════
   PENZION U TŘEBOŇSKÉ MADONY — the world's tokens and the shell surfaces
   sites/penzion/css/world.css

   Loaded AFTER css/main.css (the reset). The token block below is copied
   verbatim from sites/thai/css/world.css lines 16–37 — the penzion shares the
   world's visual law. Every surface this page owns is scoped to a `cg-` class.

   Owns (relay 1): the design tokens, the header / `.cg-mark` / nav, the first
   viewport, the room-and-offer plane, the tour section (tourmkr iframe +
   poster fallback), the contact plane, the legal hub and the footer.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Tokens ──────────────────────────────────────────────────────────────── */

:root {
    --ground: #dfe7e4;
    --facet: #7d948c;
    --ink: #22302c;
    --serif: 'Gelasio', system-ui, sans-serif;
    --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Private tokens — relay C2 inherits the values if it wants them. */
    --cg-ground: #dfe7e4;
    --cg-facet: #7d948c;
    --cg-facet-deep: #4f6a61;
    --cg-facet-dark: #2c1424;
    --cg-ink: #22302c;
    --cg-ink-soft: #3b4c47;
    --cg-glint: #a93226;
    --cg-glint-press: #87281e;
    --cg-cut: rgba(34, 48, 44, 0.16);
    --cg-cut-strong: rgba(34, 48, 44, 0.30);
    --cg-paper: #f4f8f6;
}

/* ── Ground and body type law ────────────────────────────────────────────── */

body {
    background-color: var(--ground);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
}

/* Type law (world): headings, titles and prices are cut type — the serif
   voice. Everything else is set in the sans. */
h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 400;
    font-style: italic;
    color: var(--ink);
    text-wrap: balance;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

header {
    position: static;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 16px 20px;
    background-color: var(--cg-ground);
    border-bottom: 1px solid var(--cg-cut);
}

.cg-mark {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 8px 0;
    text-decoration: none;
    color: var(--ink);
}

.cg-mark-name {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.05rem, 0.82rem + 1.1vw, 1.45rem);
    line-height: 1.15;
    letter-spacing: 0.01em;
}

.cg-mark-sub {
    font-family: var(--sans);
    font-style: normal;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cg-ink-soft);
}

nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    min-width: 0;
}

nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 6px 12px;
    font-family: var(--sans);
    font-style: normal;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    background: none;
    border: 0;
    box-shadow: inset 0 -2px 0 0 transparent;
    transition: box-shadow 160ms ease, color 160ms ease;
}

nav a:hover,
nav a:focus-visible {
    color: var(--ink);
    box-shadow: inset 0 -2px 0 0 var(--cg-ink);
}

nav a:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

/* The header's single action — a cut-glass surface, not a second warm one. */
nav a.cg-nav-action {
    padding: 6px 16px;
    border: 1px solid var(--cg-facet-deep);
    box-shadow: inset 0 -2px 0 0 var(--cg-facet-deep);
    color: var(--ink);
}

nav a.cg-nav-action:hover,
nav a.cg-nav-action:focus-visible {
    color: var(--cg-facet-deep);
}

/* ── Cut-line divider — the page's only ornament ─────────────────────────── */

/* TEMPORARY — owner ruling 2026-11-07: the ornament is retired; the final divider
   law will be designed for both surfaces together. Until then the element stays in
   the markup as an invisible placeholder so the vertical rhythm is unchanged. */
.cg-cut {
    display: block;
    height: 14px;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
}

/* ── Section shells ──────────────────────────────────────────────────────── */

.cg-section {
    margin: 0;
    padding: 34px 20px 44px;
    background: transparent;
}

.cg-wrap {
    max-width: 1180px;
    min-width: 0;
    margin: 0 auto;
}

.cg-section-head {
    margin: 0 0 18px;
}

.cg-section-title {
    margin: 0;
    font-size: clamp(1.45rem, 1.15rem + 1.2vw, 2.05rem);
    line-height: 1.12;
}

.cg-section-note {
    margin: 8px 0 0;
    max-width: 62ch;
    font-size: 0.98rem;
    color: var(--cg-ink-soft);
}

/* ── First viewport — a frame, not full bleed ───────────────────────────── */

.cg-hero {
    position: relative;
    margin: 0;
    padding: 26px 20px 30px;
    overflow: visible;
}

.cg-hero-wrap {
    max-width: 1180px;
    min-width: 0;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    align-items: center;
}

.cg-hero-type {
    min-width: 0;
}

.cg-hero-kicker {
    margin: 0 0 10px;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cg-ink-soft);
}

.cg-hero-name {
    margin: 0;
    font-size: clamp(1.9rem, 1.35rem + 3.4vw, 3.3rem);
    line-height: 1.06;
}

/* Cut-glass frame around an untinted photograph. */
.cg-frame {
    position: relative;
    padding: 10px;
    background: linear-gradient(158deg,
            #9db0a8 0%,
            #c9d6d1 22%,
            #7d948c 48%,
            #b6c6c0 72%,
            #8ba098 100%);
    box-shadow: 0 18px 40px -18px rgba(34, 48, 44, 0.55);
    /* cut corners — chamfered, not rounded */
    clip-path: polygon(calc(100% - 26px) 0, 100% 26px,
            100% 100%, 26px 100%,
            0 calc(100% - 26px), 0 0);
}

.cg-frame::after {
    content: "";
    position: absolute;
    inset: 10px;
    pointer-events: none;
    clip-path: polygon(calc(100% - 26px) 0, 100% 26px,
            100% 100%, 26px 100%,
            0 calc(100% - 26px), 0 0);
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.45) 0%,
            rgba(255, 255, 255, 0.08) 26%,
            rgba(34, 48, 44, 0.12) 70%,
            rgba(255, 255, 255, 0.28) 100%);
    mix-blend-mode: screen;
}

.cg-frame img {
    display: block;
    width: 100%;
    height: auto;
}

/* The hero frame keeps the motive's own panoramic ratio — no crop. */
.cg-hero .cg-frame img {
    aspect-ratio: auto;
}

/* ── Actions ─────────────────────────────────────────────────────────────── */

.cg-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: stretch;
    padding: 18px 0 2px;
}

.cg-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 12px 22px;
    font-family: var(--sans);
    font-style: normal;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    text-align: center;
}

/* primary — the glint, and the only warm surface on the page */
a.cg-action-glint {
    flex: 1 1 300px;
    flex-direction: column;
    gap: 2px;
    background-color: var(--cg-glint);
    color: #ffffff;
    border: 1px solid var(--cg-glint);
    box-shadow: 0 10px 24px -12px rgba(169, 50, 38, 0.9);
    clip-path: polygon(calc(100% - 16px) 0, 100% 16px,
            100% 100%, 16px 100%,
            0 calc(100% - 16px), 0 0);
    transition: background-color 160ms ease;
}

a.cg-action-glint:hover,
a.cg-action-glint:focus-visible {
    background-color: var(--cg-glint-press);
    border-color: var(--cg-glint-press);
}


.cg-action-number {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.15;
    white-space: nowrap;
}

/* secondary — cut glass, no warm colour of its own */
a.cg-action-glass,
button.cg-action-glass {
    flex: 1 1 200px;
    background-color: var(--cg-facet-deep);
    color: #ffffff;
    border: 1px solid var(--cg-facet);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    clip-path: polygon(calc(100% - 16px) 0, 100% 16px,
            100% 100%, 16px 100%,
            0 calc(100% - 16px), 0 0);
    transition: background-color 160ms ease;
}

a.cg-action-glass:hover,
a.cg-action-glass:focus-visible,
button.cg-action-glass:hover,
button.cg-action-glass:focus-visible {
    background-color: var(--cg-ink-soft);
    border-color: var(--cg-facet-deep);
}

.cg-action:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
}

/* ── The room-and-offer plane ────────────────────────────────────────────── */

.cg-prose {
    margin: 0 0 24px;
    max-width: 72ch;
    font-size: 1.02rem;
}

.cg-prose p {
    margin: 0 0 12px;
}

.cg-prose p:last-child {
    margin-bottom: 0;
}

.cg-prose a {
    color: var(--cg-glint);
    text-decoration: underline;
}

.cg-prose-tail {
    margin-top: 22px;
    margin-bottom: 0;
}

.cg-cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.cg-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 20px;
    background-color: var(--cg-paper);
    border: 1px solid var(--cg-cut);
    box-shadow: inset 3px 0 0 0 var(--cg-facet);
    clip-path: polygon(calc(100% - 18px) 0, 100% 18px,
            100% 100%, 0 100%, 0 0);
}

.cg-card h3, .cg-card h2 {
    margin: 0;
    font-size: 1.12rem;
    line-height: 1.2;
}

.cg-card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--cg-ink);
}

.cg-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
}

.cg-card-actions > .cg-action {
    flex: 0 1 auto;
}

/* ── The tour section — the tourmkr iframe, with a poster fallback ────────── */

.cg-tour {
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    background-color: #0d1412;
    overflow: hidden;
    clip-path: polygon(calc(100% - 20px) 0, 100% 20px,
            100% 100%, 0 100%, 0 0);
}

.cg-tour-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    z-index: 0;
}

/* The poster sits over the iframe until it is live. It is also a real link,
   so with JavaScript off it stays the working way into the tour. */
.cg-tour-poster {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    text-decoration: none;
}

.cg-tour-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cg-tour-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg,
            rgba(13, 20, 18, 0.05) 0%,
            rgba(13, 20, 18, 0.00) 40%,
            rgba(13, 20, 18, 0.55) 100%);
}

.cg-tour.is-live .cg-tour-poster {
    display: none;
}

.cg-tour-play {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    background-color: var(--cg-glint);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    clip-path: polygon(calc(100% - 12px) 0, 100% 12px,
            100% 100%, 12px 100%,
            0 calc(100% - 12px), 0 0);
}

/* ── The contact plane ───────────────────────────────────────────────────── */

.cg-contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.cg-contact-card {
    min-width: 0;
    padding: 20px;
    background-color: var(--cg-paper);
    border: 1px solid var(--cg-cut);
    box-shadow: inset 3px 0 0 0 var(--cg-facet);
    clip-path: polygon(calc(100% - 18px) 0, 100% 18px,
            100% 100%, 0 100%, 0 0);
}

.cg-contact-card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.cg-contact-line {
    margin: 0 0 8px;
    font-size: 0.94rem;
    color: var(--cg-ink-soft);
}

/* Every link is a real tap target, even the short in-card and in-paragraph
   ones — an inline-flex box carries the 44px minimum. */
.cg-contact-line a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 0;
    color: var(--cg-glint);
    font-weight: 600;
    text-underline-offset: 3px;
}

.cg-contact-value {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* A standalone link is a target, not body text — the world's link floor. */
.cg-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 0;
    color: var(--cg-glint);
    font-weight: 600;
    text-decoration: underline;
}

.cg-contact-value a {
    display: inline-block;
    min-height: 44px;
    padding: 8px 0;
    color: var(--cg-glint);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cg-contact-value a:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

/* ── The contact form — a placeholder until DR-14's real form ─────────────── */

.cg-form-block {
    margin: 28px 0 0;
}

.cg-form-title {
    margin: 0 0 8px;
    font-family: var(--serif);
    font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem);
    line-height: 1.2;
}

.cg-form-note {
    margin: 0 0 20px;
    font-size: 0.94rem;
    color: var(--cg-ink-soft);
}

.cg-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 16px;
}

.cg-field label {
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.cg-field input,
.cg-field textarea {
    font: inherit;
    color: var(--ink);
    background-color: var(--cg-paper);
    border: 1px solid var(--cg-cut);
    padding: 10px 12px;
    min-height: 48px;
}

.cg-field textarea {
    min-height: 132px;
    resize: vertical;
}

.cg-field input:focus-visible,
.cg-field textarea:focus-visible {
    outline: 3px solid var(--cg-glint);
    outline-offset: 2px;
}

button.cg-action-glass {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.cg-form-submit {
    margin: 20px 0 0;
}

/* ── The legal hub — the document list (spec v23) ────────────────────────── */

.cg-docs {
    margin: 34px 0 0;
}

.cg-docs-title {
    margin: 0 0 10px;
    font-family: var(--serif);
    font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem);
    line-height: 1.2;
}

.cg-docs-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cg-docs-list li {
    border-top: 1px solid var(--cg-cut);
}

.cg-docs-list a {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 14px 0;
    color: var(--ink);
    text-decoration: none;
}

.cg-docs-list a:hover,
.cg-docs-list a:focus-visible {
    text-decoration: underline;
}

.cg-docs-meta {
    font-size: 0.86rem;
    color: var(--cg-ink-soft);
}

.cg-docs-note {
    margin: 16px 0 0;
    font-size: 0.94rem;
    color: var(--cg-ink-soft);
}

/* ── The footer ──────────────────────────────────────────────────────────── */

footer.cg-footer {
    margin: 0;
    padding: 30px 20px 34px;
    background-color: var(--cg-facet-deep);
    color: #ffffff;
    text-align: center;
    font-size: 0.92rem;
    clip-path: polygon(0 0, 100% 0,
            100% calc(100% - 30px), calc(100% - 30px) 100%,
            0 100%);
}

.cg-footer-inner {
    max-width: 1080px;
    margin: 0 auto;
}

.cg-footer h2 {
    margin: 0 0 10px;
    font-size: 1.15rem;
    color: #ffffff;
}

.cg-footer p {
    margin: 0 0 8px;
    font-family: var(--sans);
    font-style: normal;
    color: #ffffff;
    overflow-wrap: anywhere;
}

.cg-footer a {
    display: inline-block;
    min-height: 44px;
    min-width: 44px;
    padding: 6px 2px;
    color: #ffffff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 160ms ease;
}

.cg-footer a:hover,
.cg-footer a:focus-visible {
    color: var(--ground);
}

.cg-footer a:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

.cg-footer .cg-footer-sep {
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.55);
}

.cg-footer .cg-footer-addr {
    margin: 10px 0 0;
    font-weight: 600;
}

/* ── Wider viewports ─────────────────────────────────────────────────────── */

@media (min-width: 700px) {
    .cg-cards,
    .cg-contact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (min-width: 820px) {
    .cg-hero-wrap {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        gap: 28px 40px;
    }
}

/* ── 390 px — the primary device ─────────────────────────────────────────── */

@media (max-width: 768px) {
    header {
        padding: 14px 16px;
    }

    .cg-mark-name {
        font-size: 1.24rem;
    }

    nav {
        width: 100%;
        gap: 0;
    }

    nav a {
        flex: 1 1 44%;
        padding: 10px 8px;
        font-size: 0.86rem;
    }

    nav a.cg-nav-action {
        flex: 1 1 100%;
    }

    .cg-hero {
        padding: 18px 16px 24px;
    }

    .cg-hero-name {
        font-size: clamp(1.85rem, 8.4vw, 2.5rem);
    }

    .cg-hero-actions {
        flex-direction: column;
        gap: 10px;
        padding-top: 14px;
    }

    a.cg-action-glint,
    a.cg-action-glass,
    button.cg-action-glass {
        flex: 1 1 auto;
        width: 100%;
        min-height: 56px;
        padding: 14px 18px;
    }

    .cg-section {
        padding: 28px 16px 34px;
    }

    .cg-section-head {
        margin-bottom: 14px;
    }
}

.cg-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    justify-content: center;
    margin-top: 14px;
}

.cg-footer-nav a {
    color: inherit;
    font-size: inherit;
}

.cg-album {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cg-album li {
    margin: 0;
}

@media (min-width: 600px) {
    .cg-album {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 980px) {
    .cg-album {
        grid-template-columns: repeat(3, 1fr);
    }
}

.cg-booking-iframe {
    display: block;
    width: 100%;
    min-height: 620px;
    border: 0;
    background: var(--cg-paper);
}

/* Visually-hidden headings — the F5 law: headings leave the page visually, not structurally. */
.cg-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* The about block's three photographs — 3 up, and the ruled 3 → 1 switch at 480 px and below.
   No crop: the frames keep their own aspect ratios. */
.cg-photos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 26px;
}

/* The wellness block's frame holds text, so the cut-glass overlay (designed to wash a photograph)
   must not sit over it. The ring, the chamfer and the material are unchanged. */
.cg-frame--text::after {
    display: none;
}

.cg-frame--text .cg-card {
    min-height: 100%;
}

@media (max-width: 480px) {
    .cg-photos {
        grid-template-columns: minmax(0, 1fr);
    }
    .cg-photos > .cg-frame:nth-child(n + 2) {
        display: none;
    }
}

/* ── The gallery core — the surface's half of the seam (spec v12 §5.0 row 9) ──
   The behaviour and the default skin live in /shared/css/gallery.css; this surface
   supplies only its asset pattern (on the album's data-gallery-* attributes) and
   these token values. */
:root {
    --gallery-backdrop: rgba(34, 48, 44, 0.94);
    --gallery-ink: var(--cg-paper);
    --gallery-surface: rgba(244, 248, 246, 0.12);
    --gallery-edge: rgba(244, 248, 246, 0.35);
    --gallery-focus: var(--cg-paper);
    --gallery-chamfer: 16px;            /* the cut-corner law: 16px is the action law's own value */
    --gallery-stage-max: calc(100dvh - 150px);
}

/* The world's law is "no ornament beside the cut line", and the frame is the ornament.
   The shared chip is therefore off on this surface; the frame's own focus ring and the
   pointer affordance carry it. */
.cg-frame[data-cg-viewer]::before {
    content: none;
}

/* The core's focus ring replaces the frame's shadow; the world restates both here, since the core cannot know this world's shadow. */
.cg-frame[data-cg-viewer]:focus-visible {
    box-shadow: inset 0 0 0 3px var(--gallery-focus), 0 18px 40px -18px rgba(34, 48, 44, 0.55);
}
