/* ==========================================================================
   Balvoro — "Noir" link page styles
   --------------------------------------------------------------------------
   A pure black page where the real gold logo is the only colour: it is
   shown like a jewel in a vitrine, under a soft colourless light, with one
   glint passing over it when the page opens. Everything else is strictly
   white, grey and black: hairline rules, small spaced capitals, thin white
   outline buttons and one solid white featured button.

   Mobile-first. No frameworks, no build step. One display font (Noto Serif
   Display, assets/fonts, SIL Open Font License) for the headline and the
   button names; all other text uses the phone's own system font.
   There is no accent colour: theme.accent in config.js is not used.

   Contents
     1. Font & tokens         6. Coming soon
     2. Base                  7. Share / Save contact, footer, toast, dev bar
     3. Page column           8. Hover (mouse only)
     4. Hero (the jewel)      9. Small phones, tablets & desktop
     5. Sections & buttons   10. Motion, RTL, reduced motion
   ========================================================================== */


/* 1. FONT & TOKENS ========================================================= */

@font-face {
  font-family: "Noto Serif Display";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/noto-serif-display-latin-300-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Noto Serif Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/noto-serif-display-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;

  /* Strictly monochrome. Contrast on #000 is noted for every text tone. */
  --bg: #000;
  --white: #FFF;            /* 21:1   headlines, button names */
  --ink: #EDEDED;           /* 17.9:1 labels */
  --text: #BDBDBD;          /* 11.2:1 body text */
  --muted: #9A9A9A;         /* 7.5:1  small capitals (7.0:1 on the brightest light) */
  --quiet: #858585;         /* 5.7:1  footer */
  --icon: #D6D6D6;          /* button icons and arrows */
  --on-white-muted: #4A4A4A; /* 8.9:1 small text on the white featured button */

  --rule: rgba(255, 255, 255, .15);        /* hairline rules */
  --rule-strong: rgba(255, 255, 255, .34);
  --edge: rgba(255, 255, 255, .36);        /* button outlines, #5C5C5C: 3.1:1 */
  --edge-hi: rgba(255, 255, 255, .7);
  --fill-hover: rgba(255, 255, 255, .06);
  --fill-press: rgba(255, 255, 255, .12);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "Noto Sans Arabic", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --serif: "Noto Serif Display", "Didot", "Bodoni 72", "Bodoni MT", "Noto Serif",
    "Times New Roman", "Noto Naskh Arabic", serif;

  --gutter: 24px;
  --column: 440px;
  --mark-h: clamp(104px, 30.5vw, 128px); /* height of the gold mark */
  --wm-w: calc(var(--mark-h) * 1.76);    /* width of the BALVORO lettering */
  --ease: cubic-bezier(.33, .1, .25, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --speed: .2s;
}


/* 2. BASE ================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* Same black behind iOS "rubber-band" scrolling. */
  background-color: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

button {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  background-color: var(--white);
  color: #000;
}

/* Keyboard focus: a white ring with a black gap (visible on black and on
   the white featured button). */
:focus {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Icons (markup comes from icons.js, see app.js). A fine 1.5 line. */
.icon {
  width: 1em;
  height: 1em;
  flex: none;
}

.icon--fill {
  fill: currentColor;
}

.icon--stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Letter shown instead of an icon when icons.js is missing. */
.letter-icon {
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

/* Visually hidden, but still read by screen readers. */
.sr-only,
.has-wordmark .profile__name-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}


/* 3. PAGE COLUMN =========================================================== */

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  /* The soft light around the logo is wider than a phone: clip it here,
     so the page never scrolls sideways. */
  overflow: hidden;
  padding-top: max(46px, env(safe-area-inset-top) + 30px);
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  padding-bottom: max(26px, env(safe-area-inset-bottom) + 14px);
  padding-left: max(var(--gutter), env(safe-area-inset-left));
}

/* The content column: a gap, not margins, so hidden blocks take no space. */
.page__body {
  display: flex;
  flex-direction: column;
  gap: 44px;
  width: 100%;
  max-width: var(--column);
  margin-top: 56px;   /* the logo is a cover: more air than between sections */
}

/* Launch page (no contact buttons or links yet): a little more air under
   the logo. The "coming soon" statement also gets more air after the
   contact buttons. */
.page--launch .page__body {
  margin-top: 64px;
}

.page__body > * + .soon {
  margin-top: 16px;
}

.noscript {
  max-width: 34ch;
  margin: 32px auto 0;
  font-size: 14px;
  text-align: center;
  color: var(--muted);
  text-wrap: balance;
}


/* 4. HERO — the jewel ======================================================= */

/* margin-top: auto (and the footer's): a short page sits in the middle of
   the screen, the footer stays at the end. */
.profile {
  position: relative;
  isolation: isolate;
  width: 100%;
  margin-top: auto;
}

/* Only the placeholder of index.html (JavaScript off, or app.js missing). */
html:not(.is-ready) .profile {
  margin-bottom: auto;
}

.profile__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* A soft, colourless light falls on the logo, like a spot in a vitrine.
   It stays within true black: #000 at the edges, about #0B0B0B at most. */
.profile__stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(var(--mark-h) * .62);
  left: 50%;
  width: calc(var(--mark-h) * 4.4);
  height: calc(var(--mark-h) * 4.4);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .045), rgba(255, 255, 255, .033) 22%, rgba(255, 255, 255, .02) 42%, rgba(255, 255, 255, .01) 60%, rgba(255, 255, 255, .004) 78%, rgba(255, 255, 255, .0012) 90%, rgba(255, 255, 255, 0));
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* The mark: a fixed-height box, so nothing moves while it loads. */
.logo {
  position: relative;
  display: flex;
  justify-content: center;
  height: var(--mark-h);
}

.logo__img {
  height: 100%;
  width: auto;
  max-width: min(100%, 260px);
  object-fit: contain;
  /* Width before the file has loaded: the shape of the Balvoro mark. */
  aspect-ratio: auto 362 / 540;
}

/* logoStyle "circle" / "rounded": a square logo, cropped, with a hairline. */
.logo--circle,
.logo--rounded {
  align-items: center;
}

.logo--circle .logo__img,
.logo--rounded .logo__img {
  width: calc(var(--mark-h) * .84);
  height: calc(var(--mark-h) * .84);
  aspect-ratio: 1;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--rule-strong);
}

.logo--circle .logo__img {
  border-radius: 50%;
}

.logo--rounded .logo__img {
  border-radius: 18%;
}

/* No logo, or it could not be loaded: the first letter in a hairline frame. */
.logo--monogram {
  align-items: center;
  justify-content: center;
  width: calc(var(--mark-h) * .7);
  border: 1px solid var(--rule-strong);
}

.logo__monogram {
  font-family: var(--serif);
  font-size: calc(var(--mark-h) * .56);
  font-weight: 300;
  line-height: 1;
  color: var(--white);
  user-select: none;
  -webkit-user-select: none;
}

/* The name: the gold BALVORO lettering (brand.wordmark). The text stays for
   screen readers and search engines; it shows when there is no lettering
   image or the image cannot be loaded. */
.profile__name {
  max-width: 100%;
  margin-top: calc(var(--mark-h) * .25);
}

.profile__name.has-wordmark {
  width: var(--wm-w);
  line-height: 0;
}

.profile__wordmark-box {
  position: relative;
  display: block;
}

.profile__wordmark {
  width: 100%;
  height: auto;
}

.profile__name-text {
  display: block;
  max-width: 100%;
  font-family: var(--serif);
  font-size: calc(var(--mark-h) * .26);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: .18em;
  text-indent: .18em;   /* re-centres the spaced word */
  text-transform: uppercase;
  color: var(--white);
  overflow-wrap: anywhere;
  text-wrap: balance;
}

/* "INTERIOR DESIGN": the descriptor of the lockup, between two hairlines. */
.profile__tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 100%;
  margin-top: calc(var(--mark-h) * .16);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: .5em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Trailing tracking would push the words off centre: trim it, so the
   words sit exactly on the axis of the logo, with equal gaps each side. */
.profile__tagline-text {
  min-width: 0;
  margin-inline-end: -.5em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

/* A longer tagline (app.js adds --long): tighter spacing, so it still fits. */
.profile__tagline--long {
  letter-spacing: .28em;
  line-height: 18px;
}

.profile__tagline--long .profile__tagline-text {
  margin-inline-end: -.28em;
}

.profile__tagline::before,
.profile__tagline::after {
  content: "";
  flex: none;
  width: 22px;
  height: 1px;
  background-color: var(--rule-strong);
}

.profile__tagline::before {
  transform-origin: right center;
}

.profile__tagline::after {
  transform-origin: left center;
}

/* Location and the short "about" text, under the logo. */
.profile-notes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.profile__location {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink);
}

.profile__location .icon {
  font-size: 15px;
  color: var(--icon);
}

.profile__location > span {
  min-width: 0;
  margin-inline-end: -.24em;
  overflow-wrap: anywhere;
}

.profile__about {
  max-width: 31em;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  overflow-wrap: anywhere;
  text-wrap: balance;
}


/* 5. SECTIONS & BUTTONS ==================================================== */

/* Section title:  CONTACT ──────────────────  (the hairline runs to the
   column edge, so every block starts and ends on the same two lines). */
.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-title::after {
  content: "";
  flex: 1 1 auto;
  min-width: 24px;
  height: 1px;
  background-color: var(--rule);
}

.section-title__text {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Quick contact: one row of hairline cells (2 to 5 share the row), flush
   with the column edges like every button below; icon above its name.
   Every group on the page uses the same 8px gap between its buttons. */
.actions__list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
}

.actions__item {
  display: flex;
  min-width: 0;
}

.action {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-width: 0;
  min-height: 88px;
  padding: 16px 4px 15px;
  border: 1px solid var(--edge);
  text-align: center;
  color: var(--white);
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.action__icon {
  display: grid;
  place-items: center;
  font-size: 21px;
}

.action__label {
  max-width: 100%;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .12em;
  text-indent: .12em;   /* re-centres the spaced word */
  text-transform: uppercase;
  color: var(--ink);
  overflow-wrap: anywhere;
  transition: color var(--speed) var(--ease);
}

/* Five actions (e.g. with Website) share the row with slightly smaller
   names; on narrow phones they sit 3 over 2 (see section 9). */
.actions__list[data-count="5"] .action__label {
  font-size: 9px;
  letter-spacing: .04em;
  text-indent: .04em;
}

.action:active {
  background-color: var(--fill-press);
  border-color: var(--edge-hi);
}

/* Link buttons: [icon] name (display serif) [arrow], sharp corners. The
   icon is optional: without one, the name says it all. */
.stack {
  display: grid;
  gap: 8px;
}

.btn {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 12px 20px;
  border: 1px solid var(--edge);
  color: var(--white);
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.btn__chip {
  display: grid;
  flex: none;
  place-items: center;
  font-size: 19px;
  color: var(--icon);
}

.btn__text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  text-align: start;
}

.btn__label {
  max-width: 100%;
  font-family: var(--serif);
  font-size: clamp(17.5px, 4.9vw, 19.5px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: .004em;
  overflow-wrap: anywhere;
}

.btn__sub {
  max-width: 100%;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.btn__end {
  display: grid;
  flex: none;
  place-items: center;
  font-size: 15px;
  color: var(--icon);
}

.btn__end .icon {
  transition: transform var(--speed) var(--ease);
}

.btn:active {
  background-color: var(--fill-press);
}

/* The featured link: solid white, black type. */
.btn--featured {
  border-color: var(--white);
  background-color: var(--white);
  color: #000;
}

.btn--featured .btn__chip,
.btn--featured .btn__end {
  color: #000;
}

.btn--featured .btn__sub {
  color: var(--on-white-muted);
}

.btn--featured:active {
  border-color: #D9D9D9;
  background-color: #D9D9D9;
}

/* Socials: a 2 x 2 grid of the same buttons (app.js uses one column
   instead when a name is long). An odd last one takes the full row. */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tiles > li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* Social tile: brand icon + name, nothing else (the icon already says
   where it leads). */
.btn--tile {
  gap: 12px;
  min-height: 60px;
  padding: 10px 16px;
}

.btn--tile .btn__chip {
  font-size: 18px;
}

.btn--tile .btn__label {
  font-size: clamp(16px, 4.5vw, 17.5px);
}

/* Socials as icons only (config: socialsStyle "icons"): hairline squares. */
.social-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.social-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--edge);
  font-size: 20px;
  color: var(--white);
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.social-icon:active {
  background-color: var(--fill-press);
  border-color: var(--edge-hi);
}

/* Arrows point the other way on right-to-left pages. */
html[dir="rtl"] .icon--flip {
  transform: scaleX(-1);
}


/* 6. COMING SOON =========================================================== */

.soon {
  text-align: center;
}

.soon__badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--ink);
}

.soon__badge > span:last-child {
  min-width: 0;
  margin-inline-end: -.34em;
  overflow-wrap: anywhere;
}

/* A small status light; it breathes softly three times, then rests. */
.soon__dot {
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--white);
}

.soon__title {
  max-width: 10.5em;
  margin: 22px auto 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -.012em;
  color: var(--white);
  overflow-wrap: break-word;
  text-wrap: balance;
}

.soon__text {
  max-width: 31em;
  margin: 18px auto 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.soon__platforms {
  margin-top: 30px;
}

/* ──────── SOON ON ──────── */
.soon__label {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--muted);
}

.soon__label::before,
.soon__label::after {
  content: "";
  flex: 1 1 0;
  min-width: 16px;
  height: 1px;
  background-color: var(--rule);
}

.soon__label::before {
  margin-inline-end: .34em;
}

/* Not links: plain dimmed symbols, no frame, no hover (#C8C8C8 at 55%
   gives #6E6E6E on black). */
.soon__icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 30px;
  margin-top: 22px;
}

.soon__icon {
  display: inline-grid;
  place-items: center;
  font-size: 19px;
  line-height: 0;
  color: #C8C8C8;
  opacity: .55;
}


/* 7. SHARE / SAVE CONTACT, FOOTER, TOAST, DEVELOPER BAR ===================== */

.utility {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pill {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-width: 0;
  min-height: 52px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--edge);
  border-radius: 0;
  background-color: transparent;
  color: var(--white);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .24em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.pill > span:last-child {
  min-width: 0;
  margin-inline-end: -.24em;
  overflow-wrap: anywhere;
}

.pill .icon {
  font-size: 16px;
}

/* Only one of the two buttons: centred, not full width. */
.pill:only-child {
  flex: 0 1 236px;
}

.pill:active {
  background-color: var(--fill-press);
}

.footer {
  width: 100%;
  max-width: var(--column);
  margin-top: auto;
  padding-top: 44px;
  text-align: center;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .05em;
  color: var(--quiet);
}

.footer::before {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  margin: 0 auto 14px;
  background-color: var(--rule-strong);
}

.footer p {
  overflow-wrap: anywhere;
}

/* Toast: a small white tag rising from the bottom edge. */
.toast {
  position: fixed;
  right: 16px;
  bottom: max(24px, env(safe-area-inset-bottom) + 16px);
  left: 16px;
  z-index: 60;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.toast__pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 13px 20px;
  background-color: var(--white);
  color: #000;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .2em;
  text-transform: uppercase;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .8);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}

/* A longer message (e.g. "open this page in Safari or Chrome"): normal
   letters, easier to read. */
.toast__pill--long {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.toast__pill .icon {
  font-size: 15px;
}

.toast.is-visible .toast__pill {
  opacity: 1;
  transform: none;
}

/* Only shown on your own computer when config.js has a problem: a white
   warning bar. It sits above the page (never on top of the logo) and stays
   visible on scroll. */
.dev-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top) + 8px) 12px 12px 16px;
  border-bottom: 1px solid #000;
  background-color: var(--white);
  color: #000;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6);
}

.dev-banner > .icon {
  margin-top: 1px;
  font-size: 20px;
}

.dev-banner__text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.dev-banner__hint {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: #333;
}

.dev-banner__close {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  margin: -5px 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
}

.dev-banner__close:hover {
  background-color: rgba(0, 0, 0, .08);
}

.dev-banner__close:focus-visible {
  outline-color: #000;
  outline-offset: 0;
}


/* 8. HOVER (real mouse only, no sticky hover on phones) ===================== */

@media (hover: hover) and (pointer: fine) {
  .action:hover,
  .social-icon:hover {
    border-color: var(--white);
    background-color: var(--white);
    color: #000;
  }

  .action:hover .action__label {
    color: #000;
  }

  .btn:hover,
  .pill:hover {
    border-color: var(--edge-hi);
    background-color: var(--fill-hover);
  }

  .btn--featured:hover {
    border-color: #E6E6E6;
    background-color: #E6E6E6;
  }

  .btn:hover .btn__end .icon {
    transform: translate(2px, -2px);
  }

  html[dir="rtl"] .btn:hover .btn__end .icon {
    transform: scaleX(-1) translate(2px, -2px);
  }
}


/* 9. SMALL PHONES, TABLETS & DESKTOP ======================================== */

/* Narrow phones: tighter spacing on the contact names and the two small
   buttons, so "WHATSAPP" or "LOCATION" never breaks; five contact buttons
   sit 3 over 2. */
@media (max-width: 389px) {
  .action {
    padding-inline: 2px;
  }

  .action__label {
    letter-spacing: .06em;
    text-indent: .06em;
  }

  .actions__list[data-count="5"] {
    grid-auto-flow: row;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .actions__list[data-count="5"] > li {
    grid-column: span 2;
  }

  .actions__list[data-count="5"] > li:nth-child(n+4) {
    grid-column: span 3;
  }

  .actions__list[data-count="5"] .action__label {
    font-size: 10px;
    letter-spacing: .06em;
    text-indent: .06em;
  }

  .pill {
    gap: 9px;
    padding-inline: 8px;
    letter-spacing: .16em;
  }

  .pill > span:last-child {
    margin-inline-end: -.16em;
  }
}

/* Small phones with a short screen: a slightly smaller jewel, so the
   launch page still fits in one screen. */
@media (max-width: 389px) and (max-height: 760px) {
  :root {
    --mark-h: clamp(96px, 28vw, 112px);
  }

  .page {
    padding-top: max(36px, env(safe-area-inset-top) + 24px);
  }

  .page--launch .page__body {
    margin-top: 52px;
  }

  .footer {
    padding-top: 36px;
  }

  .soon__title {
    font-size: 31px;
  }
}

@media (max-width: 359px) {
  :root {
    --gutter: 20px;
  }

  .utility {
    flex-direction: column;
  }

  .pill:only-child {
    flex: 1 1 auto;
  }

  .actions__list {
    gap: 6px;
  }

  .action {
    min-height: 82px;
  }

  .action__label {
    font-size: 9.5px;
    letter-spacing: .03em;
    text-indent: .03em;
  }

  .tiles {
    grid-template-columns: minmax(0, 1fr);
  }

  .soon__title {
    font-size: 30px;
  }
}

@media (min-width: 700px) {
  :root {
    --mark-h: 150px;
  }

  .page {
    padding-top: max(80px, env(safe-area-inset-top) + 56px);
  }

  .page__body,
  .page--launch .page__body {
    margin-top: 64px;
  }

  .soon__title {
    font-size: 38px;
  }
}

/* Phones held sideways: a smaller jewel, so the content starts in view. */
@media (min-width: 600px) and (max-width: 1023px) and (max-height: 500px) {
  :root {
    --mark-h: 92px;
  }

  .page {
    padding-top: max(28px, env(safe-area-inset-top) + 20px);
  }

  .page__body,
  .page--launch .page__body {
    margin-top: 40px;
  }
}

/* Desktop: a two-page spread. The jewel stays on its own black page
   (sticky), the content scrolls beside it; they swap sides in RTL. */
@media (min-width: 1024px) {
  :root {
    --mark-h: clamp(168px, 24vh, 224px);
    --column: 432px;
  }

  .page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    min-height: 100vh;
    overflow: visible;
    padding: 0;
  }

  /* The light stays on the jewel's own page. */
  .profile,
  html:not(.is-ready) .profile {
    position: sticky;
    top: 0;
    grid-column: 1;
    grid-row: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    border-inline-end: 1px solid var(--rule);
  }

  .profile__stage {
    width: 100%;
    padding-inline: 32px;
    transform: translateY(-3%);
  }

  .profile__tagline {
    gap: 18px;
    font-size: 12px;
    letter-spacing: .6em;
  }

  .profile__tagline-text {
    margin-inline-end: -.6em;
  }

  .profile__tagline--long {
    letter-spacing: .32em;
  }

  .profile__tagline--long .profile__tagline-text {
    margin-inline-end: -.32em;
  }

  .profile__tagline::before,
  .profile__tagline::after {
    width: 34px;
  }

  .page__body,
  .page--launch .page__body {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    width: min(var(--column), calc(100% - 128px));
    margin: 0 auto;
    padding: 96px 0;
  }

  /* The launch statement sits a little below the middle, as in the design. */
  .page--launch .page__body {
    margin-top: 64px;
  }

  /* The footer signs the jewel's page, at its foot. */
  .footer {
    position: fixed;
    bottom: 34px;
    inset-inline-start: 0;
    width: 50%;
    max-width: none;
    padding: 0 32px;
  }

  .footer::before {
    display: none;
  }

  .soon__title {
    font-size: 40px;
  }

  .btn__label {
    font-size: 19.5px;
  }

  .btn--tile .btn__label {
    font-size: 17.5px;
  }
}

/* Laptops with a short window (e.g. 1440 x 790 in Safari): a slightly
   tighter rhythm, so the full page still fits without scrolling. */
@media (min-width: 1024px) and (max-height: 860px) {
  .page__body,
  .page--launch .page__body {
    gap: 36px;
    padding-block: 52px;
  }
}


/* 10. MOTION, RTL, REDUCED MOTION ========================================== */

/* Until app.js has drawn the page, keep it invisible (no flash of the
   placeholder). If app.js fails to run, show it anyway after 2 seconds. */
.js:not(.is-ready) .page {
  opacity: 0;
  animation: page-fallback .3s linear 2s forwards;
}

@keyframes page-fallback {
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* The logo waits for its own files (at most about a second, app.js), so
     its entrance never plays on an empty box. */
  .js:not(.logo-ready) .profile__stage {
    opacity: 0;
    animation: page-fallback .3s linear 2s forwards;
  }

  /* The pillars rise, the lettering opens from its centre, the light comes up. */
  .logo-ready .logo {
    animation: mark-rise 1.25s var(--ease-out) .1s both;
  }

  .logo-ready .profile__wordmark-box,
  .logo-ready .profile__name-text {
    animation: word-open 1.15s var(--ease-out) .45s both;
  }

  .logo-ready .profile__tagline {
    animation: fade 1s var(--ease) .85s both;
  }

  .logo-ready .profile__tagline::before,
  .logo-ready .profile__tagline::after {
    animation: rule-draw .9s var(--ease-out) 1s both;
  }

  .logo-ready .profile__stage::before {
    animation: fade 2.2s ease-out both;
  }

  /* One glint of light travels over the gold, once: a brighter copy of the
     logo (app.js sets --glint to the logo's own file) seen through a moving
     band. No colour is added. To switch it off, delete these rules. */
  .logo--plain::after,
  .profile__wordmark-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--glint, none) center / contain no-repeat;
    filter: saturate(.7) brightness(1.55);
    opacity: 0;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(105deg, transparent 40%, #000 50%, transparent 60%);
    mask-image: linear-gradient(105deg, transparent 40%, #000 50%, transparent 60%);
    -webkit-mask-size: 300% 100%;
    mask-size: 300% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
  }

  .logo-ready .logo--plain::after {
    animation: glint 1.5s cubic-bezier(.45, .05, .25, 1) 1.5s both;
  }

  .logo-ready .profile__wordmark-box::after {
    animation: glint 1.6s cubic-bezier(.45, .05, .25, 1) 1.72s both;
  }

  /* Content rises in, one block after another (app.js sets --i). */
  .is-ready .reveal {
    animation: rise .7s var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 80ms + .3s);
  }

  .is-ready .soon__dot {
    animation: breathe 2.4s ease-in-out 1.6s 3;
  }
}

@keyframes mark-rise {
  from {
    -webkit-clip-path: inset(100% 0 0 0);
    clip-path: inset(100% 0 0 0);
    transform: translateY(8px);
  }

  to {
    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
    transform: none;
  }
}

@keyframes word-open {
  from {
    -webkit-clip-path: inset(0 50% 0 50%);
    clip-path: inset(0 50% 0 50%);
  }

  to {
    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
  }
}

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

@keyframes rule-draw {
  from {
    transform: scaleX(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes glint {
  0% {
    opacity: 0;
    -webkit-mask-position: 100% 0;
    mask-position: 100% 0;
  }

  12%,
  86% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    -webkit-mask-position: 0% 0;
    mask-position: 0% 0;
  }
}

@keyframes breathe {
  50% {
    opacity: .22;
  }
}

/* Reduce motion: everything appears in place; nothing moves or fades. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

/* Right-to-left (Arabic): no letter-spacing or capitals on joined script,
   a little more size for Arabic letterforms. */
html[dir="rtl"] .profile__name-text,
html[dir="rtl"] .profile__tagline,
html[dir="rtl"] .profile__location,
html[dir="rtl"] .section-title,
html[dir="rtl"] .action__label,
html[dir="rtl"] .soon__badge,
html[dir="rtl"] .soon__label,
html[dir="rtl"] .pill,
html[dir="rtl"] .toast__pill {
  letter-spacing: 0;
  text-indent: 0;
}

html[dir="rtl"] .profile__tagline-text,
html[dir="rtl"] .profile__location > span,
html[dir="rtl"] .soon__badge > span:last-child,
html[dir="rtl"] .pill > span:last-child,
html[dir="rtl"] .soon__label::before {
  margin-inline-end: 0;
}

html[dir="rtl"] .profile__tagline {
  font-size: 15px;
}

/* A long Arabic tagline that wraps: room for the joined letters. */
html[dir="rtl"] .profile__tagline--long {
  line-height: 1.5;
}

html[dir="rtl"] .profile__location,
html[dir="rtl"] .section-title,
html[dir="rtl"] .soon__badge,
html[dir="rtl"] .soon__label,
html[dir="rtl"] .action__label,
html[dir="rtl"] .pill,
html[dir="rtl"] .toast__pill {
  font-size: 13px;
}

html[dir="rtl"] .soon__title {
  font-size: 30px;
  line-height: 1.35;
}

@media print {
  .toast,
  .utility,
  .dev-banner {
    display: none !important;
  }
}
