:root {
  --paper: #f5efe4;
  --paper-2: #fbf7f0;
  --card: #fffdf9;
  --ink: #1b2326;
  --ink-2: #3a4549;
  --line: #ddd3c3;
  --line-2: #c9bca8;
  --accent: #0f5c56;
  --accent-ink: #ffffff;
  --link: #0b5049;
  --focus: #b4530a;
  --sos-bg: #fbe6e1;
  --sos-ink: #6b1410;
  --sos-btn: #8c120c;
  --shadow: 0 1px 0 rgba(60, 40, 10, .04), 0 10px 30px -18px rgba(60, 40, 10, .35);

  /* hero: warm dusk */
  --sky-top: #f2c9a9;
  --sky-mid: #f6dcc0;
  --sky-low: #f9ead6;
  --sun-core: #ffcf8a;
  --sun-disc: #fff1d6;
  --star: transparent;
  --hill-1a: #d7b9a0; --hill-1b: #cfae93;
  --hill-2a: #b58c74; --hill-2b: #a67e67;
  --hill-3a: #6f7d6b; --hill-3b: #627060;
  --hill-4a: #3f5249; --hill-4b: #34463e;
  --house: #4d4038; --house-edge: #2e2621;
  --road: #ead2b4; --road-edge: #8a6a4f;
  --grass: #2a3a33;
  --ridge: #fff3e2; --ridge-2: #c9d3b8; --haze: #fbe7cf; --tree: #8f6f5c; --tree-2: #4e5e4d; --smoke: #ffffff; --bird: #7a5a48;

  /* shelf tones (emblem chip + number), each tuned for AAA text where used as text */
  --t-red: #8c120c;    --t-red-bg: #f7dfda;
  --t-teal: #0a514c;   --t-teal-bg: #d8ece8;
  --t-amber: #683f00;  --t-amber-bg: #f6e6c6;
  --t-rose: #8e1f4f;   --t-rose-bg: #f6dde6;
  --t-violet: #5a2d82; --t-violet-bg: #e7def2;
  --t-green: #26561f;  --t-green-bg: #dfeccf;
  --t-slate: #1d4677;  --t-slate-bg: #dbe6f3;
  --t-indigo: #2f3a85; --t-indigo-bg: #dfe2f4;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111820; --paper-2: #16202a; --card: #1a2530;
    --ink: #f1ece4; --ink-2: #cfc8bd; --line: #2b3946; --line-2: #3a4b5a;
    --accent: #7fd1c6; --accent-ink: #0b1f1d; --link: #92dbd1; --focus: #ffb36b;
    --sos-bg: #3a1714; --sos-ink: #ffd9d3; --sos-btn: #ff8a7d;
    --shadow: 0 1px 0 rgba(0,0,0,.2), 0 14px 34px -20px rgba(0,0,0,.8);
    --sky-top: #0c1626; --sky-mid: #1b2a45; --sky-low: #4a4e70;
    --sun-core: #f7d9a6; --sun-disc: #fbe9c8; --star: #f3ead8;
    --hill-1a: #3a4772; --hill-1b: #313d63;
    --hill-2a: #2b3558; --hill-2b: #252e4d;
    --hill-3a: #1f2742; --hill-3b: #1a2139;
    --hill-4a: #141b2c; --hill-4b: #111726;
    --house: #2a3350; --house-edge: #9aa5cf;
    --road: #3a4157; --road-edge: #8e8aa0; --grass: #050a10;
    --ridge: #8a93b8; --ridge-2: #4b5778; --haze: #2a3150; --tree: #161d2d; --tree-2: #0d131d; --smoke: #c9cde0; --bird: transparent;
    --t-red: #ffaba2;    --t-red-bg: #522320;
    --t-teal: #8fe0d5;   --t-teal-bg: #174440;
    --t-amber: #f5c97a;  --t-amber-bg: #4a3814;
    --t-rose: #f6a9c8;   --t-rose-bg: #4d2035;
    --t-violet: #d2b6f2; --t-violet-bg: #3a2953;
    --t-green: #b6dd9c;  --t-green-bg: #26401d;
    --t-slate: #a9cdf5;  --t-slate-bg: #213b5c;
    --t-indigo: #bcc4f6; --t-indigo-bg: #2a3160;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111820; --paper-2: #16202a; --card: #1a2530;
  --ink: #f1ece4; --ink-2: #cfc8bd; --line: #2b3946; --line-2: #3a4b5a;
  --accent: #7fd1c6; --accent-ink: #0b1f1d; --link: #92dbd1; --focus: #ffb36b;
  --sos-bg: #3a1714; --sos-ink: #ffd9d3; --sos-btn: #ff8a7d;
  --shadow: 0 1px 0 rgba(0,0,0,.2), 0 14px 34px -20px rgba(0,0,0,.8);
  --sky-top: #0c1626; --sky-mid: #1b2a45; --sky-low: #4a4e70;
  --sun-core: #f7d9a6; --sun-disc: #fbe9c8; --star: #f3ead8;
  --hill-1a: #3a4772; --hill-1b: #313d63;
  --hill-2a: #2b3558; --hill-2b: #252e4d;
  --hill-3a: #1f2742; --hill-3b: #1a2139;
  --hill-4a: #141b2c; --hill-4b: #111726;
  --house: #2a3350; --house-edge: #9aa5cf;
  --road: #3a4157; --road-edge: #8e8aa0; --grass: #050a10;
    --ridge: #8a93b8; --ridge-2: #4b5778; --haze: #2a3150; --tree: #161d2d; --tree-2: #0d131d; --smoke: #c9cde0; --bird: transparent;
  --t-red: #ffaba2;    --t-red-bg: #522320;
  --t-teal: #8fe0d5;   --t-teal-bg: #174440;
  --t-amber: #f5c97a;  --t-amber-bg: #4a3814;
  --t-rose: #f6a9c8;   --t-rose-bg: #4d2035;
  --t-violet: #d2b6f2; --t-violet-bg: #3a2953;
  --t-green: #b6dd9c;  --t-green-bg: #26401d;
  --t-slate: #a9cdf5;  --t-slate-bg: #213b5c;
  --t-indigo: #bcc4f6; --t-indigo-bg: #2a3160;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--card); color: var(--ink); padding: 10px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; }

/* topbar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px max(24px, calc((100vw - 1120px) / 2 + 24px)); background: color-mix(in srgb, var(--paper) 92%, transparent); border-bottom: 1px solid var(--line); }
.brand { font: 600 19px/1 var(--sans); letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.top-nav { display: flex; align-items: center; gap: 22px; }
.top-nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.top-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.theme { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: none; color: var(--ink); cursor: pointer; border-radius: 50%; }
.theme svg { width: 20px; height: 20px; }

/* hero */
.hero { position: relative; overflow: hidden; }
.hero-art { position: absolute; inset: 0; -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.hero-art svg { width: 100%; height: 100%; display: block; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--paper) 88%, transparent) 0%, color-mix(in srgb, var(--paper) 62%, transparent) 38%, transparent 64%); }
.hero-text { position: relative; padding-top: 76px; padding-bottom: 150px; }
.kicker { margin: 0 0 18px; font-size: 14px; letter-spacing: .02em; color: var(--ink-2); font-weight: 600; }
h1, h2, h3 { text-wrap: balance; }
h1 { font: 600 clamp(38px, 5.6vw, 66px)/1.04 var(--serif); letter-spacing: -.015em; margin: 0; max-width: 13ch; text-wrap: balance; }
.lead { font-size: clamp(18px, 1.9vw, 21px); line-height: 1.55; max-width: 34ch; margin: 22px 0 0; color: var(--ink); }
.glow { animation: breathe 6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.lanterns circle:first-child { animation: breathe 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.lanterns g:nth-child(2) circle:first-child { animation-delay: -1.2s; }
.lanterns g:nth-child(3) circle:first-child { animation-delay: -2.4s; }
.lanterns g:nth-child(4) circle:first-child { animation-delay: -3.6s; }
@keyframes breathe { 0%, 100% { opacity: .78; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .glow, .lanterns circle { animation: none !important; } }

/* SOS strip */
.sos { position: relative; margin: -46px 0 0; display: flex; align-items: center; gap: 18px; justify-content: space-between; background: var(--sos-bg); color: var(--sos-ink); border-radius: 18px; padding: 18px 20px 18px 24px; box-shadow: var(--shadow); }
.sos-text strong { display: block; font-size: 17px; margin-bottom: 2px; }
.sos-text span { font-size: 15.5px; line-height: 1.5; }
.sos-btn { flex: none; display: inline-flex; align-items: center; gap: 10px; background: var(--sos-btn); color: var(--sos-bg); font-weight: 700; font-size: 17px; text-decoration: none; padding: 13px 20px; border-radius: 999px; }
.sos-btn svg { width: 20px; height: 20px; }

/* finder */
.finder { margin: 56px 0 8px; }
.finder h2 { font: 600 30px/1.2 var(--serif); margin: 0 0 16px; }
.search { position: relative; display: block; max-width: 640px; }
.search svg { position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.search input { width: 100%; font: inherit; font-size: 17px; color: var(--ink); background: var(--card); border: 1.5px solid var(--line-2); border-radius: 14px; padding: 15px 16px 15px 50px; }
.search input::placeholder { color: var(--ink-2); opacity: 1; }
.search input:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips a { text-decoration: none; color: var(--ink); background: var(--paper-2); border: 1px solid var(--line-2); padding: 8px 14px; border-radius: 999px; font-size: 15px; }
.chips a:hover { border-color: var(--ink-2); }
.none { margin: 20px 0 0; padding: 16px 18px; background: var(--paper-2); border-radius: 12px; border: 1px dashed var(--line-2); }

/* shelves */
.shelf { margin-top: 64px; }
.shelf[data-tone="red"] { --tone: var(--t-red); --tone-bg: var(--t-red-bg); }
.shelf[data-tone="teal"] { --tone: var(--t-teal); --tone-bg: var(--t-teal-bg); }
.shelf[data-tone="amber"] { --tone: var(--t-amber); --tone-bg: var(--t-amber-bg); }
.shelf[data-tone="rose"] { --tone: var(--t-rose); --tone-bg: var(--t-rose-bg); }
.shelf[data-tone="violet"] { --tone: var(--t-violet); --tone-bg: var(--t-violet-bg); }
.shelf[data-tone="green"] { --tone: var(--t-green); --tone-bg: var(--t-green-bg); }
.shelf[data-tone="slate"] { --tone: var(--t-slate); --tone-bg: var(--t-slate-bg); }
.shelf[data-tone="indigo"] { --tone: var(--t-indigo); --tone-bg: var(--t-indigo-bg); }
.shelf-h { display: block; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.shelf-n { display: block; font: 700 14px/1 var(--sans); color: var(--tone); letter-spacing: .08em; margin-bottom: 8px; }
.shelf-h h2 { font: 600 clamp(25px, 2.8vw, 32px)/1.2 var(--serif); margin: 0; letter-spacing: -.01em; }
.shelf-h p { margin: 4px 0 0; color: var(--ink-2); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card { position: relative; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 22px; box-shadow: var(--shadow); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-3px); border-color: var(--tone); }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }
.card.wide { grid-column: 1 / -1; background: linear-gradient(160deg, var(--tone-bg) 0%, var(--card) 62%); }
.card.wide .em { background: var(--card); }
.card.span2 { grid-column: 1 / -1; }

.card .ch { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.card .em { flex: none; width: 46px; height: 46px; border-radius: 13px; background: var(--tone-bg); display: grid; place-items: center; }
.card .em svg { width: 28px; height: 28px; fill: none; stroke: var(--tone); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.card .tag { font-size: 14px; font-weight: 700; color: var(--tone); line-height: 1.3; }
.card:hover h3 { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.card h3 { font: 600 21px/1.25 var(--serif); margin: 0; letter-spacing: -.005em; }
.card p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.card.wide h3 { font-size: clamp(26px, 2.6vw, 34px); }
.card.wide p { font-size: 17px; max-width: 60ch; }
.card[hidden], .shelf[hidden] { display: none; }

@media (min-width: 1021px) {
  .shelf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 18px; align-items: start; }
  .shelf-h { position: sticky; top: 84px; border-bottom: 0; border-top: 2px solid var(--tone); padding-top: 18px; margin-bottom: 0; padding-right: 12px; }
  .shelf-h h2 { font-size: 30px; }
  .shelf .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* about */
.about { margin: 88px 0 24px; padding: 34px 32px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 22px; }
.about h2 { font: 600 28px/1.2 var(--serif); margin: 0 0 22px; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px 28px; }
.about h3 { font: 700 16px/1.3 var(--sans); margin: 0 0 6px; }
.about p { margin: 0; color: var(--ink-2); font-size: 16px; }
.about .caveat { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 15.5px; }

.foot { background: var(--paper-2); border-top: 1px solid var(--line); margin-top: 56px; padding: 40px 0 56px; color: var(--ink-2); font-size: 15.5px; }
.foot p { margin: 0 0 8px; }
.foot .fine { margin-top: 18px; font-size: 14px; }

@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 16px; }
  .top { padding: 12px 16px; }
  .top-nav { gap: 14px; }
  .top-nav a[href="/proiecte/"] { display: none; }
  .hero-art { position: absolute; inset: 0; }
  .hero-art svg { height: 100%; }
  .hero-art::after { background: linear-gradient(180deg, color-mix(in srgb, var(--paper) 90%, transparent) 0%, color-mix(in srgb, var(--paper) 78%, transparent) 55%, transparent 100%); }
  .hero-text { padding-top: 26px; padding-bottom: 64px; }
  h1 { font-size: 34px; }
  .lead { font-size: 17px; margin-top: 12px; }
  .sos { margin-top: -40px; flex-direction: column; align-items: stretch; padding: 16px; gap: 12px; }
  .sos-text span { font-size: 15px; }
  .finder { margin-top: 28px; }
  .finder h2 { font-size: 24px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 14px -16px 0; padding: 0 16px 4px; }
  .chips a { white-space: nowrap; }
  .shelf { margin-top: 48px; }
  .sos-btn { justify-content: center; }
  .card.wide { grid-column: auto; }
  .cards { grid-template-columns: 1fr; }
  .card.span2 { grid-column: auto; }
  .card { padding: 18px; }
  .days { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .days .d { flex: none; }
  .day-note { display: none; }
  .about { padding: 26px 20px; }
}
@media print {
  .top, .hero-art, .search, .chips, .sos-btn { display: none; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* feature card: the strip of days */
.days { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 18px; }
.days .d { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 12px; font: 600 15px/1 var(--sans); color: var(--ink-2); background: var(--card); border: 1px solid var(--line); }
.days .d.past { color: var(--ink-2); background: transparent; border-style: dashed; }
.days .d.op { border-style: solid; border-color: var(--tone); color: var(--tone); }
.days .d.now { height: 40px; min-width: 64px; grid-auto-flow: column; gap: 5px; background: var(--tone); color: var(--card); border-color: var(--tone); font-size: 20px; gap: 0; align-content: center; box-shadow: 0 8px 20px -10px var(--tone); }
.days .d.now small { font-size: 13px; font-weight: 600; letter-spacing: .03em; }
.day-note { flex-basis: 100%; margin-top: 8px; font-size: 15.5px; line-height: 1.5; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--tone); border-radius: 10px; padding: 10px 14px; max-width: 46ch; }




:root[data-theme="dark"] .sunhalo { opacity: .5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sunhalo { opacity: .5; } }
@media (max-width: 760px) {
  .hero { display: flex; flex-direction: column; }
  .hero-art { position: relative; inset: auto; height: min(24svh, 170px); overflow: hidden; -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
  .hero-art svg { position: absolute; top: auto; bottom: 0; left: 50%; width: auto; height: 165%; aspect-ratio: 1200 / 560; transform: translateX(-68%); }
  .hero-art::after { display: none; }
  .hero-text { padding-top: 4px; padding-bottom: 60px; }
  .chips { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .about { margin-top: 56px; }
}

@media (max-width: 760px) {
  .card { padding: 16px 16px 16px; border-radius: 14px; }
  .card .ch { margin-bottom: 4px; }
  .card .em { width: 36px; height: 36px; border-radius: 10px; }
  .card .em svg { width: 22px; height: 22px; }
  .card h3 { font-size: 19px; }
  .card p { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .card.wide p { -webkit-line-clamp: 3; }
  .cards { gap: 10px; grid-template-columns: minmax(0, 1fr) !important; }
  .card { min-width: 0; }
  .finder h2 { margin-bottom: 12px; }
  .days { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .days .d { flex: none; }
  .day-note { display: none; }
}
