/* törésután.hu — landing page. Same look as the NED book ("Krónika", NED/tools/kezirat.css):
   ash-grey paper, charcoal labels, signal orange, oxidised teal; Zilla Slab / Alegreya / Barlow Condensed / Plex Mono.
   Fonts and the tape/staple/dice textures come from ned.css (generated by tools/sync-style.mjs).
   Light = bare :root, system dark = prefers-color-scheme (guarded), [data-theme] = the toggle's override. */

:root{
  --bg:#c7c9c4;
  --page:#eeeee9;
  --ink:#1b1c1e;
  --soft:#5b5e60;
  --accent:#bf4308;
  --orange:#ee6511;
  --accent2:#2b736b;
  --rule:#b1b3ac;
  --label-bg:#141517;
  --label-ink:#efeee8;
  --tape1:#ee6511;
  --tape2:#141517;
  --display:"Zilla Slab","Rockwell",Georgia,serif;
  --body:"Alegreya",Georgia,serif;
  --label:"Barlow Condensed","Arial Narrow",sans-serif;
  --mono:"IBM Plex Mono",monospace;
  --wrap:1120px;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#0b0c0e; --page:#17181b; --ink:#e9e7e0; --soft:#9b9d9f;
    --accent:#f27a24; --orange:#f27a24; --accent2:#5db5aa; --rule:#303236; --label-bg:#0c0d0f;
  }
}
:root[data-theme="dark"]{
  --bg:#0b0c0e; --page:#17181b; --ink:#e9e7e0; --soft:#9b9d9f;
  --accent:#f27a24; --orange:#f27a24; --accent2:#5db5aa; --rule:#303236; --label-bg:#0c0d0f;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg); color:var(--ink);
  font-family:var(--body); font-size:16.5px; line-height:1.6;
  -webkit-font-smoothing:antialiased; font-variant-numeric:lining-nums;
}
a{color:inherit}
img{display:block;max-width:100%}
.wrap{max-width:var(--wrap); margin:0 auto; padding:0 24px}

/* ---------- top bar ---------- */
.bar{display:flex; align-items:center; gap:18px; padding:16px 0 26px}
.brand{font-family:var(--display); font-weight:700; font-size:1.25rem; letter-spacing:.01em; text-decoration:none}
.brand::before{content:""; display:inline-block; width:22px; height:7px; margin-right:10px; vertical-align:.18em; background:var(--stripe-fine)}
.bar nav{margin-left:auto; display:flex; align-items:center; gap:6px 20px; flex-wrap:wrap; justify-content:flex-end}
.bar nav a{font-family:var(--label); font-weight:600; font-size:.95rem; letter-spacing:.12em; text-transform:uppercase; text-decoration:none; color:var(--soft)}
.bar nav a:hover{color:var(--accent)}
.btn{
  appearance:none; cursor:pointer; font-family:var(--label); font-weight:600; font-size:.85rem; letter-spacing:.1em; text-transform:uppercase;
  color:var(--soft); background:transparent; border:1.5px solid var(--rule); border-radius:6px; padding:4px 10px;
}
.btn:hover{color:var(--ink); border-color:var(--ink)}

/* ---------- hero: the book cover block, full width ---------- */
.hero{
  position:relative; display:flex; flex-direction:column; justify-content:flex-end;
  min-height:540px; padding:0 44px 42px; margin:0 -14px 64px;
  background:var(--orange); color:var(--label-ink);
}
.hero::before{content:""; position:absolute; top:-11px; left:-10px; right:26%; height:22px; z-index:3; background:var(--stripe-duct); clip-path:var(--torn); transform:rotate(-.8deg)}
.hero::after{content:""; position:absolute; inset:0; background:linear-gradient(0deg,rgba(20,21,23,.97) 6%,rgba(20,21,23,.78) 46%,rgba(20,21,23,.15) 88%)}
.hero-bg{position:absolute; inset:0; width:100%; height:100%; max-width:none; object-fit:cover; object-position:50% 40%; filter:grayscale(1) contrast(1.3) brightness(1.9); mix-blend-mode:multiply}
.hero>*:not(.hero-bg){position:relative; z-index:1}
.eyebrow{font-family:var(--label); font-weight:600; font-size:.92rem; letter-spacing:.18em; text-transform:uppercase; color:var(--orange); margin:0 0 8px}
.hero h1{font-family:var(--display); font-weight:700; font-size:clamp(3rem,9vw,6rem); line-height:.95; letter-spacing:-.01em; margin:0 0 18px; color:#f3f2ec}
.hero .lead{max-width:40em; margin:0 0 26px; font-size:1.12rem; line-height:1.6; color:#dcdbd3}
.hero .lead em{color:#f3f2ec}
.cta{display:flex; flex-wrap:wrap; gap:12px}
.cta a{
  display:inline-block; text-decoration:none; padding:10px 20px 9px;
  font-family:var(--label); font-weight:700; font-size:1.02rem; letter-spacing:.12em; text-transform:uppercase;
  border:2px solid var(--orange); border-radius:6px;
}
.cta a.primary{background:var(--orange); color:#141517}
.cta a.primary:hover{background:#ff7d2e; border-color:#ff7d2e}
.cta a.ghost{color:#f3f2ec}
.cta a.ghost:hover{background:rgba(238,101,17,.18)}
.hero .sub{margin:22px 0 0; font-family:var(--label); font-weight:500; font-size:.8rem; letter-spacing:.14em; text-transform:uppercase; color:#8e9195}

/* ---------- section titles: a strip of white masking tape (same as the book's H2) ---------- */
.tape{
  display:table; position:relative; isolation:isolate; max-width:100%;
  font-family:var(--display); font-weight:700; font-size:1.55rem; line-height:1.15;
  margin:0 0 22px; padding:6px 26px 7px; color:var(--sub-ink);
  transform:rotate(-.8deg); filter:drop-shadow(0 1.5px 1px rgba(0,0,0,.35));
}
.tape::before{content:""; position:absolute; inset:0; z-index:-1; background:var(--sub-tape); clip-path:var(--torn)}
.tape.r{transform:rotate(.7deg)}

/* ---------- the two entry sheets ---------- */
.doors{display:grid; grid-template-columns:1fr 1fr; gap:40px; margin-bottom:72px}
.sheet{
  position:relative; display:flex; flex-direction:column;
  background:var(--page); padding:40px 38px 34px; border-radius:2px;
  box-shadow:0 1px 0 rgba(0,0,0,.2),0 18px 36px rgba(0,0,0,.2);
}
.sheet .label{
  position:relative; background:var(--label-bg); color:var(--label-ink);
  margin:0 -14px 26px; padding:28px 24px 22px; min-height:190px;
  display:flex; flex-direction:column; justify-content:flex-end;
}
.sheet .label::before{content:""; position:absolute; top:-11px; left:-10px; right:30%; height:22px; background:var(--stripe-duct); clip-path:var(--torn); transform:rotate(-.8deg)}
.sheet h2{font-family:var(--display); font-weight:700; font-size:2.3rem; line-height:1.02; margin:0; color:#f3f2ec; max-width:58%; text-wrap:balance}
.sheet .label .eyebrow{max-width:58%}
.ch-no{
  position:absolute; left:22px; top:22px; display:grid; place-items:center; width:54px; height:54px;
  border-radius:12px; background:var(--orange); color:#141517; transform:rotate(-4deg);
  font-family:var(--display); font-weight:700; font-size:2rem; line-height:1; box-shadow:0 3px 0 rgba(0,0,0,.35);
}
.sheet .label.has-no{padding-top:96px}

/* black/orange duotone print, taped on with two pieces of red duct tape (the book's .banner) */
.print{
  position:absolute; margin:0; border:8px solid #f4f1e6; background:var(--orange);
  box-shadow:0 5px 12px rgba(0,0,0,.5);
}
.print img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; filter:grayscale(1) contrast(1.35) brightness(1.7); mix-blend-mode:multiply}
.print::before,.print::after{content:""; position:absolute; top:-14px; width:46px; height:15px; z-index:2; background:var(--photo-tape); clip-path:var(--torn)}
.print::before{left:-20px; transform:rotate(-36deg)}
.print::after{right:-20px; transform:rotate(38deg)}
.sheet .print{right:18px; top:-18px; width:40%; aspect-ratio:4/3; transform:rotate(3deg); z-index:3}
.sheet:nth-child(2) .print{transform:rotate(-2.5deg)}
.print.map img{filter:none; mix-blend-mode:normal}

.sheet p{margin:0 0 14px; hyphens:auto; text-align:justify}
.sheet .go{
  margin-top:auto; padding-top:12px; display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap;
}
.sheet .go a.open{
  text-decoration:none; font-family:var(--label); font-weight:700; font-size:1.05rem; letter-spacing:.12em; text-transform:uppercase;
  color:var(--accent); border-bottom:2px solid var(--orange); padding-bottom:1px;
}
.sheet .go a.open:hover{color:var(--ink)}
.sheet .go a.open::after{content:" →"}
.sublinks{list-style:none; margin:4px 0 14px; padding:0; display:flex; flex-wrap:wrap; gap:8px}
.sublinks a{
  display:inline-block; text-decoration:none; font-family:var(--label); font-weight:600; font-size:.9rem; letter-spacing:.08em; text-transform:uppercase;
  padding:3px 10px; border:1.5px solid var(--accent2); border-radius:5px; color:var(--accent2);
}
.sublinks a:hover{background:color-mix(in srgb,var(--accent2) 12%,transparent)}
.meta{font-family:var(--mono); font-size:.72rem; color:var(--soft)}

/* the whole sheet is the link target for pointer users; the real <a> stays for keyboard/screen readers */
.sheet .open::before{content:""; position:absolute; inset:0; z-index:0}
.sheet .sublinks,.sheet .sublinks a{position:relative; z-index:1}
.sheet:hover{box-shadow:0 1px 0 rgba(0,0,0,.2),0 22px 44px rgba(0,0,0,.28)}

/* ---------- staples / holes (the book's upper corners) ---------- */
.tp{position:absolute; width:42px; height:42px; z-index:2; pointer-events:none}
.tp::after{content:""; position:absolute; inset:0}
.tp.tl{top:12px; left:12px}
.tp.tl::after{background:var(--staple-l); transform:rotate(-3deg)}
.tp.tr{top:12px; right:12px}
.tp.tr::after{background:var(--staple-r); transform:rotate(4deg)}
.hole{position:absolute; width:42px; height:42px; z-index:1; pointer-events:none}
.hole.tr{top:12px; right:12px; transform:rotate(27deg)}
.hole.tl{top:12px; left:12px; transform:rotate(-21deg)}
.hole::before,.hole::after{
  content:""; position:absolute; top:50%; width:5.6px; height:5.6px; margin-top:-2.8px; border-radius:50%; background:var(--bg);
  box-shadow:inset 0 1.6px 1.6px rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.4),0 1px 1px 1px rgba(0,0,0,.1);
}
.hole::before{left:calc(50% - 14.8px)}
.hole::after{left:calc(50% + 9.2px)}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .tp.tl::after{background:var(--staple-l-dark)}
  :root:not([data-theme="light"]) .tp.tr::after{background:var(--staple-r-dark)}
  :root:not([data-theme="light"]) .hole::before,:root:not([data-theme="light"]) .hole::after{
    box-shadow:inset 0 1.6px 1.8px rgba(0,0,0,.95),0 0 0 1px rgba(255,255,255,.09),0 1px 0 1px rgba(0,0,0,.5)}
}
:root[data-theme="dark"] .tp.tl::after{background:var(--staple-l-dark)}
:root[data-theme="dark"] .tp.tr::after{background:var(--staple-r-dark)}
:root[data-theme="dark"] .hole::before,:root[data-theme="dark"] .hole::after{
  box-shadow:inset 0 1.6px 1.8px rgba(0,0,0,.95),0 0 0 1px rgba(255,255,255,.09),0 1px 0 1px rgba(0,0,0,.5)}

/* ---------- the world ---------- */
.world{position:relative; background:var(--page); padding:46px 52px 50px; border-radius:2px; margin-bottom:40px;
  box-shadow:0 1px 0 rgba(0,0,0,.2),0 18px 36px rgba(0,0,0,.2)}
.world .cols{display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:44px; align-items:start}
.world p{margin:0 0 14px; hyphens:auto; text-align:justify}
.world p.motto{font-family:var(--display); font-weight:600; font-size:1.3rem; line-height:1.3; color:var(--accent); text-align:left; margin-bottom:16px}
/* collage: three prints placed so that no print covers another one's caption */
.prints{position:relative; height:540px}
.prints .print{width:52%; aspect-ratio:1/1}
.prints .print:nth-child(1){left:0; top:8px; width:54%; transform:rotate(-3deg)}
.prints .print:nth-child(2){right:0; top:70px; aspect-ratio:3/2; transform:rotate(2.5deg)}
.prints .print:nth-child(3){left:20%; top:300px; transform:rotate(-1.5deg)}
.prints figcaption{
  position:absolute; left:-8px; bottom:-14px; z-index:3; padding:1px 8px; background:var(--label-bg); color:var(--label-ink);
  font-family:var(--label); font-weight:600; font-size:.74rem; letter-spacing:.12em; text-transform:uppercase;
}

/* ---------- footer: d6 divider + colophon ---------- */
.rule-orn{
  position:relative; height:30px; margin:46px 0 14px;
  background:linear-gradient(var(--rule),var(--rule)) left center/calc(50% - 111px) 1px no-repeat,
             linear-gradient(var(--rule),var(--rule)) right center/calc(50% - 111px) 1px no-repeat;
}
.rule-orn::after{
  content:""; position:absolute; left:50%; top:1px; width:194px; height:28px; margin-left:-97px;
  background:var(--orange); -webkit-mask:var(--dice) center/contain no-repeat; mask:var(--dice) center/contain no-repeat;
}
.colophon{text-align:center; font-family:var(--mono); font-size:.7rem; line-height:1.8; color:var(--soft); padding-bottom:36px}
.colophon a{text-decoration:none; border-bottom:1px solid var(--rule)}

/* ---------- 404 ---------- */
.lost{min-height:420px}
.lost h1{font-size:clamp(2.6rem,8vw,4.4rem)}

/* ---------- narrow screens ---------- */
@media (max-width:900px){
  .doors{grid-template-columns:1fr; gap:56px}
  .world .cols{grid-template-columns:1fr; gap:24px}
  .prints{height:560px; max-width:520px}
}
@media (max-width:600px){
  .wrap{padding:0 16px}
  .bar{flex-wrap:wrap; gap:10px; padding:14px 0 24px}
  .bar nav{margin-left:0; justify-content:flex-start; width:100%}
  .hero{min-height:500px; padding:150px 22px 28px; margin:0 -4px 54px}
  .hero::before{left:-4px}
  .hero .lead{font-size:1.02rem}
  .sheet{padding:34px 20px 26px}
  .sheet .label{margin:0 -6px 22px; padding:96px 16px 18px; min-height:0}
  .sheet .label::before{left:-4px}
  .sheet .print{width:46%; right:10px}
  .sheet h2,.sheet .label .eyebrow{max-width:none}
  .sheet h2{font-size:1.9rem}
  .sheet p,.world p{text-align:left}
  .world{padding:34px 20px 36px}
  .prints{height:calc(330px + (100vw - 72px) * .52)}
  .print::before{left:-12px}.print::after{right:-12px}
}
