/* CRBRO landing: the film's palette (deep green, ember, light green), one typeface (Geist) in four sizes, everything floating
   over the living surface (crbro.js). Without the script, or with less motion asked for, it is a still dark page that says
   the same things. */
@font-face { font-family: Geist; src: url('fonts/Geist-Variable.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0a1b16; --deep: #10291e; --ink: #fffaf0; --soft: #e0e8d7; --muted: #9eb5a7; --dim: #6f8a7a;
  --ember: #ff824b; --ember-2: #ff9a6b; --green: #345b43; --lite: #bfdba0;
  --glass: rgba(12, 32, 24, .74); --line: rgba(191, 219, 160, .16);
  --s1: 15px; --s2: clamp(18px, 1.5vw + 10px, 22px); --s3: clamp(26px, 2.2vw + 14px, 36px); --s4: clamp(52px, 8vw, 128px);
  --pad: clamp(16px, 5vw, 72px); --col: 680px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); font: 400 var(--s2)/1.45 Geist, ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
html.still { scroll-behavior: auto; }
body { margin: 0; min-height: 100vh; overflow-x: hidden;
  background: radial-gradient(120% 80% at 50% 38%, #1d3f2e 0%, #10291e 45%, #0a1b16 100%) fixed; }
html.alive body { background: transparent; }
a { color: inherit; }
::selection { background: var(--ember); color: var(--bg); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 16px; }

#surface { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; pointer-events: none; }
main, header, footer, #aside { position: relative; z-index: 1; }

/* ---------- top bar */
header { position: fixed; inset: 0 0 auto 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad); pointer-events: none; }
header > * { pointer-events: auto; }
.lockup { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: var(--s2); font-weight: 500; letter-spacing: .02em; }
.lockup svg { width: 28px; height: 28px; }
.lang { font-size: var(--s1); color: var(--muted); text-decoration: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; backdrop-filter: blur(8px); }
.lang:hover, .lang:focus-visible { color: var(--ink); border-color: var(--muted); }

/* ---------- the mark: its dots are eyes */
.mark .arch { fill: none; stroke: var(--ink); stroke-width: 7; stroke-linecap: round; }
.mark .dots circle { fill: var(--ember); transform-box: fill-box; transform-origin: center; transition: transform .12s ease; }
.mark .dots.blink circle { transform: scaleY(.15); }

/* ---------- sections */
main > section { min-height: 92vh; padding: 18vh var(--pad) 10vh; display: flex; flex-direction: column; justify-content: center; }
.col { width: 100%; max-width: var(--col); }
.hero { position: relative; min-height: 100svh; padding-top: 22vh; }
.hero .mark { width: clamp(64px, 9vw, 112px); height: auto; margin-bottom: 4vh; filter: drop-shadow(0 0 28px rgba(255, 130, 75, .25)); }
h1 { margin: 0 0 6vh; font-size: var(--s4); font-weight: 500; line-height: .98; letter-spacing: -.035em; }
h1 span { display: block; }
h1 span + span { color: var(--lite); }
.cue { position: absolute; left: var(--pad); bottom: 5vh; width: 1px; height: 54px; background: linear-gradient(var(--muted), transparent); overflow: hidden; }
.cue::after { content: ''; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ember); animation: cue 2.4s ease-in-out infinite; }
@keyframes cue { to { top: 100%; } }

/* ---------- CRBRO speaking */
.thread, .thread-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
div.thread { width: 100%; }
.phases, .film { width: 100%; }
.msg { position: relative; max-width: min(100%, 560px); padding: 14px 18px 14px 54px; border-radius: 6px 20px 20px 20px;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  font-size: var(--s2); color: var(--soft); }
.msg::before { /* CRBRO's avatar: the arch, small */
  content: ''; position: absolute; left: 14px; top: 13px; width: 26px; height: 26px; border-radius: 50%;
  background: no-repeat center/18px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M12 56V30a20 20 0 0 1 40 0v26' fill='none' stroke='%23fffaf0' stroke-width='7' stroke-linecap='round'/%3E%3Cg fill='%23ff824b'%3E%3Ccircle cx='24' cy='36' r='4.4'/%3E%3Ccircle cx='32' cy='30' r='4.4'/%3E%3Ccircle cx='40' cy='36' r='4.4'/%3E%3C/g%3E%3C/svg%3E"), rgba(10, 27, 22, .7); }
.msg.big { font-size: var(--s3); color: var(--ink); line-height: 1.2; }
.msg .dots { display: none; }
/* before it is said: hidden; while typing: CRBRO's own three dots; then the words rise in */
html.js .thread:not(.telling) [data-say], html.js [data-say]:not(.said):not(.typing) { opacity: 0; transform: translateY(10px); }
html.js [data-say] { transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
html.js .msg.typing { opacity: 1; transform: none; color: transparent; width: 104px; height: 52px; overflow: hidden; }
html.js .msg.typing .dots { display: flex; position: absolute; left: 56px; top: 50%; gap: 6px; transform: translateY(-50%); }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ember); animation: hop 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); opacity: .55; } 30% { transform: translateY(-6px); opacity: 1; } }
html.js .msg.said { opacity: 1; transform: none; }
.hero .thread { margin-top: 0; }

/* ---------- Assumi / Forma / Promuovi */
.phases { list-style: none; margin: 26px 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 1100px; counter-reset: p; }
.phase { position: relative; padding: 26px 24px 28px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: transform .5s cubic-bezier(.2, .8, .2, 1), border-color .4s, background .4s; outline: none; }
.phase:hover, .phase:focus-visible { transform: translateY(-6px); border-color: rgba(255, 130, 75, .5); background: rgba(24, 52, 38, .7); }
.phase .steps { display: flex; gap: 6px; margin-bottom: 18px; }
.phase .steps i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.phase .steps i.on { background: var(--ember); box-shadow: 0 0 12px rgba(255, 130, 75, .6); }
.phase h3 { margin: 0 0 8px; font-size: var(--s3); font-weight: 500; letter-spacing: -.02em; color: var(--ink); }
.phase p { margin: 0; color: var(--muted); font-size: var(--s2); }

/* ---------- rules */
.rules { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; max-width: 900px; }
.rules li { padding: 10px 16px; border-radius: 99px; border: 1px solid var(--line); background: rgba(10, 27, 22, .55); backdrop-filter: blur(10px); font-size: var(--s1); color: var(--soft); }
.rules li::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--lite); margin-right: 10px; vertical-align: 2px; }

/* ---------- film */
.film { position: relative; margin-top: 22px; width: 100%; max-width: 960px; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.film video { width: 100%; height: 100%; display: block; object-fit: cover; }
.film .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 14px; border: 0; cursor: pointer;
  background: linear-gradient(180deg, rgba(10, 27, 22, .1), rgba(10, 27, 22, .55)); color: var(--ink); font: inherit; font-size: var(--s2); }
.film .play b { width: 64px; height: 64px; border-radius: 50%; background: var(--ember); display: grid; place-items: center; transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.film .play b::after { content: ''; margin-left: 5px; border-left: 18px solid var(--bg); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.film .play:hover b, .film .play:focus-visible b { transform: scale(1.08); }
.film.playing .play { display: none; }
.film figcaption { position: absolute; left: 16px; top: 14px; padding: 6px 12px; border-radius: 99px; background: rgba(10, 27, 22, .62); backdrop-filter: blur(8px);
  font-size: var(--s1); color: var(--ink); pointer-events: none; }
.film.playing figcaption { display: none; }

/* ---------- the end */
.end { align-items: flex-start; }
.hire { margin-top: 26px; display: inline-flex; align-items: center; gap: 14px; padding: 20px 30px; border-radius: 99px; background: var(--ember); color: var(--bg);
  font-size: var(--s3); font-weight: 500; letter-spacing: -.015em; text-decoration: none; box-shadow: 0 10px 40px rgba(255, 130, 75, .25);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s, background .3s; }
.hire:hover, .hire:focus-visible { transform: translateY(-3px) scale(1.02); background: var(--ember-2); box-shadow: 0 16px 60px rgba(255, 130, 75, .4); outline: none; }
.hire svg { width: 22px; height: 22px; }
.mail { margin: 16px 0 0; font-size: var(--s1); color: var(--muted); }
.mail a { color: var(--soft); text-decoration-color: var(--line); text-underline-offset: 4px; }

/* ---------- a line said aside */
#aside { position: fixed; right: var(--pad); bottom: 24px; z-index: 20; pointer-events: none; opacity: 0; transform: translateY(14px); transition: opacity .45s, transform .55s cubic-bezier(.2, .8, .2, 1); }
#aside.shown { opacity: 1; transform: none; }
#aside .msg { opacity: 1; transform: none; }
#aside.typing .msg { color: transparent; width: 104px; height: 52px; }
#aside.typing .dots { display: flex; position: absolute; left: 56px; top: 50%; gap: 6px; transform: translateY(-50%); }

footer { padding: 6vh var(--pad) 5vh; display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: space-between; font-size: var(--s1); color: var(--dim); }
footer a { color: var(--muted); }

@media (max-width: 820px) {
  .phases { grid-template-columns: 1fr; }
  main > section { padding-top: 14vh; min-height: auto; padding-bottom: 12vh; }
  .hero { min-height: 100svh; }
  .msg { padding: 12px 16px 12px 50px; }
  .msg::before { left: 12px; top: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
