/* ioan-kaleve.ro */

@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/font/cormorant-garamond-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: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/font/cormorant-garamond-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; font-display: swap; src: url(/font/cormorant-garamond-italic-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: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; font-display: swap; src: url(/font/cormorant-garamond-italic-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap; src: url(/font/source-sans-3-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: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap; src: url(/font/source-sans-3-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
	--bg: #2a160b;            /* page behind the sheet (under paper-dark.webp) */
	--bg-deep: #170b05;
	--on-bg: #f1e2c4;         /* text on the dark page */
	--on-bg-soft: #cdb08a;
	--gold: #dcb37a;          /* accent on the dark page, AA */
	--sheet: #f3e5c8;         /* parchment (under paper-light.webp) */
	--sheet-edge: rgba(120, 62, 22, .5);
	--ink: #2b1a10;           /* text on parchment */
	--ink-soft: #5e4430;      /* secondary text on parchment, AA */
	--sienna: #8a3f19;        /* links, accents on parchment, AA */
	--sienna-d: #6b2f12;
	--line: rgba(110, 66, 30, .28);
	--field: #fbf4e4;
	--ok: #2f5d24;
	--err: #9b1c12;
	--serif: "Cormorant Garamond", Garamond, "Times New Roman", serif;
	--sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
	--wrap: 1120px;
	--pad: clamp(1rem, 4vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--bg) url(/img/paper-dark.webp) repeat;
	color: var(--ink);
	font: 500 1.25rem/1.6 var(--serif);
}
img { max-width: 100%; height: auto; }
a { color: var(--sienna); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--sienna-d); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--sienna); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); font-style: italic; font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; background: var(--sheet); color: var(--ink); padding: .5rem 1rem; font: 600 1rem var(--sans); }
.skip:focus { top: 1rem; }
.kicker { font: 600 .8rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--sienna); margin: 0 0 .6rem; }
.lead { font-size: clamp(1.3rem, 2.4vw, 1.5rem); color: var(--ink-soft); max-width: 40em; }
.hint { font: .95rem/1.5 var(--sans); color: var(--ink-soft); }

/* header */
.hdr { color: var(--on-bg); }
.hdr-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.4rem; padding-bottom: 1.4rem; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--on-bg); line-height: 1; }
.brand:hover { color: var(--on-bg); }
.brand-name { font: italic 500 clamp(2rem, 5vw, 2.7rem)/1 var(--serif); color: var(--gold); }
.brand-sub { font: italic 500 1.1rem/1.2 var(--serif); color: var(--on-bg-soft); margin: .3rem 0 0 1.6rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .3rem 1.6rem; flex-wrap: wrap; }
.nav a { color: var(--on-bg); text-decoration: none; font-size: 1.2rem; font-weight: 600; padding: .3rem 0; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--gold); border-bottom-color: currentColor; }
.nav a[aria-current] { color: var(--gold); border-bottom-color: var(--gold); }
.nav a:focus-visible, .brand:focus-visible, .ftr a:focus-visible, .nav-tg:focus-visible { outline-color: var(--gold); }
.nav-tg { display: none; background: none; border: 1px solid rgba(241, 226, 196, .35); border-radius: 4px; color: var(--on-bg); padding: .55rem .6rem; cursor: pointer; }
.nav-tg-bars { display: flex; flex-direction: column; gap: 5px; width: 22px; }
.nav-tg-bars span { display: block; height: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.nav-tg[aria-expanded="true"] .nav-tg-bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-tg[aria-expanded="true"] .nav-tg-bars span:nth-child(2) { opacity: 0; }
.nav-tg[aria-expanded="true"] .nav-tg-bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
	.hdr-in { flex-wrap: wrap; }
	.nav-tg { display: block; }
	.nav { flex-basis: 100%; display: none; }
	.nav.open { display: block; }
	.nav ul { flex-direction: column; gap: 0; border-top: 1px solid rgba(241, 226, 196, .2); padding-top: .4rem; }
	.nav a { display: block; padding: .55rem 0; border-bottom: 0; }
	.nav a[aria-current] { border-bottom: 0; }
	.nav a[aria-current]::before { content: "· "; }
}

/* the parchment sheet */
main { flex: 1; }
.sheet {
	position: relative;
	background: var(--sheet) url(/img/paper-light.webp) repeat;
	border-radius: 3px;
	padding: clamp(1.5rem, 5vw, 3.75rem) clamp(1.1rem, 5vw, 4rem);
	box-shadow:
		inset 0 0 70px 6px var(--sheet-edge),
		inset 0 0 14px 2px rgba(90, 45, 15, .45),
		0 18px 40px rgba(0, 0, 0, .45);
}

/* ornament: a row of Dacian spirals */
.orn { border: 0; height: 28px; margin: clamp(2rem, 5vw, 3.2rem) auto; width: 132px; background: url(/img/spiral.svg) center / 28px no-repeat, url(/img/spiral.svg) left center / 20px no-repeat, url(/img/spiral.svg) right center / 20px no-repeat; opacity: .75; }

/* buttons */
.btns { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .6rem 1.3rem; border: 1px solid var(--sienna); border-radius: 3px; background: var(--sienna); color: #fff8ec; font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.btn:hover { background: var(--sienna-d); border-color: var(--sienna-d); color: #fff8ec; }
.btn-ghost { background: transparent; color: var(--sienna); }
.btn-ghost:hover { background: rgba(138, 63, 25, .1); color: var(--sienna-d); }
.btn:disabled { opacity: .6; cursor: wait; }

/* home */
.intro { display: grid; grid-template-columns: 1fr minmax(200px, 300px); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.intro h1 { font-size: clamp(3rem, 9vw, 5rem); margin-bottom: .3em; }
.intro-pic { margin: 0; justify-self: center; transform: rotate(1.5deg); }
.intro-pic img { display: block; border-radius: 2px; box-shadow: 0 10px 26px rgba(60, 30, 10, .35), 0 0 0 6px #fbf2df; }
@media (max-width: 700px) {
	.intro { grid-template-columns: 1fr; }
	.intro-pic { order: -1; max-width: 220px; }
}
.quote { max-width: 42em; margin: 0 auto; }
.quote blockquote { margin: 0; position: relative; font-style: italic; font-size: clamp(1.2rem, 2.2vw, 1.35rem); text-align: justify; hyphens: auto; }
.quote blockquote p:first-child { text-indent: 1.4em; }
.quote blockquote p:first-child::before { content: "„"; }
.quote blockquote p:last-child::after { content: "”"; }
.quote-by { text-align: right; font-weight: 700; font-style: italic; margin-top: .6rem; }
.quote-by::before { content: "- "; }
.areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2rem); }
@media (max-width: 860px) { .areas { grid-template-columns: 1fr; max-width: 30rem; margin: 0 auto; } }
.area { display: flex; flex-direction: column; padding: 1.4rem; border: 1px solid var(--line); border-radius: 3px; background: rgba(255, 249, 236, .4); text-decoration: none; color: var(--ink); transition: background .15s, box-shadow .15s; }
.area:hover { background: rgba(255, 249, 236, .75); box-shadow: 0 8px 20px rgba(90, 45, 15, .15); color: var(--ink); }
.area-pics { display: flex; justify-content: center; height: 130px; margin-bottom: 1rem; }
.area-pics img { width: auto; height: 120px; box-shadow: 0 4px 10px rgba(40, 20, 5, .35); margin: 0 -14px; transition: transform .2s; }
.area-pics img:nth-child(1) { transform: rotate(-6deg) translateY(6px); }
.area-pics img:nth-child(3) { transform: rotate(6deg) translateY(6px); }
.area-pics img:nth-child(2) { position: relative; z-index: 1; }
.area:hover .area-pics img:nth-child(1) { transform: rotate(-9deg) translate(-6px, 6px); }
.area:hover .area-pics img:nth-child(3) { transform: rotate(9deg) translate(6px, 6px); }
.area-spiral img { height: 110px; margin: 5px 0 0; box-shadow: none; border-radius: 16px; }
.area-t { font-size: 1.6rem; font-weight: 600; font-style: italic; color: var(--sienna); }
.area-d { color: var(--ink-soft); font-size: 1.1rem; line-height: 1.45; }

/* page heads */
.page-head { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.page-head .lead { margin-bottom: .4em; }

/* book grids */
.books { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: clamp(1.4rem, 3vw, 2.4rem) clamp(1rem, 2.5vw, 2rem); }
.books-sm { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.book > a, .book > div { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: var(--ink); height: 100%; }
.book-cover { display: block; margin-bottom: .8rem; }
.book-cover img { display: block; width: 100%; max-width: 190px; box-shadow: 0 6px 16px rgba(50, 25, 8, .35); }
.books-sm .book-cover img { max-width: 126px; }
/* like the old site: covers in sepia until pointed at */
.book > a .book-cover img { filter: sepia(.85) saturate(.8); transition: filter .25s, transform .25s; }
.book > a:hover .book-cover img, .book > a:focus-visible .book-cover img { filter: none; transform: translateY(-4px); }
.book-vol { font: 600 .75rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.book-t { font-size: 1.3rem; font-weight: 600; line-height: 1.2; margin-top: .2rem; }
.book-more { font: 600 .95rem var(--sans); color: var(--sienna); margin-top: .35rem; }
.book-more::after { content: " →"; }
.book > a:hover .book-t { color: var(--sienna); }

/* book page */
.crumbs { font: .95rem var(--sans); color: var(--ink-soft); margin-bottom: 1.6rem; }
.carte { display: grid; grid-template-columns: 240px 1fr; gap: clamp(1.5rem, 5vw, 4.5rem); align-items: start; }
.carte-side { position: sticky; top: 1.5rem; }
.carte-cover { display: block; width: 100%; max-width: 217px; box-shadow: 0 10px 24px rgba(50, 25, 8, .4); margin-bottom: 1.2rem; }
.carte-side h1 { font-size: 2.1rem; }
.carte-toc-t { font: 600 .75rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin: 1.4rem 0 .4rem; }
.carte-toc { margin: 0; padding: 0 0 0 1.3rem; font-size: 1.15rem; line-height: 1.35; }
.carte-toc li { margin: .3rem 0; }
@media (max-width: 760px) {
	.carte { grid-template-columns: 1fr; }
	.carte-side { position: static; display: grid; grid-template-columns: 120px 1fr; gap: 0 1.2rem; align-items: start; }
	.carte-cover { grid-row: span 4; }
	.carte-side h1 { font-size: 1.8rem; }
	.carte-toc-t { margin-top: .4rem; }
}
.poem { margin: 0 0 clamp(2.5rem, 6vw, 4rem); scroll-margin-top: 1.5rem; }
.poem h2 { font-style: italic; font-weight: 600; color: var(--sienna); margin-bottom: 1rem; }
.poem-s { font-size: clamp(1.2rem, 2.2vw, 1.35rem); line-height: 1.55; margin: 0 0 1.1em; }
.poem-n { font-size: 1rem; font-weight: 700; letter-spacing: .08em; color: var(--sienna); margin: 1.6em 0 .5em; }
.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 1.4rem; }
.pager a { display: flex; flex-direction: column; text-decoration: none; font-size: 1.3rem; font-weight: 600; font-style: italic; }
.pager span { font: 600 .75rem var(--sans); letter-spacing: .1em; text-transform: uppercase; font-style: normal; color: var(--ink-soft); }
.pager-prev span::before { content: "← "; }
.pager-next { margin-left: auto; text-align: right; }
.pager-next span::after { content: " →"; }

/* hermeneutics */
.herm { display: flex; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; max-width: 46rem; }
.herm img { flex: none; width: 180px; transform: rotate(-1.5deg); box-shadow: 0 8px 22px rgba(60, 30, 10, .35), 0 0 0 5px #fbf2df; }
@media (max-width: 600px) { .herm { flex-direction: column; align-items: flex-start; } }

/* contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }
.postcard { display: block; transform: rotate(-2deg); filter: drop-shadow(0 10px 18px rgba(50, 25, 8, .35)); margin: 0 0 1.6rem; }
.contact-mail { font-size: 1.35rem; font-weight: 600; overflow-wrap: anywhere; }
.form { background: rgba(255, 250, 240, .55); border: 1px solid var(--line); border-radius: 4px; padding: clamp(1.2rem, 3vw, 2rem); }
.form h2 { font-style: italic; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font: 600 .95rem/1.3 var(--sans); margin-bottom: .35rem; color: var(--ink); }
.field input, .field textarea { width: 100%; font: 1.05rem/1.45 var(--sans); color: var(--ink); background: var(--field); border: 1px solid rgba(110, 66, 30, .45); border-radius: 3px; padding: .65rem .75rem; }
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--sienna); outline-offset: 0; border-color: var(--sienna); }
.field.invalid input, .field.invalid textarea { border-color: var(--err); }
.err { font: 600 .9rem/1.3 var(--sans); color: var(--err); margin-top: .3rem; }
.err:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { font: 1rem/1.45 var(--sans); padding: .8rem 1rem; border-radius: 3px; margin-bottom: 1.2rem; border-left: 4px solid; }
.alert-ok { background: #e7efd9; color: var(--ok); }
.alert-err { background: #f6dfd6; color: var(--err); }
.cf-turnstile { min-height: 65px; }

/* privacy and other text pages */
.prose { max-width: 42em; }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }

/* footer */
.ftr { color: var(--on-bg-soft); font: 1rem/1.5 var(--sans); padding: 1.8rem 0 2.2rem; }
.ftr-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem; }
.ftr-copy { margin: 0; font: italic 500 1.1rem var(--serif); color: var(--gold); }
.ftr-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.ftr a { color: var(--on-bg-soft); text-decoration: none; }
.ftr a:hover { color: var(--gold); text-decoration: underline; }

@media print {
	body { background: #fff; }
	.hdr .nav, .nav-tg, .ftr-nav, .pager, .carte-toc, .carte-toc-t { display: none; }
	.sheet { box-shadow: none; background: #fff; padding: 0; }
}
