@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* Day (light) by default; night when theme.js says so, or when the OS is dark and JS is off. */
:root {
  --bg: #FBF7F1;
  --card: #FFFFFF;
  --ink: #17110C;
  --muted: rgba(23, 17, 12, .62);
  --line: rgba(23, 17, 12, .1);
  --a1: #F28A4C;
  --a2: #EBC874;
  --grad: linear-gradient(100deg, var(--a1), var(--a2));
  --grad-text: linear-gradient(100deg, #E2682A, #C98F2A);
  --sun: rgba(242, 138, 76, .30);
  --sun2: rgba(235, 200, 116, .20);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --soft: cubic-bezier(.22, 1, .36, 1);
}
:root[data-theme="dark"] {
  --bg: #14100C;
  --card: #1E1812;
  --ink: #F6EFE6;
  --muted: rgba(246, 239, 230, .62);
  --line: rgba(246, 239, 230, .12);
  --grad-text: var(--grad);
  --sun: rgba(242, 138, 76, .26);
  --sun2: rgba(150, 70, 30, .18);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #14100C; --card: #1E1812; --ink: #F6EFE6;
    --muted: rgba(246, 239, 230, .62); --line: rgba(246, 239, 230, .12);
    --grad-text: var(--grad);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 "Inter", system-ui, -apple-system, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 1s, color 1s;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--a2); color: #17110C; }

.wrap { width: min(680px, 100% - 40px); margin-inline: auto; }

/* top bar */
.top { padding: 22px 0; position: relative; z-index: 2; }
.me { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.ring {
  position: relative; width: 48px; height: 48px; border-radius: 50%; padding: 2px;
  background: conic-gradient(from var(--angle, 0deg), var(--a1), var(--a2), var(--a1));
  animation: spin 6s linear infinite;
}
.ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); }
.me:hover .ring { animation-duration: 1.5s; }
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --angle: 360deg; } }

/* hero */
.hero { position: relative; padding: 96px 0 40px; }
.sun {
  position: absolute; z-index: -1; pointer-events: none;
  width: 620px; height: 620px; top: -300px; right: -240px; border-radius: 50%;
  background: radial-gradient(circle at center, var(--sun), var(--sun2) 42%, transparent 68%);
  filter: blur(8px);
  animation: breathe 9s ease-in-out infinite alternate;
}
@keyframes breathe { from { transform: translate(0, 0) scale(1); } to { transform: translate(-30px, 24px) scale(1.08); } }

h1 {
  font-size: clamp(34px, 6.4vw, 58px);
  line-height: 1.1; letter-spacing: -.035em; font-weight: 600;
}
h1 em, .about em { font-style: normal; }
.g, h1 em, .about em {
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* greeting in the visitor's language: letters swap one by one */
.hi {
  display: inline-block; position: relative; height: 1.1em; vertical-align: top; white-space: nowrap;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: width 1.1s var(--soft);
}
.hi .word { display: inline-block; }
.hi .word.abs { position: absolute; top: 0; left: 50%; transform: translateX(-50%); }
.hi .ch {
  display: inline-block; white-space: pre;
  transition: transform 1.1s var(--soft), opacity .9s var(--soft);
}
.hi .ch.below { transform: translateY(.3em); opacity: 0; }
.hi .ch.above { transform: translateY(-.3em); opacity: 0; transition-duration: .7s, .5s; }
/* once the headline is in, stop clipping so letters never hit a hard edge */
.w.free { overflow: visible; }

/* words rise out of a mask (added by app.js) */
.w { display: inline-block; overflow: clip; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.w > span { display: inline-block; transform: translateY(105%); transition: transform .9s var(--ease); }
.go .w > span { transform: none; }

/* social pills */
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px 0 12px;
  border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  text-decoration: none; font-size: 15px; font-weight: 500;
  opacity: 0; transform: scale(.6) translateY(12px);
  transition: opacity .4s ease, transform .6s var(--spring), border-color .2s, box-shadow .2s;
}
.pill img { width: 22px; height: 22px; transition: transform .4s var(--spring); }
.go .pill { opacity: 1; transform: none; }
.pill:hover { border-color: rgba(242, 138, 76, .55); box-shadow: 0 10px 24px -14px rgba(242, 138, 76, .8); transform: translateY(-2px); }
.pill:hover img { transform: rotate(-10deg) scale(1.12); }
.pill:active { transform: scale(.96); }

/* about */
.about { padding: 28px 0 8px; font-size: clamp(18px, 2.3vw, 20px); line-height: 1.65; }
.about p + p { margin-top: 18px; }
.about p { color: var(--muted); }
.brand {
  display: inline-flex; align-items: center; gap: 6px; vertical-align: -3px;
  color: var(--ink); font-weight: 600; text-decoration: none;
  transition: color .2s;
}
.brand img { width: 20px; height: 20px; border-radius: 5px; transition: transform .4s var(--spring); }
.brand:hover img { transform: rotate(-12deg) scale(1.15); }
.brand:hover { color: var(--a1); }

.up { opacity: 0; transform: translateY(18px); filter: blur(4px); transition: opacity .8s ease, transform .8s var(--ease), filter .8s ease; }
.up.in { opacity: 1; transform: none; filter: none; }

/* footer */
.foot { margin-top: 140px; overflow: hidden; }
.foot__row { font-size: 14px; color: var(--muted); padding-bottom: 8px; }
.giant {
  font-size: clamp(64px, 17vw, 220px); font-weight: 700; letter-spacing: -.06em; line-height: .8;
  text-align: center; white-space: nowrap;
  margin-bottom: -.12em; padding-top: 16px;
}
.giant .l {
  display: inline-block;
  background: linear-gradient(100deg, var(--a1), var(--a2), var(--a1));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transform: translateY(60%); opacity: 0;
  transition: transform 1s var(--spring), opacity .6s ease;
  animation: shimmer 8s linear infinite;
}
.giant.in .l { transform: none; opacity: 1; }
.giant .l:hover { transform: translateY(-8%); transition-duration: .3s; }
@keyframes shimmer { to { background-position: 300% 0; } }

/* no JS: show everything */
.no-js .w > span, .no-js .pill, .no-js .up, .no-js .giant .l { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .w > span, .pill, .up, .giant .l { opacity: 1 !important; transform: none !important; filter: none !important; }
}

@media (max-width: 560px) {
  .hero { padding-top: 56px; }
  .sun { width: 440px; height: 440px; top: -220px; right: -220px; }
}

/* Nomad as a word in the brand gradient, no icon */
.brand--grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 700;
}
.brand--grad:hover { color: transparent; filter: brightness(1.15); }

/* three social pills on one line on phones */
.pill .sm { display: none; }
@media (max-width: 440px) {
  .socials { flex-wrap: nowrap; gap: 8px; }
  .pill { height: 42px; padding: 0 12px 0 9px; gap: 7px; font-size: 13.5px; flex: 0 1 auto; min-width: 0; white-space: nowrap; }
  .pill img { width: 20px; height: 20px; }
  .pill .lg { display: none; }
  .pill .sm { display: inline; }
  .pill:first-child .lg { display: inline; }
}
@media (max-width: 360px) {
  .socials { gap: 6px; }
  .pill { padding: 0 10px 0 8px; gap: 6px; font-size: 12.5px; }
  .pill img { width: 18px; height: 18px; }
}

/* centred layout */
.top { display: flex; justify-content: center; padding: 64px 0 0; }
.hero { padding-top: 64px; }
.ring { width: 52px; height: 52px; }
.hero, .about, .foot__row { text-align: center; }
h1 { text-wrap: balance; }
.socials { justify-content: center; }
.about { max-width: 560px; }
.sun { left: calc(50% - 310px); right: auto; top: -360px; }
@media (max-width: 560px) {
  .sun { left: calc(50% - 220px); top: -260px; }
}
.ring { width: 64px; height: 64px; padding: 2.5px; }
.me { transition: transform .4s var(--spring); }
.me:hover { transform: scale(1.06) rotate(-3deg); }

/* the three social pills, same style everywhere */
.pill .sm, .pill .lg { display: inline; }
@media (max-width: 560px) {
  .top { padding-top: 44px; }
  .hero { padding-top: 44px; }
}

.me { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
