/* MediaMC Podpora - verejna cast. Tmavy editorial: dve pisma, hairlines, radius 0, zlata jen jako akcent. */

@font-face {
    font-family: "Cormorant Garamond";
    src: url("../fonts/cormorant-garamond.woff2") format("woff2");
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Jost";
    src: url("../fonts/jost.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --noir: #0B0B0C;
    --noir-2: #141416;
    --noir-3: #1B1B1E;
    --paper: #F3EFE7;
    --paper-70: rgba(243, 239, 231, .72);
    --paper-55: rgba(243, 239, 231, .56);
    --paper-12: rgba(243, 239, 231, .14);
    --paper-06: rgba(243, 239, 231, .06);
    --gold: #C8A24A;
    --gold-soft: rgba(200, 162, 74, .16);
    --danger: #E07A66;
    --danger-soft: rgba(224, 122, 102, .14);
    --ok: #8FC28D;
    --ok-soft: rgba(143, 194, 141, .14);
    --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --font-text: "Jost", "Segoe UI", system-ui, -apple-system, sans-serif;
    --measure: 760px;
    --gutter: clamp(20px, 5vw, 48px);
    --control-h: 54px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--noir);
    color: var(--paper);
    font-family: var(--font-text);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration-color: var(--paper-55); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--noir); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 12px; z-index: 100; padding: 10px 14px; background: var(--paper); color: var(--noir); font-size: 14px; }
.skip-link:focus { left: 12px; }

/* --- rozvrzeni --- */
.site-header, .site-footer, .site-main { width: 100%; }
.site-header {
    border-bottom: 1px solid var(--paper-12);
}
.site-header__inner, .site-footer__inner, .site-main__inner {
    width: min(100% - 2 * var(--gutter), var(--measure));
    margin: 0 auto;
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
}
.brand { display: inline-flex; align-items: baseline; gap: 12px; text-decoration: none; }
.brand__mark { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: .08em; color: var(--paper); }
.brand__sub { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--paper-55); }
.site-header__nav a { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--paper-70); text-decoration: none; padding: 8px 0; border-bottom: 1px solid transparent; }
.site-header__nav a:hover, .site-header__nav a:focus-visible { color: var(--paper); border-bottom-color: var(--gold); outline: none; }

.site-main { flex: 1; padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 9vw, 120px); }
.site-main__inner > * + * { margin-top: 0; }

.site-footer { border-top: 1px solid var(--paper-12); }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: center; justify-content: space-between; padding: 22px 0; font-size: 13px; color: var(--paper-55); }
.site-footer a { color: var(--paper-70); text-decoration: none; }
.site-footer a:hover { color: var(--paper); text-decoration: underline; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* --- typografie --- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: -.005em; }
h1 { font-size: clamp(34px, 6vw, 50px); }
h2 { font-size: clamp(24px, 4vw, 30px); }
h3 { font-size: 22px; }
.kicker { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }
.lead { font-size: 18px; color: var(--paper-70); margin: 16px 0 0; max-width: 60ch; }
.intro { margin-bottom: clamp(36px, 6vw, 56px); }
p { margin: 0 0 1em; }
.muted { color: var(--paper-55); }
.hr { border: 0; border-top: 1px solid var(--paper-12); margin: clamp(28px, 5vw, 44px) 0; }

/* --- oznameni --- */
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--paper-12); border-left: 2px solid var(--gold); background: var(--noir-2); margin: 0 0 28px; font-size: 15px; }
.notice--ok { border-left-color: var(--ok); }
.notice--warn { border-left-color: var(--gold); }
.notice--error { border-left-color: var(--danger); }
.notice strong { font-weight: 500; }
.notice p { margin: 0; }

/* --- formulare --- */
.form { display: grid; gap: 26px; }
.form__row { display: grid; gap: 26px; }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 8px; min-width: 0; }
.field__label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--paper-70); display: flex; justify-content: space-between; gap: 12px; }
.field__label .optional { text-transform: none; letter-spacing: 0; color: var(--paper-55); font-size: 13px; }
.field__hint { font-size: 14px; color: var(--paper-55); margin: 0; }
.field__error { font-size: 14px; color: var(--danger); margin: 0; }
.input, .select, .textarea {
    width: 100%;
    min-height: var(--control-h);
    padding: 12px 14px;
    background: var(--noir-2);
    color: var(--paper);
    border: 0;
    border-bottom: 1px solid var(--paper-12);
    border-radius: 0;
    font: inherit;
    font-size: 17px;
    transition: border-color .25s var(--ease), background .25s var(--ease);
    appearance: none;
    -webkit-appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--paper-55); }
.input:hover, .select:hover, .textarea:hover { background: var(--noir-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-bottom-color: var(--gold); background: var(--noir-3); }
.field--error .input, .field--error .select, .field--error .textarea { border-bottom-color: var(--danger); }
.textarea { min-height: 180px; resize: vertical; line-height: 1.55; }
.select-wrap { position: relative; }
.select { padding-right: 44px; cursor: pointer; }
.select-wrap::after { content: ""; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; border-right: 1px solid var(--paper-70); border-bottom: 1px solid var(--paper-70); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select option { background: var(--noir-2); color: var(--paper); }

.choice { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; font-size: 16px; line-height: 1.45; padding: 6px 0; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice__box { flex: 0 0 22px; width: 22px; height: 22px; margin-top: 2px; border: 1px solid var(--paper-55); background: var(--noir-2); position: relative; transition: border-color .2s var(--ease), background .2s var(--ease); }
.choice--radio .choice__box { border-radius: 50%; }
.choice input:checked + .choice__box { border-color: var(--gold); background: var(--gold); }
.choice input:checked + .choice__box::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border-right: 2px solid var(--noir); border-bottom: 2px solid var(--noir); transform: rotate(45deg); }
.choice--radio input:checked + .choice__box::after { left: 6px; top: 6px; width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--noir); transform: none; }
.choice input:focus-visible + .choice__box { outline: 2px solid var(--gold); outline-offset: 3px; }
.choice__text small { display: block; color: var(--paper-55); font-size: 14px; }
.choice-group { display: grid; gap: 4px; }
.choice-group--inline { grid-template-columns: 1fr; }
@media (min-width: 640px) { .choice-group--inline { grid-template-columns: 1fr 1fr; gap: 12px; } }
.field--error .choice__box { border-color: var(--danger); }

.hp-field { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; }

/* prilohy */
.file-drop { border: 1px dashed var(--paper-12); background: var(--noir-2); padding: 18px; display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: space-between; transition: border-color .2s var(--ease); }
.file-drop:hover, .file-drop.is-over { border-color: var(--gold); }
.file-drop__text { font-size: 15px; color: var(--paper-70); margin: 0; }
.file-drop input[type="file"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-drop__button { flex: 0 0 auto; }
.file-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; color: var(--paper-70); }
.file-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--paper-06); }
.file-list li span:last-child { color: var(--paper-55); white-space: nowrap; }

/* tlacitka */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: var(--control-h); padding: 0 28px;
    font: inherit; font-size: 14px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
    background: var(--paper); color: var(--noir); border: 1px solid var(--paper); border-radius: 0;
    cursor: pointer; text-decoration: none;
    transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover, .btn:focus-visible { background: var(--gold); border-color: var(--gold); color: var(--noir); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: wait; }
.btn--ghost { background: transparent; color: var(--paper); border-color: var(--paper-12); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: transparent; border-color: var(--gold); color: var(--gold); }
.btn--small { min-height: 40px; padding: 0 18px; font-size: 12px; }
.btn--block { width: 100%; }
.form__actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; justify-content: space-between; padding-top: 6px; }
.form__actions .muted { font-size: 14px; }

/* --- stranka pozadavku --- */
.ticket-head { display: grid; gap: 14px; margin-bottom: clamp(28px, 5vw, 44px); }
.ticket-head__meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--paper-55); align-items: center; }
.ticket-head__number { font-family: var(--font-display); font-size: 20px; color: var(--gold); letter-spacing: .04em; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--paper-12); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--paper); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; background: var(--paper-55); }
.pill--new::before, .pill--open::before { background: var(--gold); }
.pill--waiting_client::before { background: var(--danger); }
.pill--resolved::before { background: var(--ok); }
.pill--closed::before { background: var(--paper-55); }
.pill--urgent { border-color: var(--danger); color: var(--danger); }
.pill--urgent::before { background: var(--danger); }

.thread { list-style: none; margin: 0; padding: 0; }
.thread__item { padding: clamp(22px, 4vw, 32px) 0; border-top: 1px solid var(--paper-12); }
.thread__item:last-child { border-bottom: 1px solid var(--paper-12); }
.thread__item--agent { padding-left: 20px; border-left: 2px solid var(--gold); }
.thread__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-bottom: 12px; font-size: 14px; color: var(--paper-55); }
.thread__author { color: var(--paper); font-weight: 500; font-size: 15px; }
.thread__org { color: var(--gold); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.thread__body p { margin: 0 0 .9em; overflow-wrap: anywhere; }
.thread__body p:last-child { margin-bottom: 0; }
.thread__body a { color: var(--gold); text-decoration-color: var(--gold); }
.attachments { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.attachments li a { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--paper-12); font-size: 14px; color: var(--paper-70); text-decoration: none; max-width: 100%; }
.attachments li a:hover { border-color: var(--gold); color: var(--paper); }
.attachments li a span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.attachments li a span:last-child { color: var(--paper-55); white-space: nowrap; }
.attachments__thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.attachments__thumbs a { display: block; border: 1px solid var(--paper-12); }
.attachments__thumbs img { display: block; width: auto; max-width: 100%; height: 120px; object-fit: cover; }

.reply { margin-top: clamp(36px, 6vw, 56px); }
.reply h2 { margin-bottom: 20px; }
.closed-box { padding: 22px; border: 1px solid var(--paper-12); background: var(--noir-2); }
.closed-box p { margin: 0 0 14px; }

/* --- pomocne stranky --- */
.prose { max-width: 66ch; }
.prose h2 { margin: 1.6em 0 .5em; }
.error-page { text-align: center; padding: 40px 0; }
.error-page h1 { margin-bottom: 14px; }
.error-page p { color: var(--paper-70); max-width: 52ch; margin: 0 auto 24px; }

/* --- pohyb --- */
.reveal { opacity: 0; transform: translateY(8px); animation: reveal .6s var(--ease) forwards; }
.reveal--2 { animation-delay: .08s; }
.reveal--3 { animation-delay: .16s; }
@keyframes reveal { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { animation: none; opacity: 1; transform: none; }
    *, *::before, *::after { transition: none !important; }
}

/* --- male obrazovky --- */
@media (max-width: 480px) {
    body { font-size: 16px; }
    .site-header__inner { min-height: 64px; }
    .brand__mark { font-size: 21px; }
    .brand__sub { letter-spacing: .14em; font-size: 12px; }
    .input, .select, .textarea { font-size: 16px; }
    .btn { width: 100%; }
    .form__actions { flex-direction: column; align-items: stretch; }
    .file-drop { flex-direction: column; align-items: stretch; }
    .attachments li a span:first-child { max-width: 200px; }
    .thread__item--agent { padding-left: 14px; }
}
@media print {
    body { background: #fff; color: #000; }
    .site-header, .site-footer, .reply, .btn { display: none !important; }
}
