/* FIAO holding page.
   One screen: two silk threads (gold and blue, the two people) flow in from
   each side and meet at the emblem, a metal coin that tilts toward the pointer.
   Everything is drawn here and in soon.js; nothing loads from other sites,
   no cookies, no tracking. Motion stops for people who ask their device for
   less motion. */

@property --flip { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@property --edge { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root {
  --navy: #0A142F;
  --navy-deep: #050B1C;
  --navy-pill: #0C1736;
  --gold: #C5A059;
  --gold-light: #E3C789;
  --gold-pale: #F3DFA8;
  --text: #FFFFFF;
  --text-soft: #C9CFDD;
  --text-muted: #8E98AF;
  --rx: 0deg;
  --ry: 0deg;
  --hx: 38%;
  --hy: 30%;
  --px: 50%;
  --py: 30%;
  --ease-out: cubic-bezier(.2, .75, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 28%, #142552 0%, rgba(20, 37, 82, 0) 70%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  background-color: var(--navy);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Background layers ---------- */

#silk,
.glow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#silk { z-index: 0; opacity: 0; animation: fade 2.4s ease .2s forwards; }

/* a soft gold light that follows the pointer */
.glow {
  z-index: 0;
  background: radial-gradient(560px circle at var(--px) var(--py), rgba(197, 160, 89, .10), rgba(197, 160, 89, 0) 65%);
}

.top, main, footer { position: relative; z-index: 1; }

/* ---------- Top bar ---------- */

.top {
  display: flex;
  justify-content: flex-end;
  padding: 18px 22px 0;
  opacity: 0;
  animation: fade 1s ease 1.6s forwards;
}

a { color: var(--gold-light); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.lang {
  font-size: 14px;
  letter-spacing: .02em;
  text-decoration: none;
  color: var(--text-soft);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .03);
  transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.lang:hover { color: var(--gold-pale); border-color: rgba(227, 199, 137, .45); background: rgba(227, 199, 137, .06); }

/* ---------- Main ---------- */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 20px 40px;
}

/* The coin */
.coin-wrap {
  --size: clamp(112px, 13vw, 152px);
  position: relative;
  width: var(--size);
  height: var(--size);
  perspective: 700px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: coin-in 1.6s var(--ease-out) .1s both;
}

.coin {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(calc(var(--ry) + var(--flip)));
  transition: --flip 2.8s cubic-bezier(.45, .05, .25, 1);
}

.coin img {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .55)) drop-shadow(0 0 22px rgba(197, 160, 89, .18));
  user-select: none;
  -webkit-user-drag: none;
}

/* light on the metal: follows the tilt, and a sweep now and then */
.shine,
.sweep {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask: url("/assets/fiao-emblem-256.png") center / 100% 100% no-repeat;
  mask: url("/assets/fiao-emblem-256.png") center / 100% 100% no-repeat;
  mix-blend-mode: overlay;
}

.shine {
  background: radial-gradient(circle at var(--hx) var(--hy),
    rgba(255, 250, 230, .95) 0%, rgba(255, 250, 230, .35) 20%, rgba(255, 250, 230, 0) 46%);
}

.sweep {
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .85) 50%, rgba(255, 255, 255, 0) 62%);
  background-size: 300% 100%;
  background-position: 160% 0;
  animation: sweep 7s ease-in-out 1.3s infinite;
}

/* a warm light where the two threads meet, breathing slowly */
.coin-wrap::before {
  content: "";
  position: absolute;
  inset: -55%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 199, 137, .30) 0%, rgba(197, 160, 89, .10) 32%, rgba(197, 160, 89, 0) 62%);
  pointer-events: none;
  animation: breathe 6s ease-in-out 1.4s infinite;
}

/* ripples from the coin, like a coin set down on still water */
.ring {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  border: 1px solid rgba(227, 199, 137, .5);
  opacity: 0;
  pointer-events: none;
  animation: ripple 5.2s var(--ease-out) 1.1s infinite;
}
.ring--2 { animation-delay: 3.7s; }

/* The wordmark */
.wordmark {
  margin: 22px 0 0;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  letter-spacing: .34em;
  padding-left: .34em;
  background: linear-gradient(180deg, var(--gold-pale) 0%, var(--gold-light) 38%, var(--gold) 72%, #9C7A3C 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--gold-light);
  -webkit-text-fill-color: transparent;
  animation: track 1.6s var(--ease-out) .45s both;
}

/* The headline, one word at a time */
h1 {
  margin: clamp(28px, 4.5vh, 44px) 0 0;
  max-width: 15em;
  font-size: clamp(34px, 6.2vw, 64px);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -.02em;
}

.w {
  display: inline-block;
  opacity: 0;
  transform: translateY(.45em);
  filter: blur(10px);
  animation: rise 1s var(--ease-out) forwards;
  animation-delay: calc(.75s + var(--i) * .09s);
}

.gold {
  background: linear-gradient(100deg, var(--gold-light) 0%, var(--gold-light) 35%, #FFF6DC 50%, var(--gold) 62%, var(--gold-light) 100%);
  background-size: 260% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--gold-light);
  -webkit-text-fill-color: transparent;
  animation: shimmer 6.5s ease-in-out 2.2s infinite;
}

/* "Coming soon", in a ring of moving gold */
.soon {
  display: inline-block;
  margin: clamp(28px, 4.5vh, 40px) 0 0;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--navy-pill), var(--navy-pill)) padding-box,
    conic-gradient(from var(--edge),
      rgba(227, 199, 137, .18) 0deg, var(--gold-pale) 50deg, rgba(227, 199, 137, .18) 110deg,
      rgba(227, 199, 137, .18) 180deg, var(--gold-light) 230deg, rgba(227, 199, 137, .18) 290deg) border-box;
  color: var(--gold-light);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .01em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 0 0 1px rgba(227, 199, 137, .06);
  animation: rise-in .9s var(--ease-out) 1.55s both, edge 5s linear infinite;
}

.contact {
  margin: 24px 0 0;
  font-size: 16px;
  color: var(--text-soft);
  animation: rise-in .9s var(--ease-out) 1.75s both;
}

.contact a {
  text-decoration: none;
  background: linear-gradient(var(--gold-light), var(--gold-light)) 0 100% / 0 1px no-repeat;
  transition: background-size .35s var(--ease-out);
  padding-bottom: 2px;
}
.contact a:hover, .contact a:focus-visible { background-size: 100% 1px; }

/* ---------- Footer ---------- */

footer {
  padding: 18px 20px 26px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  animation: rise-in .9s var(--ease-out) 1.95s both;
}
footer p { margin: 0; }

/* ---------- Motion ---------- */

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@keyframes coin-in {
  from { opacity: 0; transform: scale(.72); filter: blur(8px); }
  to   { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes track {
  from { opacity: 0; letter-spacing: .95em; padding-left: .95em; filter: blur(6px); }
  to   { opacity: 1; letter-spacing: .34em; padding-left: .34em; filter: blur(0); }
}

@keyframes rise {
  to { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes shimmer {
  0%   { background-position: 100% 0; }
  45%  { background-position: 0% 0; }
  100% { background-position: 0% 0; }
}

@keyframes sweep {
  0%   { background-position: 160% 0; }
  28%  { background-position: -60% 0; }
  100% { background-position: -60% 0; }
}

@keyframes ripple {
  0%   { opacity: 0; transform: scale(.95); }
  8%   { opacity: .55; }
  100% { opacity: 0; transform: scale(2.6); }
}

@keyframes breathe {
  0%, 100% { opacity: .65; transform: scale(.92); }
  50%      { opacity: 1;   transform: scale(1.06); }
}

@keyframes edge { to { --edge: 360deg; } }

/* Less motion when the device asks for it: everything shows at once, still. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  #silk, .top { opacity: 1; }
  .w { opacity: 1; transform: none; filter: none; }
  .ring, .sweep { display: none; }
}
