/* Okostár — house brand site. White ground, one cobalt accent, big type, air.
   Display: DM Serif Display (one weight, so headings are never bolded) · Body: DM Sans.
   Both carry ő/ű.
   Motion language (from the mark: a dot dropping into a tray): things drop into place —
   the hero scene on load, sections as you scroll, cards lift on hover. Every animation is
   off under prefers-reduced-motion, and nothing depends on JS to be visible: the scroll
   reveal only arms when <html> carries the "js" class (set by a one-line inline script). */

:root {
  --ground: #ffffff;
  --ink: #141a3b;
  --accent: #2a3be8;
  --accent-deep: #1f2dc0;
  --mist: #f3f5fc;
  --line: #e2e5f1;
  --muted: #5d6485;
  /* the product worlds keep their own colours on their cards */
  --keto: #143f29;
  --keto-soft: #f7f3ea;
  --hunt: #1d2f52;
  --hunt-soft: #f6efe0;
  --hunt-gold: #e2b23c;
  --suli: #2a333d;
  --suli-soft: #f6f2ec;
  --suli-ochre: #dba339;
  --nagynap: #5d3742;
  --nagynap-soft: #faf5f0;
  --nagynap-gold: #cfa14e;
  --palota: #0f423e;
  --palota-soft: #faf4ea;
  --palota-sun: #e6a817;
  --konyha: #572d14;
  --konyha-soft: #faf3ea;
  --tervezo: #2b3470;
  --tervezo-soft: #f7f6f0;
  --ejjel: #0b1026;
  --ejjel-soft: #f4f1ea;
  --mano: #1d5736;
  --mano-soft: #f8f6ec;
  --puska: #1b1e21;
  --puska-soft: #f4f4f1;
  --mancs: #7a4019;
  --mancs-soft: #faf4e9;
  --bor: #33221a;
  --bor-soft: #f9f4ed;
  --megoldo: #143844;
  --megoldo-soft: #f3f5f2;
  --tanar: #5a1f2e;
  --tanar-soft: #faf5ef;
  --dal: #4e1c3a;
  --dal-soft: #f7ecf2;
  --dal-gold: #e6a817;
  --mese: #1b4d3e;
  --mese-soft: #f1f6ee;

  --display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --body: "DM Sans", "Segoe UI", Arial, sans-serif;
  --wrap: 1120px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-drop: cubic-bezier(.25, 1.35, .45, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  font-feature-settings: "kern";
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 6.6vw, 80px); line-height: 1.04; letter-spacing: -0.012em; }
h2 { font-size: clamp(30px, 4vw, 46px); }
h3 { font-size: 26px; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-deep); }
strong { font-weight: 600; }
img { max-width: 100%; height: auto; display: block; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
@media (max-width: 600px) { .wrap { width: calc(100% - 40px); } }

/* ---------- header: sticks, frosts over once you scroll ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  padding: 26px 0;
  background: rgba(255, 255, 255, 0);
  transition: padding .25s var(--ease-out), background .25s, box-shadow .25s;
}
.top.stuck {
  padding: 14px 0;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 1px 0 var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.top .logo { display: inline-flex; line-height: 0; }
.top .logo img { height: 30px; width: auto; }
.top nav { display: flex; gap: 28px; font-weight: 500; font-size: 17px; }
.top nav a { color: var(--ink); text-decoration: none; position: relative; padding-bottom: 3px; }
.top nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease-out);
}
.top nav a:hover { color: var(--accent); }
.top nav a:hover::after, .top nav a:focus-visible::after { transform: scaleX(1); }
@media (max-width: 600px) {
  .top nav { gap: 18px; font-size: 16px; }
  .top nav a.hide-sm { display: none; }
}
section, .ribbon { scroll-margin-top: 80px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  line-height: 1;
  padding: 16px 26px;
  border-radius: 999px;
  text-decoration: none;
  transition: background .15s, transform .2s var(--ease-out);
}
.btn:hover { background: var(--accent-deep); color: #fff; transform: translateY(-2px); }
.btn.light { background: #fff; color: var(--ink); }
.btn.light:hover { background: #f1f2f7; color: var(--ink); }

/* ---------- hero: text left, the animated mark scene right ---------- */
.hero { padding: 40px 0 72px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.2vw, 66px); max-width: 16ch; }
.hero .lead {
  margin-top: 32px;
  font-size: clamp(19px, 2vw, 21px);
  line-height: 1.55;
  max-width: 52ch;
  color: var(--muted);
}
.hero .actions { margin-top: 36px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.hero .actions a:not(.btn) { font-weight: 500; }

/* the text rises in on load */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-text h1 { animation: rise .8s var(--ease-out) both; }
.hero-text .lead { animation: rise .8s var(--ease-out) .12s both; }
.hero-text .actions { animation: rise .8s var(--ease-out) .24s both; }

/* the scene: two breathing cobalt blobs behind, the enlarged mark in front */
.scene-wrap { position: relative; isolation: isolate; }
.scene-wrap::before, .scene-wrap::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  filter: blur(36px);
}
.scene-wrap::before {
  width: 72%; height: 72%; left: -8%; top: 2%;
  background: radial-gradient(circle, rgba(42, 59, 232, .16), rgba(42, 59, 232, 0) 70%);
  animation: breathe 7s ease-in-out infinite alternate;
}
.scene-wrap::after {
  width: 62%; height: 62%; right: -10%; bottom: -2%;
  background: radial-gradient(circle, rgba(42, 59, 232, .11), rgba(42, 59, 232, 0) 70%);
  animation: breathe 9s ease-in-out -3s infinite alternate;
}
@keyframes breathe { from { transform: scale(.9) translateY(0); } to { transform: scale(1.15) translateY(-14px); } }

.scene { width: 100%; height: auto; display: block; overflow: visible; --drop: -320px; }
.scene .card, .scene .dot, .scene .bob { transform-box: fill-box; transform-origin: center; }
.scene .card { animation: sceneDrop 1s var(--ease-drop) both; }
.scene .c1 { animation-delay: .25s; }
.scene .c2 { animation-delay: .85s; }
.scene .c3 { animation-delay: 1.45s; }
.scene .dot { animation: sceneDrop 1.1s var(--ease-drop) 2.2s both; }
.scene .bob { animation: bob 4.5s ease-in-out 3.3s infinite; }
/* each piece fades in as it starts falling, so the ones still waiting are not stacked up above */
@keyframes sceneDrop {
  from { transform: translateY(var(--drop)); opacity: 0; }
  35%  { opacity: 1; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

@media (max-width: 900px) {
  .hero { padding: 20px 0 56px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 20px; }
  .hero h1 { max-width: 20ch; }
  .scene-wrap { width: min(360px, 100%); margin: 12px auto 0; }
  /* under the text the pieces fall from the scene's own top edge, not from over the buttons */
  .scene { overflow: hidden; --drop: -170px; }
}

/* ---------- facts ribbon: one slow loop, pauses under the pointer ---------- */
.ribbon {
  background: var(--mist);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 16px 0;
}
.ribbon .track { display: flex; width: max-content; animation: ribbon 48s linear infinite; }
.ribbon:hover .track { animation-play-state: paused; }
.ribbon .set { display: flex; list-style: none; margin: 0; padding: 0; }
.ribbon li {
  display: flex; align-items: center; gap: 14px; padding-right: 44px;
  white-space: nowrap; font-weight: 500; font-size: 16px; color: var(--ink);
}
.ribbon li svg { width: 17px; height: 20px; fill: var(--accent); flex: none; }
@keyframes ribbon { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section { padding: 88px 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 48px; }
.section-head p { margin-top: 18px; color: var(--muted); font-size: 19px; }

/* ---------- products ---------- */
.products { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .products { grid-template-columns: 1fr; } }
.product {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 28px;
  align-items: end;
  padding: 36px;
  border-radius: 24px;
  color: var(--keto-soft);
  background: var(--keto);
  text-decoration: none;
  min-height: 340px;
  position: relative;
  overflow: hidden;
  transition: transform .25s var(--ease-out), box-shadow .25s;
}
.product:hover { transform: translateY(-4px); color: var(--keto-soft); box-shadow: 0 24px 48px rgba(20, 26, 59, .14); }
.product.hunt { background: var(--hunt); color: var(--hunt-soft); }
.product.hunt:hover { color: var(--hunt-soft); }
.product.suli { background: var(--suli); color: var(--suli-soft); }
.product.suli:hover { color: var(--suli-soft); }
.product.nagynap { background: var(--nagynap); color: var(--nagynap-soft); }
.product.nagynap:hover { color: var(--nagynap-soft); }
.product.palota { background: var(--palota); color: var(--palota-soft); }
.product.palota:hover { color: var(--palota-soft); }
.product.konyha { background: var(--konyha); color: var(--konyha-soft); }
.product.konyha:hover { color: var(--konyha-soft); }
.product.ejjel { background: var(--ejjel); color: var(--ejjel-soft); }
.product.ejjel:hover { color: var(--ejjel-soft); }
.product.tervezo { background: var(--tervezo); color: var(--tervezo-soft); }
.product.tervezo:hover { color: var(--tervezo-soft); }
.product.mano { background: var(--mano); color: var(--mano-soft); }
.product.mano:hover { color: var(--mano-soft); }
.product.puska { background: var(--puska); color: var(--puska-soft); }
.product.puska:hover { color: var(--puska-soft); }
.product.mancs { background: var(--mancs); color: var(--mancs-soft); }
.product.mancs:hover { color: var(--mancs-soft); }
.product.bor { background: var(--bor); color: var(--bor-soft); }
.product.bor:hover { color: var(--bor-soft); }
.product.megoldo { background: var(--megoldo); color: var(--megoldo-soft); }
.product.megoldo:hover { color: var(--megoldo-soft); }
.product.dal { background: var(--dal); color: var(--dal-soft); }
.product.dal:hover { color: var(--dal-soft); }
.product.mese { background: var(--mese); color: var(--mese-soft); }
.product.mese:hover { color: var(--mese-soft); }
.product.tanar { background: var(--tanar); color: var(--tanar-soft); }
.product.tanar:hover { color: var(--tanar-soft); }
/* each card's own world, drawn behind the text */
.product .deco { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.product > div, .product .cover { position: relative; z-index: 1; }
.product .cover {
  width: 200px; height: 200px; border-radius: 14px; object-fit: cover;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  transition: transform .4s var(--ease-out), box-shadow .4s;
}
.product:hover .cover {
  transform: perspective(700px) rotateY(-7deg) rotateX(4deg) translateY(-8px);
  box-shadow: 0 30px 50px rgba(0, 0, 0, .42);
}
.product .who { font-size: 15px; opacity: .8; }
.product h3 { font-size: clamp(26px, 3vw, 34px); margin-top: 6px; color: inherit; }
.product .what { margin-top: 14px; font-size: 17px; line-height: 1.5; opacity: .92; max-width: 34ch; }
.product .price { margin-top: 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.product .price b { font-family: var(--display); font-size: 28px; font-weight: 400; }
.product .price small { font-size: 15px; opacity: .8; }
.product .go {
  display: inline-block; margin-top: 22px; padding: 13px 22px; border-radius: 999px;
  background: var(--keto-soft); color: var(--keto); font-weight: 600; font-size: 16px;
  transition: transform .25s var(--ease-out);
}
.product:hover .go { transform: translateX(5px); }
.product.hunt .go { background: var(--hunt-gold); color: var(--hunt); }
@media (max-width: 600px) {
  .product { grid-template-columns: 1fr; padding: 28px; min-height: 0; }
  .product .cover { width: 100%; height: auto; aspect-ratio: 1; order: -1; }
}
/* the treasure path draws itself when the cards scroll into view, the X appears at the end */
.hunt .draw { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s ease-out .3s; }
.hunt .x { transition: opacity .4s ease 2s; }
.js .products:not(.in) .hunt .draw { stroke-dashoffset: 1; }
.js .products:not(.in) .hunt .x { opacity: 0; }
.hunt .needle { transform-box: fill-box; transform-origin: 50% 100%; animation: wobble 5s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(16deg); } }

/* ---------- the three promises (values, not a sequence → no numbers) ---------- */
#amiben-hiszunk { background: var(--mist); }
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
@media (max-width: 800px) { .promises { grid-template-columns: 1fr; gap: 32px; } }
.promise-item { position: relative; padding-top: 28px; }
.promise-item::before {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px;
  background: var(--accent); transform-origin: left;
  transition: transform .9s var(--ease-out) var(--d, 0s);
}
.promise-item h3 { font-size: 28px; }
.promise-item p { margin-top: 14px; color: var(--muted); }
/* the icons draw themselves stroke by stroke */
.promise-item .ico {
  width: 48px; height: 48px; margin-bottom: 18px; display: block;
  fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
.promise-item .ico .d { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1s ease-out calc(var(--d, 0s) + .3s); }
.promise-item .ico text { font: 600 15px var(--body); fill: var(--accent); stroke: none; transition: opacity .4s ease calc(var(--d, 0s) + 1.1s); }
.js .promise-item:not(.in)::before { transform: scaleX(0); }
.js .promise-item:not(.in) .ico .d { stroke-dashoffset: 1; }
.js .promise-item:not(.in) .ico text { opacity: 0; }

/* ---------- about + contact ---------- */
.motto {
  font-family: var(--display);
  font-size: clamp(44px, 8.6vw, 112px);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--accent);
  margin-bottom: 64px;
  text-wrap: balance;
}
.motto .pt {
  display: inline-block; width: .27em; height: .27em; margin-left: .1em; border-radius: 50%;
  background: var(--accent); vertical-align: baseline;
}
.js .motto:not(.in) .pt { opacity: 0; }
.js .motto.in .pt { animation: drop .9s var(--ease-drop) .4s both; }
@keyframes drop {
  from { transform: translateY(-.9em); opacity: 0; }
  35%  { opacity: 1; }
  to   { transform: translateY(0); opacity: 1; }
}

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; gap: 28px; } }
.two .copy p + p { margin-top: 18px; }
.two .copy p { max-width: 58ch; }
.two .copy .more { display: inline-block; margin-top: 26px; font-weight: 600; }

.mail {
  font-family: var(--display); font-weight: 400; font-size: clamp(26px, 3.6vw, 44px); letter-spacing: -0.01em;
  text-decoration: none; word-break: break-all; position: relative; display: inline-block; padding-bottom: 4px;
}
.mail::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.mail:hover::after, .mail:focus-visible::after { transform: scaleX(1); }
.mail .arr {
  display: inline-block; width: .7em; height: .7em; margin-left: .2em; vertical-align: -.04em;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .3s var(--ease-out);
}
.mail:hover .arr { transform: translateX(.18em); }
.contact p { margin-top: 18px; color: var(--muted); max-width: 48ch; }

/* ---------- scroll reveal (armed only with JS; without it everything is simply visible) ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity .7s ease var(--d, 0s), transform .8s var(--ease-out) var(--d, 0s);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- footer: links, then the wordmark as a faint watermark cut off by the page edge ---------- */
footer { border-top: 1px solid var(--line); padding: 36px 0 0; font-size: 15px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }
footer::after {
  content: ""; display: block;
  width: min(var(--wrap), 100% - 48px); margin: 40px auto 0;
  aspect-ratio: 479.46 / 76;
  background: url(/brand/wordmark-B.svg) top center / 100% auto no-repeat;
  opacity: .08;
}

/* ---------- text pages (rólunk, kapcsolat, legal) ---------- */
.page { padding: 40px 0 96px; }
.page .narrow { max-width: 68ch; }
.page h1 { font-size: clamp(36px, 5vw, 60px); }
.page .intro { margin-top: 24px; font-size: 21px; line-height: 1.55; color: var(--muted); }
.page h2 { font-size: 30px; margin-top: 56px; }
.page h3 { font-size: 22px; margin-top: 32px; }
.page p, .page li { margin-top: 16px; }
.page ul, .page ol { padding-left: 22px; margin: 0; }
.page .box { background: var(--mist); border-radius: 16px; padding: 22px 26px; margin-top: 18px; }
.page .box p { margin: 0; }
.page .promise { list-style: none; padding: 0; }
.page .promise li { padding-left: 28px; position: relative; }
.page .promise li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.table-wrap { overflow-x: auto; margin-top: 18px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 640px; }
th, td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; }

.big { font-size: 24px; font-weight: 600; }

/* ---------- reduced motion: everything is simply there ---------- */
/* ---------- consent bar (consent.js) — drops into the bottom-right corner (the left is where the headline and the buttons are) ---------- */
.consent {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: min(420px, calc(100% - 40px));
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 24px 48px rgba(20, 26, 59, .16);
  font-size: 15px; line-height: 1.5;
  animation: consentIn .7s var(--ease-drop) .4s both;
}
.consent p { margin: 0 0 14px; }
.consent a { color: var(--accent); }
.consent-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.consent .btn { font: inherit; font-weight: 600; font-size: 15px; line-height: 1; padding: 12px 20px; border: 0; cursor: pointer; }
.consent .btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.consent .btn.ghost:hover { background: var(--mist); color: var(--ink); }
@keyframes consentIn { from { transform: translateY(-28px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 600px) {
  .consent { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 16px 18px; }
  .consent .btn { flex: 1; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .products:not(.in) .hunt .draw, .js .promise-item:not(.in) .ico .d { stroke-dashoffset: 0; }
  .js .products:not(.in) .hunt .x { opacity: .9; }
  .js .promise-item:not(.in)::before { transform: none; }
  .js .promise-item:not(.in) .ico text, .js .motto:not(.in) .pt { opacity: 1; }
}
