/*
 * Κρήτη FM «Κλίμακα»: tokens, fonts, reset, type, buttons, forms, prose.
 * Fonts: Fira Sans and Fira Sans Extra Condensed, SIL Open Font License 1.1 (assets/fonts/OFL.txt).
 */

/* ---------- Fonts (latin + greek subsets, swap) ---------- */
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/fira-sans-400-greek.woff2) format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/fira-sans-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/fira-sans-500-greek.woff2) format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/fira-sans-500-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/fira-sans-600-greek.woff2) format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/fira-sans-600-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans Extra Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/fira-sans-extra-condensed-400-greek.woff2) format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Fira Sans Extra Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/fira-sans-extra-condensed-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans Extra Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/fira-sans-extra-condensed-600-greek.woff2) format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Fira Sans Extra Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/fira-sans-extra-condensed-600-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans Extra Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/fira-sans-extra-condensed-800-greek.woff2) format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Fira Sans Extra Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/fira-sans-extra-condensed-800-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
	--bg: #1f2124;
	--deep: #15171a;
	--panel: #282b2f;
	--line: #3a3e43;
	--ink: #eef0f2;
	--mute: #9aa1a8;
	--or: #ff7f1f;
	--on-or: #1a1006;
	--or-glow: rgba(255, 127, 31, .55);
	--or-hover: #ff8f3a;
	--on-or-soft: #3a1d05; /* secondary text on orange */
	--panel-hover: #30343a;
	--panel-dim: #24272b;

	--font-text: "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-display: "Fira Sans Extra Condensed", "Fira Sans", "Arial Narrow", system-ui, sans-serif;

	--wrap: 1180px;
	--gutter: 24px;
	--radius: 8px;
	--header-h: 88px;
	--player-h: 66px;
	--focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink);

	color-scheme: dark;
}

@media (max-width: 599px) {
	:root { --gutter: 16px; --header-h: 72px; --player-h: 64px; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, svg, video, picture { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

body {
	min-height: 100vh;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-text);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; letter-spacing: -.005em; text-wrap: balance; }
h1 { font-weight: 800; font-size: clamp(40px, 5.2vw, 64px); }
h2 { font-weight: 800; font-size: clamp(30px, 3.6vw, 44px); }
h3 { font-weight: 600; font-size: 26px; }
h4, h5, h6 { font-weight: 600; font-size: 19px; line-height: 1.3; }
p { text-wrap: pretty; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-color: var(--mute); }

.kfm-lead { font-size: 20px; color: var(--mute); max-width: 40em; }
.kfm-meta { color: var(--mute); font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- Focus: always visible on keyboard, never orange (orange is for live things) ---------- */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 3px; }
#kfm-main:focus, #kfm-main:focus-visible, h1[tabindex="-1"]:focus { outline: none; }

/* ---------- Utilities ---------- */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.kfm-skip {
	position: absolute; left: 16px; top: 12px; z-index: 1000;
	padding: 10px 16px;
	background: var(--ink); color: var(--bg);
	font-weight: 600; text-decoration: none;
	border-radius: var(--radius);
	transform: translateY(-200%);
}
.kfm-skip:focus, .kfm-skip:focus-visible { transform: none; outline-color: var(--ink); }

.kfm-wrap {
	width: 100%;
	max-width: calc(var(--wrap) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.kfm-icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Buttons ---------- */
.kfm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 44px;
	padding: 10px 22px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--panel);
	color: var(--ink);
	font-family: var(--font-text);
	font-weight: 600; font-size: 16px; line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}
.kfm-btn:hover { border-color: var(--mute); }

/* The primary action, always live: the only orange button. */
.kfm-btn--live { background: var(--or); border-color: var(--or); color: var(--on-or); }
.kfm-btn--live:hover { background: var(--or-hover); border-color: var(--or-hover); }
.kfm-btn--live .kfm-icon { width: 18px; height: 18px; }
.kfm-btn--block { display: flex; width: 100%; }

/* ---------- Forms (search form and plain fields; the contact form styles itself later) ---------- */
input[type="text"], input[type="search"], input[type="email"], input[type="tel"], input[type="url"], textarea, select {
	width: 100%;
	min-height: 44px;
	padding: 10px 14px;
	background: var(--deep);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	color: var(--ink);
}
input:hover, textarea:hover, select:hover { border-color: #4d5258; }
input::placeholder, textarea::placeholder { color: var(--mute); opacity: 1; }
label { font-weight: 500; }

.search-form { display: flex; gap: 10px; align-items: stretch; max-width: 520px; }
.search-form label { flex: 1; }
.search-form .search-field { margin: 0; }
.search-form .search-submit {
	min-height: 44px; padding: 10px 20px;
	border: 1px solid var(--line); border-radius: var(--radius);
	background: var(--panel); color: var(--ink); font-weight: 600;
}
.search-form .search-submit:hover { border-color: var(--mute); }

/* ---------- Prose (page and article content) ---------- */
.kfm-prose { max-width: 720px; font-size: 18px; line-height: 1.7; }
.kfm-prose > * + * { margin-top: 1.1em; }
.kfm-prose h2 { font-size: 34px; margin-top: 1.6em; }
.kfm-prose h3 { font-size: 26px; margin-top: 1.5em; }
.kfm-prose h2 + *, .kfm-prose h3 + * { margin-top: .6em; }
.kfm-prose a { text-decoration-color: var(--mute); }
.kfm-prose a:hover { text-decoration-color: var(--ink); }
.kfm-prose ul, .kfm-prose ol { padding-left: 1.3em; }
.kfm-prose li + li { margin-top: .35em; }
.kfm-prose blockquote { padding-left: 20px; border-left: 3px solid var(--line); color: var(--mute); font-style: italic; }
.kfm-prose img { border-radius: var(--radius); }
.kfm-prose figcaption, .kfm-prose .wp-element-caption { margin-top: 8px; color: var(--mute); font-size: 14px; }
.kfm-prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }
.kfm-prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.kfm-prose th, .kfm-prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.kfm-prose .alignleft { float: left; margin: .3em 1.4em 1em 0; }
.kfm-prose .alignright { float: right; margin: .3em 0 1em 1.4em; }
.kfm-prose .aligncenter { margin-inline: auto; }

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