/* Ranchu Japan — design system
   Electric blue for the brand moments, night for the story, mist for the work.
   The lotus gradient marks what matters. */

:root {
  color-scheme: light;
  --blue: #0b5cff;
  --blue-2: #0047d6;
  --blue-3: #3a7bff;
  --navy: #061d52;
  --night: #030a14;
  --night-2: #07111f;
  --night-card: #0c1828;
  --mist: #edf4ff;
  --mist-2: #d9e7ff;
  --peri: #a7c8ff;
  --peri-2: #cfe1ff;
  --ink: #07121f;
  --ink-2: #445266;
  --ink-3: #7a8699;
  --paper: #f6f9fc;
  --white: #ffffff;
  --line: rgba(7, 18, 31, 0.08);
  --line-2: rgba(7, 18, 31, 0.16);
  --line-dark: rgba(255, 255, 255, 0.12);
  --mint: #9aeba6;
  --aqua: #60d3d2;
  --sky: #3dc2ee;
  --lotus: linear-gradient(100deg, #9aeba6 0%, #60d3d2 52%, #3dc2ee 100%);
  --focus: #60d3d2;
  --radius: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "LINE Seed JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 1px 2px rgba(7, 18, 31, 0.04), 0 12px 40px rgba(6, 29, 82, 0.08);
  --header-h: 72px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--paper);
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

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

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

@supports (word-break: auto-phrase) {
  h1,
  h2,
  h3 {
    word-break: auto-phrase;
  }
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 8px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: min(var(--wrap), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

/* ---------------------------------------------------------------- header: a floating pill */

.gh {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding: 16px var(--gutter) 0;
  pointer-events: none;
}

.gh__bar {
  --gh-bg: rgba(255, 255, 255, 0.88);
  --gh-fg: var(--blue);
  --gh-line: rgba(11, 92, 255, 0.12);
  --gh-hover: rgba(11, 92, 255, 0.07);
  position: relative;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1040px;
  height: 56px;
  margin-inline: auto;
  padding: 0 8px 0 20px;
  border-radius: 999px;
  border: 1px solid var(--gh-line);
  background: var(--gh-bg);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  color: var(--gh-fg);
  box-shadow: 0 8px 30px rgba(4, 18, 48, 0.08);
  transition: background 0.45s var(--ease), border-color 0.45s var(--ease), color 0.45s var(--ease);
}

.gh[data-tone="dark"] .gh__bar {
  --gh-bg: rgba(22, 30, 42, 0.82);
  --gh-fg: #fff;
  --gh-line: rgba(255, 255, 255, 0.1);
  --gh-hover: rgba(255, 255, 255, 0.09);
}

.gh__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.gh__mark {
  width: 30px;
  height: auto;
}

.gh__nav {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
}

.gh__list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline: auto;
}

.gh__item {
  position: relative;
}

.gh__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.2s var(--ease);
}

.gh__link:hover,
.gh__link[aria-current="page"],
.gh__link[aria-expanded="true"] {
  background: var(--gh-hover);
}

.gh__link svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  transition: transform 0.25s var(--ease);
}

.gh__link[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.gh__dd {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  display: grid;
  gap: 2px;
  width: 300px;
  padding: 8px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(4, 18, 48, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -6px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
}

.gh__dd::before {
  content: "";
  position: absolute;
  inset: -16px 0 auto;
  height: 16px;
}

.gh__item.is-open .gh__dd {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.gh__dd a {
  display: grid;
  gap: 2px;
  padding: 11px 14px;
  border-radius: 14px;
  line-height: 1.45;
  transition: background 0.18s var(--ease);
}

.gh__dd a:hover,
.gh__dd a:focus-visible {
  background: var(--mist);
}

.gh__dd b {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
}

.gh__dd span {
  font-size: 12px;
  color: var(--ink-3);
}

.gh__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.gh__ghost,
.gh__cta {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.gh__ghost {
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 30%, transparent);
}

.gh__ghost:hover {
  background: var(--gh-hover);
}

.gh__cta {
  background: var(--blue);
  color: #fff;
}

.gh__cta:hover {
  background: var(--blue-2);
}

.gh[data-tone="dark"] .gh__cta {
  background: #fff;
  color: var(--ink);
}

.gh[data-tone="dark"] .gh__cta:hover {
  background: var(--mist-2);
}

.gh__menu {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.gh__menu i {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.gh__menu i:first-of-type {
  top: 18px;
}

.gh__menu i:last-of-type {
  top: 25px;
}

.gh__menu[aria-expanded="true"] i:first-of-type {
  top: 21px;
  transform: rotate(45deg);
}

.gh__menu[aria-expanded="true"] i:last-of-type {
  top: 21px;
  transform: rotate(-45deg);
}

@media (max-width: 1000px) {
  .gh__menu {
    display: block;
  }

  .gh__bar {
    padding-left: 18px;
  }

  .gh__nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px;
    border-radius: 26px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    box-shadow: 0 24px 60px rgba(4, 18, 48, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  }

  .gh__nav.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .gh__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
  }

  .gh__link {
    justify-content: space-between;
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border-radius: 16px;
    font-size: 16px;
    color: var(--ink);
  }

  .gh__link:hover,
  .gh__link[aria-current="page"],
  .gh__link[aria-expanded="true"] {
    background: var(--mist);
  }

  .gh__dd {
    position: static;
    display: none;
    width: auto;
    padding: 4px 0 8px 8px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }

  .gh__dd::before {
    content: none;
  }

  .gh__item.is-open .gh__dd {
    display: grid;
    transform: none;
  }

  .gh__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .gh__ghost,
  .gh__cta,
  .gh[data-tone="dark"] .gh__cta {
    justify-content: center;
    height: 50px;
    font-size: 15px;
  }

  .gh__ghost {
    border-color: var(--line-2);
    color: var(--blue);
  }

  .gh[data-tone="dark"] .gh__cta {
    background: var(--blue);
    color: #fff;
  }
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--blue {
  background: var(--blue);
  color: #fff;
}

.btn--blue:hover {
  background: var(--blue-2);
}

.btn--ink {
  background: var(--ink);
  color: #fff;
}

.btn--ink:hover {
  background: #000;
}

.btn--line {
  border-color: var(--line-2);
  background: var(--white);
  color: var(--blue);
}

.btn--line:hover {
  border-color: var(--blue);
}

.btn--light {
  background: #fff;
  color: var(--ink);
}

.btn--light:hover {
  background: var(--mist-2);
}

.btn--glass {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.btn--glass:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ---------------------------------------------------------------- sections */

.section {
  padding-block: clamp(80px, 11vw, 140px);
}

.section__head {
  margin-bottom: clamp(32px, 4vw, 56px);
}

.section__title {
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ---------------------------------------------------------------- footer: a rounded panel */

.gf {
  padding: 0 var(--gutter) calc(var(--gutter) + env(safe-area-inset-bottom));
  background: var(--paper);
  color: var(--ink);
}

.gf__inner {
  display: grid;
  grid-template-columns: 1.1fr repeat(4, 1fr) 1.4fr;
  gap: 40px 28px;
  max-width: 1360px;
  margin-inline: auto;
  padding: clamp(36px, 5vw, 56px) clamp(24px, 4vw, 56px) 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--mist);
}

.gf__base {
  max-width: 1360px;
  margin-inline: auto;
  padding: 24px clamp(24px, 4vw, 56px) 28px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--mist-2);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.7;
}

.gf__label {
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

.gf__col {
  display: grid;
  align-content: start;
  gap: 2px;
  font-size: 14px;
}

.gf__col a {
  padding: 3px 0;
  color: var(--ink);
  transition: color 0.2s;
}

.gf__col a:hover {
  color: var(--blue);
}

.gf__start {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 14px;
}

.gf__start .btn {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 13px;
}

.gf__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  color: var(--blue);
}

.gf__brand img {
  width: 34px;
  height: auto;
}

.gf__address {
  font-style: normal;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink);
}

.gf__row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding: 26px 0 30px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.gf__social {
  display: flex;
  gap: 8px;
}

.gf__social a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  transition: background 0.2s;
}

.gf__social a:hover {
  background: var(--blue);
}

.gf__social svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.gf__row > a:hover {
  color: var(--blue);
}

.gf__base p + p {
  margin-top: 6px;
}

.gf__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
}

.gf__star {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--night);
}

.gf__star span {
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 2px rgba(190, 235, 255, 0.55);
  animation: twinkle 3.6s ease-in-out infinite;
}

.gf__star:hover span {
  box-shadow: 0 0 10px 4px rgba(190, 235, 255, 0.8);
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@media (max-width: 1100px) {
  .gf__inner {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .gf__inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px 20px;
  }

  .gf__start,
  .gf__contact {
    grid-column: 1 / -1;
  }
}

/* ---------------------------------------------------------------- phone action bar */

.mbar {
  display: none;
}

@media (max-width: 640px) {
  .mbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 95;
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid rgba(11, 92, 255, 0.12);
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    backdrop-filter: blur(18px) saturate(1.6);
    box-shadow: 0 14px 40px rgba(4, 18, 48, 0.2);
    transform: translateY(calc(100% + 24px));
    opacity: 0;
    visibility: hidden;
    transition: transform 0.45s var(--ease-out), opacity 0.3s var(--ease), visibility 0.45s;
  }

  .mbar.is-on {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .mbar a {
    display: grid;
    place-items: center;
    height: 46px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
  }

  .mbar__line {
    color: var(--blue);
    background: var(--mist);
  }

  .mbar__cta {
    color: #fff;
    background: var(--blue);
  }
}

/* ---------------------------------------------------------------- reveal */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

html.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
