/*
 * assets/css/top.css
 *
 * トップページ用スタイル（第二稿／2026-10-05）
 *
 * 【このバージョンのスコープ】
 *   対応する: ヘッダーの配色・フォント、見出しの装飾、全体のレイアウト構造
 *   対応しない: サービス紹介カード部分の背景装飾（背景色・背景画像）→ 今は無し
 *
 * 【第一稿からの修正点】
 * 実際に https://glideride.net/funride-school/ を開き、DevToolsではなく
 * ブラウザ上でJSを実行してCSS変数・実際の配色・フォント・レイアウトの数値を
 * 直接取得して反映した（想定や記憶ではなく実測値）。
 *   - ヘッダー背景色が独自の赤系アクセントになっていた → 実際の `--yellow: #feed00` に修正
 *   - 英字見出し用フォントが Playfair Display になっていた → ナビ・セクション見出しは
 *     実際には Permanent Marker (`_--eng`クラス) が使われていたため修正
 *     （ヒーローの大見出しのみ、実際のサイトでも Playfair Display が使われているため、
 *     ヒーローはそのまま Playfair Display + 日本語サブは Zen Old Mincho とした）
 *   - ヘッダーのナビ項目が「英語＋日本語を1項目内に2段表示」になっていなかった → 修正
 *   - 見出し（text-headline）の下線＋矢印型の装飾が再現されていなかった → 追加
 *   - 独自に追加していた赤系アクセントカラーを全て削除
 */

:root {
  /* 実際のサイトのCSS変数（common.css）をそのまま採用 */
  --yellow: #feed00;
  --darkgray: #2b2b2b;
  --lightgray: #b6b6b6;
  --lighterred: #e02e2e;
  --white: #fcfcfc;

  --fs-title: 8.5vw;
  --fs-movie-title: 3.5vw;
  --fs-movie-sub: 2vw;
  --fs-title-sub: 4vw;
  --fs-menu-eng: 2rem;
  --fs-headline: 1.5rem;
  --fs-largepar: 1.3rem;
  --fs-menu-ja: 1.3rem;
  --fs-par: 1.2rem;

  --max-width: 1100px;
  --header-height: 80px;
}

@media screen and (min-width: 768px) {
  :root {
    font-size: 14px;
    --fs-title: 48px;
    --fs-movie-title: 36px;
    --fs-movie-sub: 18px;
    --fs-title-sub: 24px;
    --fs-menu-eng: 26px;
    --fs-headline: 26px;
    --fs-largepar: 18px;
    --fs-menu-ja: 16px;
    --fs-par: 16px;
  }
}

@media screen and (min-width: 1280px) {
  :root {
    --header-height: 106px;
  }
}

@media screen and (min-width: 1516px) {
  :root {
    --fs-movie-title: 48px;
    --fs-movie-sub: 24px;
  }
}

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  background-color: #161616;
  color: #fff;
  font-family: "IBM Plex Sans JP", "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

/* ---------- 共通: 英語ロゴ・見出し装飾クラス（実サイトの `_--eng` と同じ） ---------- */

._--eng {
  font-family: "Permanent Marker", cursive;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* 実サイトの .text-headline をそのまま再現（下線＋右端の矢印カット装飾） */

.text-headline {
  color: #fff; /* 本文と同じ白。アクセントのライン（下線＋矢印）だけヘッダーと同じイエローにする */
  border-bottom: 5px solid var(--yellow);
  padding: 0 0.2vw;
  margin: 0;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

.text-headline::after,
.text-headline::before {
  content: "";
  display: block;
  position: absolute;
  bottom: -16px;
  border-bottom: transparent 13px solid;
  border-top: transparent 13px solid;
  border-left: var(--yellow) 13px solid;
  width: 26px;
  height: 26px;
  transform: skewX(-5deg);
}

.text-headline::after {
  right: -24px;
}

.text-headline::before {
  right: -32px;
}

.text-headline__large-title {
  font-size: var(--fs-title);
  margin-right: 0.5em;
}

.text-headline__small-title {
  font-size: var(--fs-title-sub);
}

.section-heading {
  display: inline-block;
  margin: 4rem auto 3rem;
}

.section-heading-wrap {
  text-align: center;
}

/* ---------- ヘッダー（実サイトのcommon.cssを再現） ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: var(--header-height);
  left: 0;
  top: 0;
  background-color: var(--yellow);
  position: fixed;
  z-index: 1000;
}

.site-header__logo {
  text-align: left;
  padding-left: 16px;
}

.site-header__logo-media {
  height: 48px;
}

@media screen and (min-width: 1280px) {
  .site-header__logo-media {
    width: 220px;
    height: auto;
  }
}

.site-header__opener-label {
  display: block;
  width: 40px;
  height: 100%;
  position: relative;
  margin-right: 16px;
  cursor: pointer;
}

.site-header__opener {
  display: none;
}

.site-header__opener-bar {
  position: absolute;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--darkgray);
  transition: all 0.2s ease;
}

.site-header__opener-bar:nth-child(1) { top: calc(50% - 10px); }
.site-header__opener-bar:nth-child(2) { top: calc(50% - 1px); }
.site-header__opener-bar:nth-child(3) { top: calc(50% + 8px); }

.site-header__navi-wrapper {
  max-width: 1000px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__navi-items {
  list-style: none;
  height: 100%;
  margin-right: 32px;
}

.site-header__navi-items:last-child {
  margin-right: 16px;
}

.site-header__navi-links {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-decoration: none;
  color: var(--darkgray);
}

.site-header__navi-links:hover {
  color: var(--white);
}

.site-header__navi-large {
  font-size: var(--fs-menu-eng);
}

.site-header__navi-small {
  font-size: var(--fs-menu-ja);
}

.contents-wrapper {
  width: 100%;
  margin: var(--header-height) 0 0 0;
  position: relative;
  overflow-x: hidden;
}

@media screen and (max-width: 1279px) {
  .site-header__navi {
    width: 40px;
    height: 100%;
  }

  .site-header__navi-wrapper {
    max-width: none;
    height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: fixed;
    right: 0;
    top: -100%;
    width: 100%;
    z-index: -1;
    transition: all 0.3s ease-in;
    background-color: var(--yellow);
  }

  .site-header__opener:checked ~ .site-header__navi-wrapper {
    top: var(--header-height);
    z-index: 999;
  }

  .site-header__navi-items {
    margin: 0;
    height: auto;
    padding: 1em 0;
  }

  .site-header__navi-items:last-child {
    margin: 0;
  }
}

@media screen and (min-width: 1280px) {
  .site-header__opener-label {
    display: none;
  }
}

/* ---------- ヒーロー（動画背景） ---------- */
/*
 * 実サイトは jquery.mb.YTPlayer プラグインを使っているが、今回のテンプレートは
 * jQuery/プラグインへの依存を避け、YouTube埋め込みiframeをCSSだけで
 * 「コンテナいっぱいに敷いて中央をクロップ」する方式にしている
 * （動画URLから動画IDを抽出してiframeのsrcに渡す。PHP側は top_youtube_id() 参照）。
 */

.movie-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 480px;
  overflow: hidden;
  background: #000;
}

.movie-hero__video-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.movie-hero__video-wrap iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* 16:9 */
  min-height: 100vh;
  min-width: 177.78vh; /* 16:9 */
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.movie-hero__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  z-index: 2;
  transition: opacity 0.6s ease;
}

.movie-hero__loading.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.movie-hero__loading-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-hero__title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 100%;
  text-align: center;
  line-height: 1.5em;
  color: #fff;
  font-family: "Playfair Display", serif;
  font-size: var(--fs-movie-title);
  margin: 0;
  padding: 0 1rem;
}

.movie-hero__title-subs-jp {
  display: block;
  margin-top: 0.6em;
  font-size: var(--fs-movie-sub);
  font-family: "Zen Old Mincho", serif;
}

/* ---------- お知らせ ---------- */

.news {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.news__list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.news__item {
  display: flex;
  gap: 1.2rem;
  align-items: baseline;
  padding: 0.9rem 0;
  border-bottom: 1px solid #fff;
}

.news__date {
  font-size: 0.85rem;
  flex: 0 0 auto;
}

.news__title {
  text-decoration: none;
}

.news__more {
  text-align: center;
  margin-top: 1.5rem;
}

.news__more a {
  text-decoration: none;
  border-bottom: 1px solid #fff;
}

/* ---------- サービス（誘導カード） ---------- */

.service {
  padding-bottom: 2rem;
}

.service-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}

.service-block--right {
  flex-direction: row-reverse;
}

.service-block__image {
  flex: 1 1 420px;
}

.service-block__image img {
  width: 100%;
  height: auto; /* 2026-10-16修正: これが無いとwidth:100%で縮小されてもCSSがheightを
                   明示していないためHTMLのheight属性値(アップロード時の実寸px)が
                   そのまま使われてしまい、縦だけ元の実寸のまま潰れて見える
                   （＝「固定されている」ように見える）バグがあったため追加。 */
}

.service-block__body {
  flex: 1 1 360px;
}

.service-block--center {
  text-align: center;
  max-width: var(--max-width);
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}

/* 2026-10-16変更: 画像の高さ固定・crop（object-fit:cover）をやめ、
   他レイアウト（１カラム左右／２カラム）と同じく画像本来の縦横比のまま表示する。
   以前はここを背景画像として absolute 配置し min-height:420px に crop して
   テキストを重ねていたが、画像の縦横比によっては見切れが発生するため廃止。
   代わりに「画像（原寸比）→テキスト」を縦に並べる、中央寄せのシンプルな構成にした。 */
.service-block--center .service-block__bg {
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.service-block--center .service-block__body {
  max-width: 36em;
  margin: 2rem auto 0;
}

.service-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}

.service-flex .service-card {
  flex: 1 1 calc(50% - 2.5rem);
  min-width: 280px;
}

.service-card__image img {
  width: 100%;
  height: auto; /* 2026-10-16修正: .service-block__image img と同じ理由で追加 */
}

.service-card__body {
  margin-top: 1.2rem;
}

.service-title {
  font-size: var(--fs-title); /* text-headline__large-title と同じサイズに統一 */
  margin: 0;
}

.service-subtitle {
  font-size: var(--fs-title-sub); /* text-headline__small-title と同じサイズに統一 */
  letter-spacing: 0.1em;
  margin: 0.4rem 0 1rem;
}

.service-desc {
  font-size: 0.95rem;
  margin: 0 0 1.2rem;
}

.service-link {
  display: inline-block;
  border: 1px solid #fff;
  padding: 0.6rem 1.8rem;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

/* ---------- 会社概要・アクセス ---------- */

.company {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.company__map iframe {
  width: 100%;
  height: 320px;
  border: 1px solid #fff;
  display: block;
  margin: 2rem 0;
}

.company__info {
  display: grid;
  grid-template-columns: 7em 1fr;
  gap: 0.8rem 1.2rem;
  margin: 2rem 0 0;
}

.company__info dt {
  font-weight: 700;
}

.company__info dd {
  margin: 0;
}

/* ---------- お問い合わせ ---------- */

.contact {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.contact__text {
  text-align: center;
  margin: 2rem 0 2.5rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

.form-row label {
  font-size: 0.9rem;
}

.form-row input,
.form-row textarea {
  background: transparent;
  border: 1px solid #fff;
  padding: 0.7rem;
  font-family: inherit;
  font-size: 1rem;
  color: #fff;
}

.form-row.is-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* reCAPTCHAウィジェットは幅約304pxの固定サイズで描画されるため、320px幅の
   狭いスマホ（左右paddingを引くと officialの幅より少し狭くなる端末がある）でも
   レイアウトが横に壊れないよう、必要な場合だけこの行内でスクロールさせる。 */
.form-row--recaptcha {
  max-width: 100%;
  overflow-x: auto;
}

.contact__submit {
  display: block;
  margin: 0 auto;
  border: 1px solid #fff;
  background: none;
  color: #fff;
  padding: 0.8rem 3rem;
  font-size: 1rem;
  letter-spacing: 0.1em;
  cursor: pointer;
}

/* ---------- フッター（実サイトのcommon.cssを再現） ---------- */

.site-footer {
  background-color: var(--darkgray);
  height: 40px;
  text-align: center;
}

.site-footer__copyright {
  color: var(--yellow);
  font-size: var(--fs-par);
  line-height: 40px;
  margin: 0;
}

/* ---------- レスポンシブ ---------- */

@media (max-width: 640px) {
  .service-block,
  .service-block--right {
    flex-direction: column;
  }

  .service-flex .service-card {
    flex: 1 1 100%;
  }
}
