:root {
  --ink: #1d1d1b;
  --muted: #8d8d8a;
  --paper: #c2c2c2;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#gl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

/* ---- top right ---- */
.about {
  position: fixed;
  top: 38px;
  right: 56px;
  z-index: 10;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  letter-spacing: .01em;
}
.about:hover { opacity: .6; }

/* ---- hero: just the wordmark, centred over the saucer ---- */
.axis {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.wordmark.hero {
  font-family: "Times New Roman", Times, serif;
  font-weight: 400;
  font-size: clamp(38px, 4.6vw, 68px);
  letter-spacing: .42em;
  padding-left: .42em; /* optically recentre the tracking */
  text-transform: uppercase;
  white-space: nowrap;
}

.scrollhint {
  position: absolute;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 15.5px;
}

/* ---- statement over the Wright flyer ---- */
.statement {
  position: absolute;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  z-index: 4;
}
.statement-text {
  font-family: "Times New Roman", Times, serif;
  font-weight: 400;
  font-size: clamp(32px, 3.5vw, 54px);
  line-height: 1.22;
  letter-spacing: .002em;
  max-width: 20ch;
  margin-left: 17%;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .9s cubic-bezier(.2,.65,.25,1), transform .9s cubic-bezier(.2,.65,.25,1);
}
.statement.in .statement-text { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .statement-text { margin: 0 24px; max-width: none; }
}

/* ---- contact section, anchored to the foot of the wall ---- */
.contact-sec {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
}
.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .9s cubic-bezier(.2,.65,.25,1), transform .9s cubic-bezier(.2,.65,.25,1);
}
.contact-sec.in .contact-inner { opacity: 1; transform: none; }
.contact-label {
  font-size: 13px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-mail {
  position: relative;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(34px, 4.2vw, 60px);
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  line-height: 1;
}
.contact-mail:hover { opacity: .65; }
/* "Copied" feedback floats above the address on click */
.contact-mail .copied {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, 6px);
  margin-bottom: 8px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.contact-mail.is-copied .copied {
  opacity: 1;
  transform: translate(-50%, 0);
}
.contact-tel {
  font-size: 18px;
  letter-spacing: .05em;
  color: #4a4a48;
  text-decoration: none;
}
.contact-tel:hover { opacity: .65; }
.legal {
  position: absolute;
  left: 0;
  bottom: 26px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.copyright {
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--ink);
}
.legal-links {
  display: flex;
  gap: 26px;
}
.legal-links a {
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  opacity: .7;
  transition: opacity .3s;
}
.legal-links a:hover { opacity: 1; }

/* ---- app showcase sections over the wall ---- */
#spacer { position: relative; will-change: transform; }

.app {
  position: absolute;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  z-index: 4;
}
.app-inner {
  display: flex;
  align-items: center;
  gap: 6vw;
  width: 100%;
  padding: 0 8vw;
}

/* one continuous moulded glass slab — no inner frame lines:
   crisp hairline at the very edge, a shaded curve just inside it,
   a wide pool of light along the bottom and a foggy glow behind
   the icon (matches the Photoshop reference) */
.glass {
  flex: none;
  width: min(30vw, 440px);
  aspect-ratio: 1;
  border-radius: 23%;
  position: relative;
  /* clear glass: the wall behind each card is kept revealed and lens-
     magnified by the shader, so the veil stays very light and the blur
     gentle — the relief reads clearly through the glass */
  background: linear-gradient(160deg,
    rgba(255,255,255,.14),
    rgba(255,255,255,.03) 50%,
    rgba(255,255,255,.09));
  -webkit-backdrop-filter: blur(8px) saturate(135%);
  backdrop-filter: blur(8px) saturate(135%);
  box-shadow:
    0 0 0 1.5px rgba(255,255,255,.85),
    0 40px 80px rgba(40,40,45,.25),
    inset 0 1px 2px rgba(255,255,255,.65),
    inset 0 -16px 32px -14px rgba(255,255,255,.50),
    inset 0 12px 26px -14px rgba(105,105,115,.20);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-icon {
  display: block;
  width: 47%;
  aspect-ratio: 1;
  border-radius: 24%;
  position: relative;
  /* small glow only — a big white halo would paint over the frosted face */
  filter: drop-shadow(0 14px 26px rgba(30,30,40,.28)) drop-shadow(0 0 18px rgba(255,255,255,.35));
}
/* no lingering focus/tap frame after a mouse click; keyboard users still
   get a ring via :focus-visible */
.app-icon { outline: none; -webkit-tap-highlight-color: transparent; }
.app-icon:focus:not(:focus-visible) { outline: none; }
.app-icon:focus-visible {
  outline: 2px solid rgba(40,40,45,.55);
  outline-offset: 6px;
  border-radius: 26%;
}
.app-icon img,
.app-icon svg.ph {
  width: 100%;
  height: 100%;
  border-radius: 24%;
  display: block;
}
.app-icon svg.ph { display: none; }
.app-icon.fallback img { display: none; }
.app-icon.fallback svg.ph { display: block; }

.app-copy {
  flex: 1;
  text-align: center;
  font-family: "Times New Roman", Times, serif;
}
.app-copy h2 {
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 52px);
  letter-spacing: .005em;
  line-height: 1.12;
}
.app-copy p {
  margin-top: 10px;
  font-size: clamp(17px, 1.6vw, 24px);
  color: #4a4a48;
}
.app-copy .store {
  display: inline-block;
  margin-top: 26px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(29,29,27,.35);
  padding-bottom: 4px;
  transition: border-color .3s;
}
.app-copy .store:hover { border-color: var(--ink); }
.store-arrow {
  width: 11px;
  height: 11px;
  margin-left: 9px;
  vertical-align: baseline;
  position: relative;
  top: 1px;
  color: var(--ink);
}

/* mirrored variant: icon right, copy left */
.app.flip .app-inner { flex-direction: row-reverse; }

/* entrance: rises and clears as the section scrolls in */
.app-inner {
  opacity: 0;
  transform: translateY(46px);
  transition: opacity .9s cubic-bezier(.2,.65,.25,1), transform .9s cubic-bezier(.2,.65,.25,1);
}
.app.in .app-inner {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  /* sections leave the absolute wall-pinning and stack in normal flow;
     the first viewport stays empty for the hero wordmark */
  #spacer { height: auto !important; padding-top: 100vh; }
  .app, .statement, .contact-sec {
    position: relative;
    top: auto !important;
    bottom: auto;
    height: auto;
    min-height: 100vh;
  }
  .app-inner { flex-direction: column; gap: 34px; padding: 60px 24px; }
  .app.flip .app-inner { flex-direction: column; }
  .glass { width: min(64vw, 320px); }
}

/* ---- trailing cursor dot ---- */
#dot {
  position: fixed;
  left: 0;
  top: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #161614;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
}

@media (max-width: 900px) {
  .scrollhint { right: 50%; transform: translate(50%, 0); top: auto; bottom: 9%; }
  .about { right: 24px; top: 24px; }
}
