/* ==========================================================================
   CHIRO GOLF BASE — Brand tokens
   Source: docs/Brand_Guide.md セクション9,10
   ========================================================================== */

:root {
  /* Colors */
  --color-white: #FFFFFF;
  --color-warm-gray: #F2F0EC;
  --color-black: #111111;
  --color-charcoal: #333333;
  --color-wood: #8A6748;
  --color-green: #31493C;

  --color-bg: var(--color-white);
  --color-bg-alt: var(--color-warm-gray);
  --color-text: var(--color-charcoal);
  --color-heading: var(--color-black);
  --color-border: rgba(17, 17, 17, 0.1);

  /* Type */
  --font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-en: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-base: var(--font-jp), var(--font-en);

  /* Spacing (fluid) */
  --space-xs: clamp(0.5rem, 0.45rem + 0.25vw, 0.75rem);
  --space-sm: clamp(0.9rem, 0.8rem + 0.5vw, 1.25rem);
  --space-md: clamp(1.5rem, 1.2rem + 1.2vw, 2.5rem);
  --space-lg: clamp(2.5rem, 1.8rem + 2.8vw, 5rem);
  --space-xl: clamp(4rem, 3rem + 4vw, 8rem);

  --container-w: 1160px;
  --radius: 4px;

  --transition: 200ms ease;
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

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

ul { list-style: none; margin: 0; padding: 0; }

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

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

/* ==========================================================================
   Base
   ========================================================================== */

body {
  font-family: var(--font-base);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-weight: 700;
  color: var(--color-heading);
  line-height: 1.5;
  letter-spacing: 0.03em;
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

section { padding-block: var(--space-xl); }

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -100px;
  background: var(--color-black);
  color: var(--color-white);
  padding: 0.75em 1.25em;
  border-radius: var(--radius);
  z-index: 200;
  transition: top var(--transition);
}
.skip-link:focus { top: var(--space-sm); }

:focus-visible {
  outline: 2px solid var(--color-wood);
  outline-offset: 3px;
}

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

/* ==========================================================================
   Section heading
   ========================================================================== */

.eyebrow {
  display: block;
  font-family: var(--font-en);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-wood);
  margin-bottom: var(--space-xs);
}

.section-heading {
  font-size: clamp(1.5rem, 1.3rem + 1.2vw, 2.25rem);
  max-width: 24ch;
  margin-bottom: var(--space-md);
}

.section-lead {
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  max-width: 42ch;
  margin-bottom: var(--space-md);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.9em 1.75em;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  min-height: 48px;
}

.btn-primary {
  background: var(--color-black);
  color: var(--color-white);
  border: 1px solid var(--color-black);
}
.btn-primary:hover, .btn-primary:focus-visible { background: var(--color-charcoal); }

.btn-secondary {
  background: transparent;
  color: var(--color-black);
  border: 1px solid var(--color-black);
}
.btn-secondary:hover, .btn-secondary:focus-visible { background: var(--color-black); color: var(--color-white); }

.btn-on-dark {
  background: var(--color-white);
  color: var(--color-black);
  border: 1px solid var(--color-white);
}
.btn-on-dark:hover, .btn-on-dark:focus-visible { background: transparent; color: var(--color-white); }

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
  /* backdrop-filter/transform on .site-header itself would create a containing
     block for its position:fixed descendant (.main-nav), breaking that fixed
     positioning. Apply the blur via ::before instead, kept filter-free here. */
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
}

.wordmark {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-black);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav {
  position: fixed;
  inset: 0;
  top: 57px;
  background: var(--color-white);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  overflow-y: auto;
}

.main-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.main-nav ul {
  display: flex;
  flex-direction: column;
  padding: var(--space-lg) var(--space-md);
  gap: var(--space-sm);
}

.main-nav .nav-links a {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-black);
}

.main-nav .cta-group { margin-top: var(--space-md); }

@media (min-width: 900px) {
  .nav-toggle { display: none; }

  .main-nav {
    position: static;
    inset: auto;
    top: auto;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    background: transparent;
    overflow: visible;
  }

  .main-nav ul {
    flex-direction: row;
    align-items: center;
    padding: 0;
  }

  .main-nav .nav-links a { font-size: 0.95rem; font-weight: 500; }

  .main-nav .cta-group { margin-top: 0; }
  .main-nav .nav-links { flex: 1; justify-content: center; }
}

/* ==========================================================================
   Photo placeholder
   ========================================================================== */

.photo-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ratio, 4 / 5);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(17,17,17,0.05) 0 2px, transparent 2px 14px),
    linear-gradient(160deg, var(--color-warm-gray), #e7e2d8);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: flex-end;
}

.photo-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-placeholder .ph-label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin: var(--space-xs);
  padding: 0.4em 0.75em;
  background: rgba(17, 17, 17, 0.78);
  color: var(--color-white);
  font-family: var(--font-en);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  border-radius: 999px;
}

.photo-placeholder .ph-label svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ==========================================================================
   Hero
   ========================================================================== */

/* Override the generic `section` padding-block: hero-intro/hero-founder
   already manage their own internal spacing, so the generic rule was adding
   an extra ~64px on top of that — pushing hero-intro's bottom-anchored
   scroll-cue/disclaimer below the first viewport until the page scrolled. */
.hero { position: relative; padding-block: 0; }

/* ---- Hero: ファーストビュー（ブランド + 一言のみ） ------------------- */

.hero-intro {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  padding: calc(var(--space-xl) + 57px) var(--space-md) var(--space-xl);
  overflow: hidden;
}

.hero-intro .photo-placeholder {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  border-radius: 0;
  border: 0;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 14px),
    linear-gradient(160deg, #4b4238, #23201c);
}

/* Darkening scrim for text legibility. Must sit on its own layer above the
   <img> (which paints above the placeholder's own background), so it can't
   live in the background shorthand above once a real photo is present.
   Kept deliberately heavier/more even (vs. a light top / dark bottom split)
   because the current hero photo has a lit sign sitting in the same
   vertical band as the centered H1/tagline text. */
.hero-intro .photo-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17,17,17,0.7) 0%, rgba(17,17,17,0.88) 100%);
}

/* Mobile: `cover` on a tall viewport height-matches this wide 3:2 photo,
   which happens to put the source's own lit "CHIRO GOLF BASE" sign in the
   exact same vertical band as our centered H1 — the two read as a doubled/
   ghosted duplicate of the same words. Zoom in a bit further than the
   minimum `cover` scale and pan upward so the sign sits up near the header
   (mostly out of view) and the calmer illuminated-glass band sits behind
   our text instead. */
.hero-intro .hero-photo {
  /* Panned/zoomed so the source photo's own illuminated sign text sits
     mostly above the viewport (behind the header) instead of directly
     behind our H1 — showing the glowing glass facade there instead avoids
     a literal duplicate of "CHIRO GOLF BASE" competing with our own text. */
  object-position: 38% 50%;
  height: 210%;
  top: -95%;
}

@media (min-width: 900px) {
  /* PC shows nearly the full frame, and the source photo's sign sits at
     almost exactly the same height as our centered H1 — same pan trick as
     mobile, just gentler, so the emblem logo on the right stays in frame. */
  .hero-intro .hero-photo {
    object-position: 50% 45%;
    height: 165%;
    top: -40%;
  }
}

.hero-disclaimer {
  position: absolute;
  right: var(--space-sm);
  bottom: var(--space-sm);
  z-index: 1;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.02em;
}

.hero-intro-content {
  position: relative;
  z-index: 1;
  /* `ch` here would resolve against this element's own (small, inherited)
     font-size rather than the much larger <h1> inside it, over-constraining
     the wordmark onto 3 lines regardless of viewport. Use a viewport-relative
     cap instead so "CHIRO GOLF BASE" reads as one line whenever there's room. */
  max-width: min(90vw, 640px);
}

.hero-intro h1 {
  font-family: var(--font-en);
  font-size: clamp(2rem, 1.6rem + 2.4vw, 3.6rem);
  color: var(--color-white);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-sm);
}

.hero-lead {
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.7rem);
  font-weight: 700;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: var(--space-md);
  z-index: 1;
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.75);
  transform: translateX(-50%);
  animation: scroll-cue-bounce 2000ms ease-in-out infinite;
}

.scroll-cue svg { width: 100%; height: 100%; }

@keyframes scroll-cue-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---- Hero: 創業者ブロック（なぜつくっているのか） --------------------- */

.hero-founder { padding-block: var(--space-xl); }

.hero-founder-grid {
  display: grid;
  gap: var(--space-lg);
}

.hero-founder-body .eyebrow { margin-bottom: var(--space-xs); }

.hero-founder-quote {
  font-size: clamp(1.35rem, 1.1rem + 1.2vw, 2rem);
  font-weight: 700;
  color: var(--color-heading);
  border-left: 3px solid var(--color-wood);
  margin: 0; /* reset the UA default `blockquote { margin: 1em 40px }` */
  padding-left: var(--space-sm);
  margin-block: var(--space-sm) var(--space-md);
  /* max-width intentionally omitted: `ch` is Latin-digit-width based and
     wraps CJK text far earlier than intended (roughly half as many
     characters per line as the number suggests). Line breaks are
     controlled via <br> in the markup instead; column width in the
     grid layout already caps the line length on wide screens. */
}

@media (min-width: 900px) {
  .hero-founder-grid {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: center;
  }
}

/* ==========================================================================
   About
   ========================================================================== */

.about .container {
  display: grid;
  gap: var(--space-lg);
}

.about-quote {
  font-size: clamp(1.2rem, 1.1rem + 0.6vw, 1.6rem);
  font-weight: 700;
  color: var(--color-heading);
  border-left: 3px solid var(--color-wood);
  padding-left: var(--space-sm);
  margin-block: var(--space-md);
  max-width: 26ch;
}

.about-body p + p { margin-top: 1em; }

@media (min-width: 900px) {
  .about .container {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }
}

/* ==========================================================================
   Vision (timeline)
   ========================================================================== */

.vision { background: var(--color-bg-alt); }

.vision-note {
  font-size: 0.95rem;
  color: var(--color-wood);
  margin-top: calc(-1 * var(--space-sm) + var(--space-xs));
  margin-bottom: var(--space-lg);
}

.timeline {
  display: grid;
  gap: var(--space-md);
  counter-reset: step;
}

.timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-sm);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.timeline-step:last-child { border-bottom: 0; padding-bottom: 0; }

.timeline-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--color-green);
  fill: none;
  stroke-width: 1.5;
}

.timeline-step.is-current .timeline-icon {
  background: var(--color-green);
  border-color: var(--color-green);
}
.timeline-step.is-current .timeline-icon svg { stroke: var(--color-white); }

.timeline-step h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35em;
}

.timeline-tag {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-white);
  background: var(--color-green);
  padding: 0.25em 0.7em;
  border-radius: 999px;
  margin-bottom: 0.6em;
}

@media (min-width: 900px) {
  .timeline {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
  }
  .timeline-step {
    grid-template-columns: 1fr;
    border-bottom: 0;
    border-top: 2px solid var(--color-border);
    padding-top: var(--space-md);
    padding-bottom: 0;
    text-align: left;
  }
  .timeline-step.is-current { border-top-color: var(--color-green); }
}

/* ==========================================================================
   Community
   ========================================================================== */

.community-cards {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.community-card {
  padding: var(--space-md);
  background: var(--color-bg-alt);
  border-radius: var(--radius);
}

.community-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5em;
}

.community-card p { font-size: 0.95rem; }

.community-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

@media (min-width: 700px) {
  .community-cards { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   Journey
   ========================================================================== */

.journey-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.journey-item { position: relative; }

.journey-item .ph-tag {
  position: absolute;
  left: var(--space-xs);
  bottom: var(--space-xs);
  z-index: 1;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-white);
  background: rgba(17,17,17,0.6);
  padding: 0.3em 0.6em;
  border-radius: var(--radius);
}

@media (min-width: 700px) {
  .journey-grid { grid-template-columns: repeat(3, 1fr); }
}

.journey-cta { text-align: center; }
.journey-cta p { margin-bottom: var(--space-sm); }

/* ==========================================================================
   Join
   ========================================================================== */

.join {
  background: var(--color-black);
  color: var(--color-white);
}

.join .section-heading, .join .eyebrow { color: var(--color-white); }
.join .eyebrow { color: #c9b79f; }

.join .container { text-align: center; }

.join .section-heading { max-width: 18ch; margin-inline: auto; }

.join-lead {
  max-width: 42ch;
  margin: 0 auto var(--space-md);
  opacity: 0.85;
}

.join .cta-group { justify-content: center; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding-block: var(--space-lg);
  background: var(--color-black);
  color: rgba(255,255,255,0.7);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-md);
}

.footer-wordmark {
  font-family: var(--font-en);
  color: var(--color-white);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
}

.footer-links a:hover, .footer-links a:focus-visible { color: var(--color-white); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xs);
  font-size: 0.8rem;
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
