/* Kavarna Sofija — "Rokopis" design (chosen 29 Nov 2026). Aplós structure, Sofija palette. */
:root {
  --bone: #f2f1ed;
  --paper: #ffffff;
  --forest: #00453d;      /* logo green — hero, footer */
  --forest-deep: #0d2f2a;
  --olive: #999966;       /* logo olive — thin accents only */
  --olive-light: #c9c79a;
  --ink: #231f20;         /* logo script colour */
  --stone: #646464;
  --hairline: #e5e3df;

  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 5px;
  --max: 1200px;
  --gutter: 24px;
  --section: 120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  font-feature-settings: "liga", "kern";
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.012em; margin: 0; }
h2 { font-size: clamp(32px, 4vw, 44px); line-height: 1.05; }
h3 { font-size: 26px; line-height: 1.08; }
.lede { color: var(--stone); max-width: 600px; margin: 18px auto 0; }
.lede a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.center { text-align: center; }
section { padding: var(--section) 0 0; }
section:last-of-type { padding-bottom: var(--section); }

.btn {
  display: inline-block; background: var(--paper); color: var(--ink);
  font: 500 14px/1 var(--sans); padding: 12px 16px; border-radius: var(--radius);
}
.btn:hover { text-decoration: none; background: var(--bone); }
.btn-forest { background: var(--forest); color: #fff; }
.btn-forest:hover { background: var(--forest-deep); }
.ghost { font-size: 14px; margin-left: 16px; color: #fff; }

/* Live open/closed badge */
.open { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.open i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #9bd18b; display: none; }
.open.live i { display: block; animation: pulse 2s infinite; }
.open.live.closed i { background: #d98b7a; animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(155,209,139,.6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(155,209,139,0); } }

/* Hero */
.hero { background: var(--forest); color: #fff; min-height: 100svh; display: flex; flex-direction: column; }
.hero .top {
  display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap;
  max-width: var(--max); width: 100%; margin: 0 auto; padding: 18px var(--gutter); font-size: 14px;
}
.hero .top nav { display: flex; align-items: center; gap: 24px; }
.hero .top a { color: rgba(255,255,255,.85); }
.hero .links { display: flex; gap: 24px; }
.langs { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0 0 0 18px; border-left: 1px solid rgba(255,255,255,.25); }
.lang { font-size: 13px; padding: 4px 6px; border-radius: var(--radius); }
.hero .top .lang.on { background: rgba(255,255,255,.14); color: #fff; }
.hero .stage { flex: 1; display: grid; place-items: center; text-align: center; padding: 24px var(--gutter) 64px; }
.hero .big { width: min(620px, 92vw); margin: 0 auto; }
.hero h1 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.1; margin-top: 28px; }
.hero h1 em { color: var(--olive-light); }
.hero .ctas { margin-top: 28px; }
.scroll { display: block; width: 1px; height: 48px; background: rgba(255,255,255,.35); margin: 36px auto 0; position: relative; overflow: hidden; }
.scroll::after { content: ""; position: absolute; left: 0; top: -48px; width: 1px; height: 48px; background: #fff; animation: sc 2s ease-in-out infinite; }
@keyframes sc { to { top: 48px; } }

/* Logo animation: the cup draws, "kavarna" writes itself, SOFIJA rises, steam loops */
.cup { stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 1; fill-opacity: 0; animation: draw 1.4s ease forwards, fill .6s ease forwards; }
.c0 { animation-delay: .2s, 1.2s; } .c1 { animation-delay: .3s, 1.3s; } .c2 { animation-delay: .45s, 1.4s; } .c3 { animation-delay: .1s, 1.5s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fill { to { fill-opacity: 1; stroke-width: 0; } }
.script { clip-path: inset(-40% 100% -40% -5%); animation: wipe 2.1s cubic-bezier(.45,.05,.4,1) 1.2s forwards; }
@keyframes wipe { to { clip-path: inset(-40% -5% -40% -5%); } }
.sofija { opacity: 0; transform: translateY(14px); animation: up 1s ease 3s forwards; }
.hero h1 { opacity: 0; animation: up 1s ease 3.4s forwards; }
.hero .ctas { opacity: 0; animation: up 1s ease 3.7s forwards; }
@keyframes up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.steam path { stroke: var(--olive); stroke-width: 3; opacity: 0; stroke-dasharray: 90; stroke-dashoffset: 90; animation: steam 3.4s ease-in-out infinite; }
.steam path:nth-child(2) { animation-delay: 1.1s; } .steam path:nth-child(3) { animation-delay: 2.2s; }
@keyframes steam { 0% { opacity: 0; stroke-dashoffset: 90; transform: translateY(10px); } 30% { opacity: .7; } 100% { opacity: 0; stroke-dashoffset: -90; transform: translateY(-14px); } }
/* Second page view in a visit: show the finished logo at once */
.seen .cup, .seen .script, .seen .sofija, .seen .hero h1, .seen .hero .ctas { animation-delay: 0s !important; animation-duration: .01s !important; }

/* Reveal on scroll (only when JS runs) */
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js .rv.in { opacity: 1; transform: none; }

/* Terrace */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.kick { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--olive); }
.split h2 { margin: 12px 0 18px; }
.split p { color: var(--stone); font-size: 17px; max-width: 460px; margin: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 20px 32px; margin-top: 28px; }
.facts b { display: block; font: 400 34px/1 var(--serif); color: var(--forest); }
.facts span { font-size: 13px; color: var(--stone); }
.terrace { width: 100%; color: var(--forest); }
.terrace .ln { stroke-dasharray: 600; stroke-dashoffset: 600; transition: stroke-dashoffset 2.2s ease; }
.in .terrace .ln, html:not(.js) .terrace .ln { stroke-dashoffset: 0; }
.terrace .para { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 6s ease-in-out infinite; }
.terrace .p2 { animation-delay: -3s; }
@keyframes sway { 50% { transform: rotate(1.4deg); } }
.terrace .sun circle, .terrace .rays { stroke: var(--olive); }
/* Sun: rays shimmer one after another around the circle */
.terrace .sun circle { animation: glow 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes glow { 50% { transform: scale(1.06); } }
.terrace .ray { transform-box: fill-box; transform-origin: 50% 100%; animation: ray 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * .3s); }
@keyframes ray { 0%, 100% { transform: scaleY(.45); opacity: .35; } 40% { transform: scaleY(1); opacity: 1; } }
.terrace .wisp { animation: wisp 2.6s ease-in-out infinite; }
@keyframes wisp { 50% { transform: translateY(-4px); opacity: .4; } }

/* Menu: tabs with JS, every category listed without it */
.tabs { display: none; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 36px; }
.js .tabs { display: flex; }
.tabs button {
  font: 500 14px var(--sans); border: 1px solid var(--hairline); background: var(--paper); color: var(--ink);
  padding: 10px 16px; border-radius: 99px; cursor: pointer; transition: background .2s, color .2s;
}
.tabs button[aria-selected="true"] { background: var(--forest); border-color: var(--forest); color: #fff; }
.board { max-width: 640px; margin: 28px auto 0; background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 28px 32px; text-align: left; }
.mpanel + .mpanel { margin-top: 28px; }
.mpanel h3 { margin-bottom: 8px; }
.js .mpanel { display: none; margin: 0; }
.js .mpanel.on { display: block; }
.js .mpanel h3 { display: none; }
.board ul { list-style: none; margin: 0; padding: 0; }
.board li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--hairline); font-size: 15px; }
.board li:last-child { border: 0; }
.js .mpanel.on li { animation: item .45s ease both; }
@keyframes item { from { opacity: 0; transform: translateX(-10px); } }
.board .price { color: var(--stone); font-variant-numeric: tabular-nums; white-space: nowrap; }
.board .note { color: var(--stone); font-size: 13px; margin: 12px 0 0; }
.menu-cta { text-align: center; margin-top: 28px; font-size: 14px; color: var(--stone); }
.menu-cta a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Visit */
.visit { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; }
.panel { background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 32px; }
.panel.dark { background: var(--forest); border-color: var(--forest); color: #fff; }
.panel.dark .muted { color: rgba(255,255,255,.75); }
.panel h3 { margin-bottom: 16px; }
.panel address { font-style: normal; font-size: 17px; line-height: 1.6; }
.panel .btn { margin-top: 24px; }
.panel .open { color: var(--forest); margin: 0 0 12px; }
.muted { color: var(--stone); font-size: 14px; }
.hours { width: 100%; border-collapse: collapse; font-size: 15px; }
.hours td { padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.hours td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.mail { margin: 20px 0 0; }
.mail .btn { margin-top: 8px; }

/* Footer */
footer { background: var(--forest); color: rgba(255,255,255,.78); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-top: 56px; padding-bottom: 40px; flex-wrap: wrap; }
footer .brand { width: 150px; }
footer p { margin: 4px 0; }
footer a { color: #fff; }

/* Phone */
@media (max-width: 860px) {
  :root { --section: 88px; --gutter: 16px; }
  .hero .links { display: none; }
  .langs { padding-left: 0; border-left: 0; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .visit { grid-template-columns: 1fr; }
  .board, .panel { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition: none !important; }
  .js .rv { opacity: 1; transform: none; }
  .terrace .ln { stroke-dashoffset: 0; }
  .steam { display: none; }
}
