/* ==========================================================
   PebbleBeans — official site
   コンセプト：「小石と芽吹く豆」
   ・ロゴの3色（コーラル／ミント／紺）を軸にした、やわらかい配色
   ・角ばった線は使わず、小石のような“いびつな丸”と、ふんわりした影
   ========================================================== */

:root {
  color-scheme: light;

  /* 色 */
  --paper:      #FFFCF7;
  --sand:       #F6EFE4;
  --sand-deep:  #EADFCF;
  --white:      #FFFFFF;
  --ink:        #1E2140;
  --ink-soft:   #5C5F7A;
  --ink-faint:  #9A9CB0;
  --bean:       #FF7F5C;
  --bean-dark:  #E8603C;
  --bean-tint:  #FFE6DD;
  --leaf:       #5BE0B8;
  --leaf-dark:  #1F9C79;
  --leaf-tint:  #DDF7EE;
  --sun:        #FFD166;
  --sky:        #8FB8F2;

  /* 文字 */
  --font-round: "Baloo 2", "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", ui-rounded, sans-serif;
  --font-text:  "Nunito", "M PLUS Rounded 1c", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* 形と影 */
  --pebble-1: 46% 54% 52% 48% / 55% 48% 52% 45%;
  --pebble-2: 58% 42% 45% 55% / 48% 56% 44% 52%;
  --round-l:  32px;
  --round-m:  22px;
  --round-s:  14px;
  --lift-1:   0 2px 6px rgba(30, 33, 64, .06), 0 10px 24px -12px rgba(30, 33, 64, .18);
  --lift-2:   0 4px 10px rgba(30, 33, 64, .07), 0 24px 48px -20px rgba(30, 33, 64, .30);

  --page:   76rem;
  --side:   clamp(1rem, 4vw, 2.5rem);
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

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

.page { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--side); }

h1, h2, h3, h4 { font-family: var(--font-round); font-weight: 700; line-height: 1.08; letter-spacing: -.01em; }
.title-xl { font-size: clamp(2.6rem, 1.5rem + 4.6vw, 5rem); }
.title-l  { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-round);
  font-weight: 600;
  font-size: .95rem;
  color: var(--leaf-dark);
}
.eyebrow::before {
  content: "";
  width: .7rem;
  height: .55rem;
  border-radius: var(--pebble-1);
  background: var(--leaf);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 3.1rem;
  padding: .55rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-round);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), background-color .2s, box-shadow .2s;
}
.button:hover  { transform: translateY(-2px) scale(1.02); }
.button:active { transform: translateY(1px) scale(.98); }

.button-bean  { background: var(--bean); color: var(--white); box-shadow: 0 10px 22px -10px var(--bean-dark); }
.button-bean:hover { background: var(--bean-dark); }
/* ---------- header ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-block: .75rem;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .45rem .55rem .45rem .9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: var(--lift-1);
}

.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-round);
  font-weight: 800;
  font-size: 1.35rem;
  text-decoration: none;
  letter-spacing: -.02em;
}
.logo img { width: 2.4rem; height: 2.4rem; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.logo:hover img { transform: rotate(-10deg) scale(1.08); }
.logo span b { color: var(--bean); font-weight: inherit; }

.menu { display: flex; align-items: center; gap: .25rem; }
.menu a {
  padding: .5rem .95rem;
  border-radius: 999px;
  font-family: var(--font-round);
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.menu a:hover { background: var(--sand); color: var(--ink); }
.menu .menu-cta { background: var(--ink); color: var(--white); }
.menu .menu-cta:hover { background: var(--bean); color: var(--white); }
.menu .lang {
  margin-right: .2rem;
  padding: .35rem .8rem;
  box-shadow: inset 0 0 0 2px var(--sand-deep);
  font-size: .9rem;
}
.menu .lang:hover { box-shadow: inset 0 0 0 2px var(--ink-faint); background: none; }

@media (max-width: 44rem) {
  .logo { font-size: 1.15rem; }
  .logo img { width: 2rem; height: 2rem; }
  .menu a { padding: .45rem .6rem; font-size: .92rem; }
  .menu .only-wide { display: none; }
}
@media (max-width: 26rem) {
  .menu .hide-xs { display: none; }
  .menu { gap: .1rem; }
  .menu a { padding: .4rem .5rem; }
  .menu .lang { padding: .3rem .55rem; }
}

/* ---------- hero ---------- */

.intro {
  position: relative;
  padding-top: clamp(2.5rem, 7vw, 5.5rem);
  text-align: center;
}
.intro-copy { position: relative; z-index: 2; display: grid; justify-items: center; gap: 1.3rem; }
.intro h1 { max-width: 20ch; }
.intro h1 .mark {
  position: relative;
  white-space: nowrap;
  color: var(--bean);
}
.intro h1 .mark svg {
  position: absolute;
  left: -2%;
  bottom: -.02em;
  width: 104%;
  height: .26em;
  z-index: -1;
}
.intro-lead { max-width: 36rem; font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: var(--ink-soft); }
.intro-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: .4rem; }

.intro-stage {
  position: relative;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.intro-picture {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: clamp(28px, 5vw, 56px);
  box-shadow: var(--lift-2);
}
.intro-picture img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: inherit; }
@media (max-width: 40rem) { .intro-picture img { aspect-ratio: 4 / 3; } }

/* ふわふわ浮かぶ小石 */
.floaty {
  position: absolute;
  z-index: 0;
  border-radius: var(--pebble-1);
  animation: bob 6s ease-in-out infinite;
}
.floaty.f1 { width: 5.5rem; height: 4.3rem; background: var(--leaf);  top: -2rem;  left: -1.5rem; }
.floaty.f2 { width: 3.4rem; height: 2.6rem; background: var(--sun);   top: 18%;    right: -1.4rem; animation-delay: -2s; border-radius: var(--pebble-2); }
.floaty.f3 { width: 7rem;   height: 5rem;   background: var(--bean-tint); bottom: -2.2rem; right: 12%; animation-delay: -4s; }
.floaty.f4 { width: 2.4rem; height: 1.9rem; background: var(--sky);   bottom: 22%; left: -1rem; animation-delay: -1s; border-radius: var(--pebble-2); }
.floaty.f5 { width: 2rem;   height: 1.6rem; background: var(--bean);  top: 2rem;   right: 18%; z-index: 3; animation-delay: -3s; }
@media (max-width: 40rem) { .floaty.f1, .floaty.f3 { transform: scale(.6); } }

@keyframes bob {
  0%, 100% { translate: 0 0;     rotate: 0deg; }
  50%      { translate: 0 -10px; rotate: 6deg; }
}

/* ---------- section 共通 ---------- */

.block { padding-block: clamp(4rem, 9vw, 7rem); }
.block-sand { background: var(--sand); }

/* 波打つ区切り */
.edge { display: block; width: 100%; height: clamp(24px, 4vw, 48px); color: var(--sand); }
.edge.flip { transform: scaleY(-1); }

/* ---------- assets ---------- */

.ribbon {
  justify-self: start;
  display: inline-block;
  padding: .2rem .8rem;
  border-radius: 999px;
  font-family: var(--font-round);
  font-weight: 700;
  font-size: .85rem;
  background: var(--bean-tint);
  color: var(--bean-dark);
}
.ribbon.leaf { background: var(--leaf-tint); color: var(--leaf-dark); }
.ribbon.gray { background: var(--sand); color: var(--ink-soft); }

/* 準備中の表示 */
.sprouting {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: clamp(2.5rem, 6vw, 4rem) var(--side);
  border-radius: var(--round-l);
  background: var(--white);
  box-shadow: var(--lift-1);
  text-align: center;
}
.sprouting img { width: 5rem; height: 5rem; animation: bob 5s ease-in-out infinite; }
.sprouting .ribbon { justify-self: center; }
.sprouting p { max-width: 32rem; color: var(--ink-soft); }

/* ---------- about ---------- */

.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
@media (max-width: 54rem) { .story { grid-template-columns: 1fr; } }
.story-text { display: grid; gap: 1.1rem; }
.story-text p { color: var(--ink-soft); }

.promises { display: grid; gap: 1rem; }
.promise {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.3rem 1.4rem;
  border-radius: var(--round-m);
  background: var(--white);
  box-shadow: var(--lift-1);
}
.promise-icon {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.4rem;
  border-radius: var(--pebble-2);
  font-size: 1.25rem;
}
.promise h3 { font-size: 1.2rem; margin-bottom: .2rem; }
.promise p { color: var(--ink-soft); font-size: .97rem; }

/* ---------- contact ---------- */

.hello {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  gap: 1.1rem;
  padding: clamp(3rem, 7vw, 5rem) var(--side);
  border-radius: clamp(28px, 5vw, 56px);
  background: var(--ink);
  color: var(--white);
  text-align: center;
}
.hello p { color: #C7C9DD; max-width: 32rem; }
.hello .button-bean { box-shadow: none; }
.hello-logo { width: 4.5rem; height: 4.5rem; animation: bob 5s ease-in-out infinite; }
.contact-form {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  min-width: 0;
  height: 607px;
  border: 0;
}
.hello::before, .hello::after {
  content: "";
  position: absolute;
  border-radius: var(--pebble-1);
  opacity: .14;
}
.hello::before { width: 16rem; height: 12rem; background: var(--leaf); top: -5rem; left: -4rem; }
.hello::after  { width: 12rem; height: 9rem;  background: var(--bean); bottom: -4rem; right: -3rem; border-radius: var(--pebble-2); }

/* ---------- visitor counter ---------- */

.visitor-counter {
  display: grid;
  justify-items: center;
  gap: .4rem;
  margin-top: 2rem;
  text-align: center;
}
.visitor-counter-label { color: var(--ink-soft); font-size: .85rem; }
.visitor-counter-number {
  padding: .35rem 1.1rem;
  border: 1px solid var(--sand-deep);
  border-radius: var(--round-s);
  background: var(--sand);
  color: var(--ink);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .15em;
  min-width: 9.5rem;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.visitor-counter-note { color: var(--ink-soft); font-size: .8rem; }

/* ---------- footer ---------- */

.bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2.5rem 3rem;
  color: var(--ink-faint);
  font-size: .9rem;
}
.bottom nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.bottom a { text-decoration: none; }
.bottom a:hover { color: var(--ink); }

/* ==========================================================
   日本語ページの調整
   ========================================================== */

:root:lang(ja) {
  --font-text: "Nunito", "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
}
html:lang(ja) body { line-height: 1.85; letter-spacing: .02em; line-break: strict; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 {
  line-height: 1.35;
  letter-spacing: .03em;
  word-break: auto-phrase; /* 対応ブラウザでは文節の切れ目で改行 */
}
:lang(ja) .title-xl { font-size: clamp(2rem, 1.1rem + 3.8vw, 4.1rem); }
:lang(ja) .title-l  { font-size: clamp(1.6rem, 1.15rem + 1.8vw, 2.5rem); }
:lang(ja) .intro h1 { max-width: 15em; }
.phrase { display: inline-block; } /* 日本語の見出しをこの単位で改行させる */
:lang(ja) .menu a  { font-size: .95rem; }
:lang(ja) .eyebrow, :lang(ja) .ribbon { letter-spacing: .05em; }
:lang(ja) .menu .lang { font-family: var(--font-round); }
@media (max-width: 44rem) { :lang(ja) .menu a { font-size: .85rem; } }

/* ---------- 動きを減らす設定 ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
