/*
 * The starlite.finance holding page (D-0236): spec §3.5's hero in Dawn, the Chrome Orbit tokens of DESIGN.md, no
 * JavaScript. Fonts are the app's pinned Fontsource files, copied in by scripts/holding-site.sh.
 */
@font-face {
  font-family: "Righteous";
  src: url("/fonts/righteous-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("/fonts/sora-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("/fonts/dm-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --porcelain: #efe6d2;
  --ink: #1e1a33;
  --orange: #ff6a1f;
  --orange-hi: #ff9a5c;
  --orange-lo: #e7581a;
  --fg: #1e1a33;
  --muted: #5c5878;
  --up: #286ba2;
  --glass: rgb(255 255 255 / 0.55);
  --glass-solid: #f7f5fb;
  --line: rgb(255 255 255 / 0.9);
  --tag-bg: rgb(255 255 255 / 0.55);
  --shadow: 0 18px 40px rgb(30 26 51 / 0.1);
  --wm-base: #6e7b88;
  --wm-blur: rgb(30 26 51 / 0.3);
  --bub-a: rgb(255 255 255 / 0.95);
  --bub-b: rgb(255 255 255 / 0.3);
  --bub-glow: rgb(255 255 255 / 0.55);
  --ground: linear-gradient(180deg, #e6ecf7, #ede8f5 50%, #f5ebe8);
  --sky: linear-gradient(160deg, #bcd8f2, #cfc6f4 48%, #f7cdb9);
  --chrome: linear-gradient(
    180deg,
    #fff 0%,
    #e8eef3 12%,
    #8fa2b3 30%,
    #fff 42%,
    #5c6b7c 55%,
    #d5dee6 68%,
    #fff 80%,
    #7b8a9b 100%
  );
  --chrome-line: linear-gradient(90deg, #f6f8f9, #b9c3c9 26%, #6b7982 50%, #dce3e7 74%, #97a3aa);
  --display: "Righteous", ui-rounded, sans-serif;
  --body: "Sora", "Avenir Next", ui-sans-serif, system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --page-x: 16px;
}

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

html {
  background: #ede8f5;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: var(--page-x);
  background: var(--ground);
  color: var(--fg);
  font: 400 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgb(40 107 162 / 0.22);
  color: var(--fg);
}

h1,
h2,
p {
  margin: 0;
}

/* The hero: the sky is the page's one scenic gradient (§3.6 principle 5). */
.sky {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "top" "scenery" "copy" "corner";
  gap: 20px;
  padding: 20px;
  border-radius: 28px;
  background: var(--sky);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}

.top {
  grid-area: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.crosshair {
  width: 14px;
  height: 14px;
  color: rgb(30 26 51 / 0.5);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--tag-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font: 400 11px/1.4 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Bubbles are scenery only and sit in their own grid area, so they are never behind text (§3.6 principle 6). */
.scenery {
  grid-area: scenery;
  position: relative;
  min-height: 236px;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle at 32% 30%,
    var(--bub-a),
    var(--bub-b) 28%,
    transparent 50%,
    rgb(255 255 255 / 0.14) 76%,
    var(--bub-a) 100%
  );
  box-shadow:
    inset 0 -12px 30px var(--bub-glow),
    inset 0 3px 8px rgb(255 255 255 / 0.6),
    var(--shadow);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.bubble--lg {
  width: 128px;
  height: 128px;
  top: 44px;
  right: 18%;
}

.bubble--md {
  width: 60px;
  height: 60px;
  top: 128px;
  right: 4%;
}

.bubble--sm {
  width: 30px;
  height: 30px;
  top: 30px;
  right: 52%;
}

.sparkle {
  position: absolute;
  width: 18px;
  height: 18px;
  top: 40px;
  right: calc(18% + 132px);
  color: #fff;
  filter: drop-shadow(0 0 5px rgb(255 255 255 / 0.9));
}

/* The one authored moment: the bubbles drift, slowly, unless the visitor asks for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .bubble--lg {
    animation: drift 11s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
  }
  .bubble--md {
    animation: drift 8s cubic-bezier(0.45, 0, 0.55, 1) -3s infinite alternate;
  }
  .bubble--sm {
    animation: drift 13s cubic-bezier(0.45, 0, 0.55, 1) -6s infinite alternate;
  }
}

@keyframes drift {
  to {
    transform: translate3d(0, -10px, 0);
  }
}

/* The faint globe of §3.4 as an orbit around the large bubble: a background ornament, inside the scenery area only. */
.globe {
  position: absolute;
  width: 250px;
  height: 250px;
  top: -17px;
  right: calc(18% - 61px);
  color: rgb(30 26 51 / 0.1);
}

.micro {
  display: none;
}

.copy {
  grid-area: copy;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

/* Chrome is type and ornament, never a panel (§3.2, §3.6 principle 3); a deliberate identity choice (D-0183). */
.wordmark {
  display: flex;
  flex-direction: column;
  font: 400 clamp(64px, 17vw, 96px) / 0.9 var(--display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px rgb(255 255 255 / 0.5);
  filter: drop-shadow(0 4px 0 var(--wm-base)) drop-shadow(0 16px 22px var(--wm-blur));
}

.lede {
  max-width: 34ch;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
  text-wrap: pretty;
}

.status {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  min-height: 30px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--porcelain);
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 #fff,
    var(--shadow);
  font: 400 12px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.corner {
  grid-area: corner;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

/* The glass widget of §3.3, with its chrome hairline. */
.contact {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.18),
    var(--shadow);
}

.contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--chrome-line);
  opacity: 0.75;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .contact {
    background: var(--glass-solid);
  }
  .tag {
    background: var(--glass-solid);
  }
}

.label {
  font: 400 11px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.address {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
  user-select: all;
}

/* Orange gloss, the one action on the page (§3.3, §3.6 principle 7); ink text on it (D-0189). */
.button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  height: 42px;
  margin-top: 8px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--orange-hi), var(--orange) 55%, var(--orange-lo));
  color: var(--ink);
  font: 400 13px/1 var(--display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 0.5),
    inset 0 -3px 0 rgb(120 40 0 / 0.3),
    0 10px 22px rgb(255 106 31 / 0.32);
  transition:
    transform 160ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 0.5),
    inset 0 -3px 0 rgb(120 40 0 / 0.3),
    0 14px 26px rgb(255 106 31 / 0.38);
}

.button:active {
  transform: translateY(1px);
}

.button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.tribal {
  display: none;
  width: 170px;
  height: 78px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 0 4px 2px;
  font: 400 11px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 399px) {
  .status {
    font-size: 11px;
    letter-spacing: 0.05em;
    padding-inline: 12px;
  }
}

@media (min-width: 640px) {
  :root {
    --page-x: 24px;
  }
  .sky {
    padding: 28px;
  }
  .contact {
    width: max-content;
    max-width: 100%;
  }
}

/* From 900px: the spec's hero layout. Copy bottom-left, the contact widget and the tribal ornament bottom-right. */
@media (min-width: 900px) {
  :root {
    --page-x: 40px;
  }
  body {
    gap: 14px;
  }
  .sky {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto minmax(110px, 1fr) auto;
    grid-template-areas:
      "top top"
      "scenery scenery"
      "copy corner";
    gap: 24px 40px;
    min-height: 440px;
    padding: 36px 56px 32px 40px;
  }
  .scenery {
    min-height: 0;
  }
  .bubble--lg {
    width: 190px;
    height: 190px;
    top: 4%;
    right: 15%;
  }
  .bubble--md {
    width: 90px;
    height: 90px;
    top: 52%;
    right: 6%;
  }
  .bubble--sm {
    width: 44px;
    height: 44px;
    top: 10%;
    right: 40%;
  }
  .sparkle {
    top: 2%;
    right: calc(15% + 196px);
  }
  .globe {
    width: 440px;
    height: 440px;
    top: calc(4% - 125px);
    right: calc(15% - 125px);
  }
  .micro {
    display: block;
    position: absolute;
    top: 50%;
    right: 22px;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    font: 400 9px/1 var(--mono);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .corner {
    align-items: flex-end;
    justify-content: flex-end;
  }
  .tribal {
    display: block;
  }
}

@media (min-width: 1280px) and (min-height: 820px) {
  .bubble--lg {
    width: 230px;
    height: 230px;
    right: 16%;
  }
  .sparkle {
    right: calc(16% + 236px);
  }
  .globe {
    width: 520px;
    height: 520px;
    top: calc(4% - 145px);
    right: calc(16% - 145px);
  }
}

/* Short laptop screens: a smaller orbit, so it stays clear of the contact widget. */
@media (min-width: 900px) and (max-height: 820px) {
  .globe {
    width: 340px;
    height: 340px;
    top: calc(4% - 75px);
    right: calc(15% - 75px);
  }
}
