:root {
  --grey-900: #07080a;
  --grey-800: #0c0d0f;
  --grey-700: #111214;
  --grey-600: #1b1c1e;
  --grey-500: #2f3031;
  --grey-400: #434345;
  --grey-300: #6a6b6c;
  --grey-200: #9c9c9d;
  --grey-100: #cdcece;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--grey-900);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

img,
svg {
  display: block;
}

::selection {
  background: rgba(255, 99, 99, 0.35);
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

/* The hero is the first screen of the page. Its text sits in the middle of
   the window whatever the window size, and the animation is centred on the
   same point. The canvas never gets shorter than its design height: on a
   shorter window its top is cut off and its bottom runs below the fold. */
.hero {
  --screen: 100vh;
  --design-height: 615px;
  --canvas-height: max(var(--design-height), var(--screen));
  position: relative;
  isolation: isolate;
  height: calc((var(--screen) + var(--canvas-height)) / 2);
  overflow: hidden;
  overflow: clip;
}

/* On phones, measure the screen with the browser bars showing, so the text is
   centred in what is actually visible. */
@supports (height: 100svh) {
  .hero {
    --screen: 100svh;
  }
}

.hero-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--screen);
  padding: 24px 0;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  max-width: 818px;
  padding: 0 16px;
  opacity: 0;
  transform: translateY(20px);
  animation: fade-in-up 1s ease forwards;
}

.hero-text > h1 {
  max-width: 520px;
  color: #fff;
  font-size: min(36px, 9.6vw);
  font-weight: 600;
  line-height: 110%;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.15);
}

.hero-text > p {
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 0.2px;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(20px);
  animation: fade-in-up 1s ease 1s forwards;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* The animated backdrop: a canvas capped at 1200px, centred behind the text. */
.hero-background {
  position: absolute;
  top: calc((var(--screen) - var(--canvas-height)) / 2);
  right: 0;
  left: 0;
  z-index: -1;
  height: var(--canvas-height);
  max-width: 1200px;
  margin: 0 auto;
  background-color: var(--grey-900);
}

.hero-background > canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* A thin veil over the whole animation, fading to the page colour at the
   bottom and on both sides. */
.hero-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, #07080a20 0%, #07080a20 90%, var(--grey-900) 100%) bottom right / 100% 100% no-repeat,
    linear-gradient(to left, #07080a00 0%, var(--grey-900) 100%) top left / 5% 100% no-repeat,
    linear-gradient(to right, #07080a00 0%, var(--grey-900) 100%) top right / 5% 100% no-repeat;
}

/* Still picture shown when WebGL2 is not available. */
.hero-background.is-static > canvas {
  display: none;
}

.hero-background.is-static::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(48.2deg, #7a0420 0 5%, #e0183d 5% 9%, #ff3d5c 9% 10%, #07080a 10% 12%);
  -webkit-mask-image: radial-gradient(44% 42% at 50% 50%, #000 35%, transparent 100%);
  mask-image: radial-gradient(44% 42% at 50% 50%, #000 35%, transparent 100%);
}

@media screen and (min-width: 500px) {
  .hero-text > h1 {
    font-size: 48px;
  }
}

@media screen and (min-width: 720px) {
  .hero {
    --design-height: 969px;
  }

  .hero-text > h1 {
    max-width: 680px;
    font-size: 64px;
  }

  .hero-text > p {
    font-size: 18px;
  }
}

/* ------------------------------------------------------------------ */
/* Products                                                            */
/* ------------------------------------------------------------------ */

.products {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.card {
  --card-padding: 24px;
  --card-radius: 30px;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--card-padding);
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

/* Hairline border drawn as a gradient ring. */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.06) 38%, rgba(255, 255, 255, 0.06) 62%, rgba(255, 255, 255, 0.1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* The three colours of the Guarana symbol, sampled from its icon. */
.card--guarana {
  --accent: #fd3d56;
  --accent-soft: rgba(253, 61, 86, 0.16);
  --accent-ring: rgba(253, 61, 86, 0.5);
  --active: #fed303;
  --done: #d0fa3f;
  --done-soft: rgba(208, 250, 63, 0.14);
}

/* The Hokaido logo is monochrome, so its card stays neutral. */
.card--hokaido {
  --accent: #f4f4f2;
  --accent-soft: rgba(244, 244, 242, 0.16);
  --accent-ring: rgba(244, 244, 242, 0.5);
}

.card-visual {
  --visual-height: 360px;
  position: relative;
  height: var(--visual-height);
  margin-bottom: 24px;
  user-select: none;
}

.card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  margin-bottom: 10px;
}

/* A horizontal logo used as the card title. The source file is black; it is
   shown in white without touching the file. */
.card-wordmark {
  width: auto;
  height: 15px;
  filter: invert(1);
}

.card-logo {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.card-title {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.card-description {
  max-width: 450px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 15px;
  line-height: 1.5;
  text-wrap: pretty;
}

/* Guarana visual: one guest stay, whose steps complete one after the other. */

.flow {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
}

.flow-head {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}

.flow-head > img {
  border-radius: 6px;
}

.flow-name {
  flex: 1;
  white-space: nowrap;
}

.flow-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
}

.flow-pill > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pill-pulse 2s ease-out infinite;
}

@keyframes pill-pulse {
  0% {
    box-shadow: 0 0 0 0 var(--accent-ring);
  }
  70%,
  100% {
    box-shadow: 0 0 0 7px transparent;
  }
}

.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0 6px;
  list-style: none;
}

.flow-steps > li {
  display: flex;
  flex: none;
  align-items: center;
  gap: 14px;
  height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.28);
  font-size: 15px;
  white-space: nowrap;
  transition: color 0.35s ease, background-color 0.35s ease;
}

.flow-steps > li[data-state="active"] {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.flow-steps > li[data-state="done"] {
  color: rgba(255, 255, 255, 0.6);
}

.flow-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flow-icon {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
}

.flow-icon > * {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.flow-ring {
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.18);
}

.flow-spinner {
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--active, var(--accent));
  opacity: 0;
  animation: flow-spin 0.8s linear infinite;
}

.flow-check {
  width: 100%;
  height: 100%;
  background: var(--done-soft, var(--accent-soft));
  fill: none;
  stroke: var(--done, var(--accent));
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.6);
}

li[data-state="active"] .flow-ring,
li[data-state="done"] .flow-ring {
  opacity: 0;
}

li[data-state="active"] .flow-spinner {
  opacity: 1;
}

li[data-state="done"] .flow-check {
  opacity: 1;
  transform: none;
}

@keyframes flow-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Hokaido visual: every step of a rental comes together in one place.
   The box keeps the proportions of the drawing (480 x 340) and stays centred,
   so the labels, placed in drawing units, always sit under their tiles. */

.hub {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: calc(var(--visual-height) * 480 / 340);
  aspect-ratio: 480 / 340;
  margin: auto;
}

.hub-diagram {
  width: 100%;
  height: 100%;
}

.hub-label {
  position: absolute;
  left: calc(var(--x) / 480 * 100%);
  top: calc((var(--y) + 31) / 340 * 100%);
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.hub-links {
  fill: none;
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 1.5;
}

.hub-flow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 0.1 15.9;
  animation: hub-flow 1.4s linear infinite;
}

@keyframes hub-flow {
  to {
    stroke-dashoffset: -16;
  }
}

.hub-nodes {
  fill: rgba(255, 255, 255, 0.035);
  stroke: rgba(255, 255, 255, 0.1);
}

.hub-icons {
  fill: none;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hub-pulse {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: hub-pulse 3.2s ease-out infinite;
}

@keyframes hub-pulse {
  0% {
    opacity: 0.55;
    transform: scale(0.8);
  }
  100% {
    opacity: 0;
    transform: scale(1.75);
  }
}

.hub-plate {
  fill: #fff;
  filter: drop-shadow(0 10px 26px rgba(255, 255, 255, 0.2));
}

@media (max-width: 767px) {
  .product-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }

  .card {
    --card-padding: 15px;
    --card-radius: 20px;
  }

  .card-visual {
    --visual-height: 300px;
  }

  .flow-steps > li {
    font-size: 14px;
  }

  .card-title {
    font-size: 15px;
  }

  .card-description {
    font-size: 13px;
  }
}

/* Very narrow phones: tighten the list so no step is cut short. */
@media (max-width: 359px) {
  .flow-head {
    gap: 8px;
    padding: 0 12px;
  }

  .flow-steps {
    padding: 0;
  }

  .flow-steps > li {
    gap: 10px;
    padding: 0 8px;
    font-size: 13px;
  }
}

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

.site-footer {
  margin-top: 140px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 56px 20px 72px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 48px;
}

.footer-brand {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.footer-copy {
  color: var(--grey-200);
  font-size: 13px;
}

.legal > h2 {
  margin-bottom: 20px;
  color: var(--grey-200);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 30px;
  margin: 0;
}

.legal-list dt {
  margin-bottom: 4px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

.legal-list dd {
  margin: 0;
  color: var(--grey-200);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 767px) {
  .site-footer {
    margin-top: 80px;
  }

  .legal-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 479px) {
  .legal-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------------ */
/* Reduced motion                                                      */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .hero-text,
  .hero-text > p {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .flow-pill > i,
  .flow-spinner,
  .hub-flow,
  .hub-pulse {
    animation: none;
  }
}
