@font-face { font-family: "Poqrik Dzeragir"; src: url("media/poqrik-dzeragir.ttf") format("truetype"); font-display: swap; }

:root {
  --night: #0a1230; --night-2: #16224d; --gold: #f3c969; --gold-2: #ffe7a6; --red: #c8262f; --red-2: #e23b3f;
  --cream: #fff6e6; --cream-2: #f7e8cf; --ink: #2a1a12; --ink-2: #6b5446; --ok: #2e7d4f;
  --serif: "Noto Serif Armenian", Georgia, serif; --sans: "Noto Sans Armenian", system-ui, sans-serif;
  --gutter: 16px; --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-size: 17px; font-family: var(--sans); color: var(--ink); background: var(--night); line-height: 1.55; overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Prototype notice */
.proto-bar { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; text-align: center; font-size: 13px; padding: 6px var(--gutter) calc(6px + env(safe-area-inset-bottom));
  background: rgba(10, 18, 48, .85); color: var(--gold-2); backdrop-filter: blur(6px); }

/* Header */
.top { position: fixed; z-index: 50; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px; transition: background .3s, box-shadow .3s; }
.top.solid { background: rgba(10, 18, 48, .88); backdrop-filter: blur(10px); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.logo { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-family: var(--serif); font-weight: 800; font-size: 21px; white-space: nowrap; }
.logo svg { width: 26px; height: 26px; fill: var(--gold); filter: drop-shadow(0 0 6px rgba(243, 201, 105, .7)); }
.auth { display: flex; gap: 8px; }

/* Buttons */
.btn { --bg: transparent; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer; text-decoration: none;
  font: 600 16px/1.2 var(--sans); padding: 12px 20px; border-radius: 999px; background: var(--bg); color: #fff; transition: transform .15s, box-shadow .2s, background .2s; min-height: 44px; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .chips button:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn.sm { padding: 9px 18px; font-size: 15px; min-height: 40px; }
.btn.lg { padding: 16px 28px; font-size: 18px; }
.btn.full { width: 100%; }
.btn.gold { --bg: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--ink); box-shadow: 0 4px 18px rgba(243, 201, 105, .35); }
.btn.red { --bg: linear-gradient(180deg, var(--red-2), var(--red)); box-shadow: 0 6px 22px rgba(200, 38, 47, .45); }
.btn.red:hover { box-shadow: 0 8px 30px rgba(226, 59, 63, .6); }
.btn.ghost { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); backdrop-filter: blur(4px); }
.btn.ghost:hover { background: rgba(255,255,255,.16); }

/* Journey */
.journey { position: relative; height: 320vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: radial-gradient(ellipse at 50% 120%, #2a3a76, var(--night) 60%); }
#scene, .fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.fallback { display: none; object-fit: cover; }
.no3d #scene { display: none; }
.no3d .fallback { display: block; }
.flash { position: absolute; inset: 0; background: radial-gradient(circle, #fffaf0, #ffe2b0); opacity: 0; pointer-events: none; }
.vignette { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(5,10,30,.55), transparent 22%, transparent 55%, rgba(5,10,30,.65)); }
.panel { position: absolute; left: 0; right: 0; padding: 0 var(--gutter); color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .25s linear; will-change: opacity, transform; }
.panel.on { pointer-events: auto; }
.hero { bottom: calc(56px + env(safe-area-inset-bottom)); text-align: center; }
.hero h1 { font-size: clamp(40px, 10vw, 88px); font-weight: 800; margin-bottom: .35em; }
.shine { background: linear-gradient(100deg, #fff 0%, #fff 40%, var(--gold-2) 48%, var(--gold) 52%, #fff 60%, #fff 100%); background-size: 250% 100%; background-position: 120% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: write 2.6s 1.2s ease-out forwards, rise 1.4s .9s both cubic-bezier(.2,.7,.2,1); filter: drop-shadow(0 3px 14px rgba(0,0,0,.5)); }
@keyframes write { to { background-position: -30% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); letter-spacing: .04em; } to { opacity: 1; transform: none; } }
.hero .eyebrow, .hero .lead, .hero .cta, .scroll-hint { animation: rise 1.2s both cubic-bezier(.2,.7,.2,1); }
.hero .eyebrow { animation-delay: .6s; } .hero .lead { animation-delay: 1.8s; } .hero .cta { animation-delay: 2.2s; } .scroll-hint { animation-delay: 3s; }
.lead { max-width: 640px; margin: 0 auto 1.3em; font-size: clamp(17px, 2.5vw, 22px); opacity: .95; }
.cta { display: flex; flex-direction: column; gap: 10px; align-items: stretch; max-width: 360px; margin: 0 auto; }
.scroll-hint { margin: 18px 0 0; font-size: 15px; opacity: .75; }
.scroll-hint span { display: inline-block; animation: bob 1.6s infinite ease-in-out; }
@keyframes bob { 50% { transform: translateY(5px); } }
.eyebrow { letter-spacing: .02em; font-size: 22px; font-weight: 700; color: var(--gold-2); margin-bottom: .8em; }
.eyebrow.dark { color: var(--red); }
.side { top: 86px; max-width: 460px; }
.side h2 { font-size: clamp(32px, 7vw, 54px); }
.side p { font-size: clamp(17px, 2.3vw, 20px); }
.side.right { top: auto; bottom: 64px; }
.hint { font-size: 16px; color: var(--gold-2); }
.desk-only { display: none; }
@media (hover: hover) and (pointer: fine) { .desk-only { display: inline; } .touch-only { display: none; } }

/* Warm sections */
.warm { background: linear-gradient(180deg, #ffe9c7 0, var(--cream) 220px, var(--cream) 100%); position: relative; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 860px; }
.center { text-align: center; }
section.preview, section.inside, section.sample, section.how { padding: 64px 0; }
.preview h2, .inside h2, .sample h2, .how h2 { font-size: clamp(30px, 5.6vw, 48px); color: var(--ink); }
.two { display: grid; gap: 28px; }
.copy p { color: var(--ink-2); }
.field { display: grid; gap: 6px; margin: 0 0 12px; font-weight: 600; font-size: 16px; color: var(--ink); }
.field input { font: 500 20px var(--sans); padding: 14px 16px; border-radius: 14px; border: 2px solid #e5cfa9; background: #fff; color: var(--ink); width: 100%; min-height: 52px; }
.field input:focus { border-color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chips button { font: 600 16px var(--sans); padding: 8px 14px; min-height: 38px; border-radius: 999px; border: 1.5px solid #e5cfa9; background: #fffaf2; color: var(--ink); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.note { font-size: 15px; color: var(--ok) !important; }

.plate { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: #3a2418; box-shadow: 0 18px 50px rgba(80, 40, 10, .28); }
.plate > img:first-child, .plate > video { width: 100%; height: 100%; object-fit: cover; }
.plate .photo { position: absolute; object-fit: cover; }
.letter-plate figcaption { position: absolute; left: 12px; bottom: 10px; font-size: 13px; color: #fff; background: rgba(0,0,0,.4); padding: 3px 10px; border-radius: 99px; }
.name-box.at-letter { left: 40.5%; top: 26.5%; width: 22%; height: 16%; }
.plate .photo.at-wall { left: 35.9%; top: 22.9%; width: 29.1%; height: 45.6%; }
.plate .photo.at-frame { left: 37.5%; top: 19.7%; width: 25.2%; height: 59.7%; }
.name-box { position: absolute; display: flex; align-items: center; justify-content: center; container-type: size; }
.hand { font-family: "Poqrik Dzeragir", var(--serif); color: #9b1b1b; white-space: nowrap; line-height: 1; font-size: 82cqh; -webkit-text-stroke: .02em #9b1b1b; }
.hand.pop { animation: ink .6s ease-out; }
@keyframes ink { from { opacity: 0; filter: blur(3px); transform: scale(.94); } }

.cards { display: grid; gap: 22px; margin-top: 28px; }
.card { background: #fff; border-radius: calc(var(--radius) + 4px); padding: 10px 10px 18px; box-shadow: 0 10px 30px rgba(120, 70, 20, .12); }
.card .plate { box-shadow: none; border-radius: 14px; margin-bottom: 14px; }
.card h3 { font-size: 22px; padding: 0 8px; }
.card p { padding: 0 8px; color: var(--ink-2); margin: 0; font-size: 17px; }

.video-box { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 60px rgba(80, 40, 10, .3); background: #000; aspect-ratio: 16 / 9; margin-top: 24px; }
.video-box video { width: 100%; height: 100%; object-fit: cover; }
.watermark { position: absolute; top: 12px; right: 14px; font: 800 14px var(--sans); letter-spacing: .2em; color: rgba(255,255,255,.75); background: rgba(0,0,0,.35); padding: 4px 10px; border-radius: 6px; pointer-events: none; }

.steps { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 14px; }
.steps li { background: #fff; border-radius: var(--radius); padding: 18px 18px 14px 72px; position: relative; box-shadow: 0 8px 24px rgba(120, 70, 20, .1); }
.steps b { position: absolute; left: 18px; top: 18px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); font: 800 18px var(--serif); }
.steps h3 { font-size: 21px; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--ink-2); }
.price { display: grid; gap: 16px; align-items: center; background: radial-gradient(ellipse at 20% 0%, #23336b, var(--night)); color: #fff; border-radius: calc(var(--radius) + 6px); padding: 26px; }
.price .amount { font: 800 44px/1 var(--serif); color: var(--gold); margin-bottom: 8px; }
.price p { margin: 0; opacity: .9; }

.foot { background: var(--night); color: rgba(255,255,255,.6); text-align: center; padding: 28px var(--gutter) 64px; font-size: 15px; }

/* Auth dialog */
dialog { border: 0; border-radius: 22px; padding: 0; width: min(420px, calc(100% - 32px)); box-shadow: 0 30px 80px rgba(0,0,0,.4); }
dialog::backdrop { background: rgba(5, 10, 30, .6); backdrop-filter: blur(4px); }
.auth-form { padding: 28px 22px 18px; position: relative; background: var(--cream); }
.auth-form h2 { font-size: 30px; }
.close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; background: none; font-size: 28px; cursor: pointer; color: var(--ink-2); }
.switch { text-align: center; margin: 12px 0 0; }
.link { background: none; border: 0; color: var(--red); font: 600 14px var(--sans); cursor: pointer; text-decoration: underline; padding: 8px; }
.auth-form:not(.signup) .signup-only { display: none; }
.auth-form:is(.signup, .reset) .signin-only, .auth-form.reset .not-reset { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; font-size: 15px; line-height: 1.4; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--red); }
.check a { color: var(--red); }
.auth-form .hint { font-size: 14px; margin: -6px 0 10px; color: var(--ink-2) !important; }
.auth-form .note.error { color: var(--red) !important; }
[hidden] { display: none !important; }

/* Desktop */
@media (min-width: 768px) {
  :root { --gutter: 32px; }
  .logo { font-size: 25px; }
  .cta { flex-direction: row; justify-content: center; max-width: none; }
  .hero { bottom: 9vh; }
  .side { top: 22vh; left: 6vw; right: auto; }
  .side.right { top: 22vh; bottom: auto; left: auto; right: 6vw; text-align: right; }
  .two { grid-template-columns: 5fr 7fr; align-items: center; gap: 48px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .price { grid-template-columns: 1fr auto; padding: 32px 40px; }
  section.preview, section.inside, section.sample, section.how { padding: 96px 0; }
}
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(4, 1fr); } .card h3 { font-size: 21px; } }

/* Narrow phones: keep logo + both auth buttons on one line */
@media (max-width: 420px) {
  .top { gap: 8px; }
  .logo { font-size: 15.5px; gap: 5px; }
  .logo svg { width: 20px; height: 20px; }
  .auth { gap: 6px; }
  .btn.sm { padding: 8px 11px; font-size: 14px; }
  .proto-bar { font-size: 11.5px; }
}
/* «Դու հեքիաթում ես» is longer than the old name: smallest phones get a slightly smaller header. */
@media (max-width: 360px) {
  .logo { font-size: 14px; }
  .logo svg { width: 17px; height: 17px; }
  .btn.sm { padding: 7px 9px; font-size: 13px; }
}

/* Phones: a header marked .stack puts the name on its own centered line and the buttons centered below it
   (home page while signed out; account page, where the email and Ելք need the room). Signed-in home stays one line. */
@media (max-width: 600px) {
  .top.stack { flex-wrap: wrap; justify-content: center; row-gap: 8px; }
  .top.stack .logo, .top.stack .auth { width: 100%; justify-content: center; }
  .top.stack .logo { font-size: 19px; }
  .top.stack .logo svg { width: 22px; height: 22px; }
}

/* Short phone screens (e.g. iPhone SE in Safari): the hero is anchored to the bottom and grows upward, so keep it
   below the header — smaller headline, text and buttons, no scroll hint. Taller phones and computers unchanged. */
@media (max-height: 700px) and (max-width: 600px) {
  .hero { bottom: calc(40px + env(safe-area-inset-bottom)); }
  .hero .eyebrow { font-size: 18px; margin-bottom: .5em; }
  .hero h1 { font-size: 32px; margin-bottom: .3em; }
  .hero .lead { font-size: 15px; line-height: 1.45; margin-bottom: .9em; }
  .hero .cta .btn.lg { padding-top: 11px; padding-bottom: 11px; font-size: 16px; }
  .hero .scroll-hint { display: none; }
}
