/*
Theme Name: Boat Race LP
Theme URI:
Description: ボートレース「みんなでつくるボートレース」イベント告知LP用テーマ
Version: 1.0.0
Author:
Author URI:
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: boatrace-lp
*/

/* ============================================
   CSS Variables
   ============================================ */
:root {
  /* Colors */
  --br-color-red: #ae1f24;
  --br-color-yellow: #fff100;
  --br-color-white: #fff;
  --br-color-black: #231815;
  --br-color-cream: #fcf3db;
  --br-color-day-red: #e6001b;
  --br-color-day-blue: #005bab;
  --br-color-day-green: #22ac38;

  /* Fonts */
  --br-font-base: "Noto Sans JP", sans-serif;
  --br-font-accent: "Rounded Mplus 1c", sans-serif;

  /* Font Size */
  --br-fs-16: 16px;
  --br-fs-18: 18px;
  --br-fs-20: 20px;
  --br-fs-22: 22px;
  --br-fs-24: 24px;
  --br-fs-26: 26px;
  --br-fs-28: 28px;
  --br-fs-30: 30px;
  --br-fs-32: 32px;
  --br-fs-34: 34px;
  --br-fs-46: 46px;

  /* Spacing */
  --br-space-sm: 10px;
  --br-space-md: 20px;
  --br-space-lg: 40px;
  --br-space-xl: 80px;

  /* Layout */
  --br-content-width: 960px;
  --br-max-width: 1920px;
  --br-side-padding: 20px;
  --br-header-height: 110px;
  --br-wpadminbar-height-pc: 32px;
  --br-wpadminbar-height-sp: 46px;

  /* Border Radius */
  --br-radius-card: 30px;
}

/* ============================================
   Reset / Base
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  font-family: var(--br-font-base);
  color: var(--br-color-white);
  line-height: 1.7;
  background: var(--br-color-red);
  overflow-x: hidden;
  padding-top: var(--br-header-height);
}
main {
  flex: 1;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}
h1 img,
h2 img,
h3 img,
h4 img,
h5 img,
h6 img {
  width: auto;
  height: 100%;
  object-fit: contain;
}
a {
  color: inherit;
  text-decoration: none;
}
ul,
ol {
  list-style: none;
}
button {
  cursor: pointer;
}

/* ============================================
   共通クラス
   ============================================ */
.sp {
  display: none;
}
.br-inner {
  width: 100%;
  max-width: var(--br-content-width);
  margin-inline: auto;
  padding-inline: var(--br-side-padding);
}
section:has(.br-box-main) {
  padding-top: calc(80px / 2);
}
.br-box-main {
  position: relative;
  background: url(./assets/images/main_bg.webp) no-repeat center center / cover;
  border: 6px solid var(--br-color-white);
  border-radius: 30px;
}
.br-box-main-inner {
  padding: 0 80px 80px;
}
.br-box-main__heading {
  position: absolute;
  top: calc(80px / -2);
  left: 50%;
  transform: translate(-50%);
  width: 100%;
  height: 80px;
  padding: 0 20px;
}
.br-box-main__heading img {
  margin: 0 auto;
}
.br-box-main__heading + * {
  margin-top: 80px !important;
}

/* ============================================
   Header
   ============================================ */
.br-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-shadow: 0px 0px 10px #0000004d;
  z-index: 9999;
  transition: .3s;
}
#wpadminbar + .br-header {
  top: var(--br-wpadminbar-height-pc);
}
.br-header .br-inner {
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--br-color-red);
  padding-top: 5px;
  padding-bottom: 5px;
}
.br-header__logo img {
  width: auto;
  height: 100px;
}
.br-header__nav {
  display: flex;
}
.br-header__nav a {
  display: block;
  width: fit-content;
  color: var(--br-color-white);
  font-family: var(--br-font-accent);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  padding: 10px;
  transition: opacity .3s;
}
.br-header__nav a:hover {
  opacity: .8;
}
#menu-btn {
  display: none;
}

/* ============================================
   Footer
   ============================================ */
.br-footer {
  margin-top: var(--br-space-xl);
  padding-bottom: var(--br-space-xl);
}
.br-footer__logo {
  width: fit-content;
  height: 40px;
  margin: 0 auto;
}
.br-footer__logo img {
  height: 100%;
}

/* ============================================
   Buttons
   ============================================ */
.img-btn img {
  width: auto;
  height: 100%;
  object-fit: contain;
}

/* ============================================
   WordPress Block Editor Overrides
   ============================================ */
.entry-content {
  width: 100%;
}
.entry-content > section {
  margin-bottom: 80px;
}

/* WP block group - reset default margins */
.wp-block-group {
  margin-top: 0;
  margin-bottom: 0;
}

/* WP buttons alignment */
.wp-block-buttons {
  display: flex;
  justify-content: center;
}
.wp-block-group > .wp-block-group__inner-container{
  display: contents;
}

/* --- Hero Section --- */
.br-hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 730px;
  background: transparent url(./assets/images/mv_bg.webp) no-repeat center center;
  background-size: cover;
  overflow: hidden;
  padding: 80px 20px;
}
.br-hero::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 5%;
  width: 210px;
  height: auto;
  background: transparent url(./assets/images/mv_dec.webp) no-repeat center center / contain;
  aspect-ratio: 292 / 378;
}
.br-hero__title {
  height: 100%;
  z-index: 1;
}
.br-hero__title img {
  width: auto;
  height: 100%;
  object-fit: contain;
}


/* ============================================
   Responsive
   ============================================ */
@media (min-width: 1400px) {
  .br-hero {
    height: auto;
    background-size: contain;
    aspect-ratio: 1920 / 1010;
    padding: 6% 20px;
  }
  .br-hero::before {
    width: 15.208%;
  }
}
@media (min-width: 1920px) {
  .br-hero {
    background-size: cover;
    height: 1010px;
    padding: 115px 20px;
  }
  .br-hero::before {
    width: 292px;
  }
}
@media (max-width: 1023px) {
  .br-hero {
    height: 900px;
    padding-bottom: 240px;
  }
  .br-hero__title {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 800px;
  }
  .br-hero::before {
    width: 180px;
  }
}
@media (max-width: 959px) {
  .br-box-main-inner {
    padding: 0 40px 40px;
  }
}
@media (max-width: 782px) {
  #wpadminbar + .br-header {
    top: var(--br-wpadminbar-height-sp);
  }
}
@media (max-width: 767px) {
  .pc {
    display: none;
  }
  .sp {
    display: block;
  }
  :root {
    --br-space-xl: 40px;
    --br-fs-20: 18px;
    --br-fs-22: 18px;
    --br-fs-24: 20px;
    --br-fs-26: 20px;
    --br-fs-28: 24px;
    --br-fs-30: 24px;
    --br-fs-32: 24px;
    --br-fs-34: 26px;
    --br-fs-46: 30px;
  }
}
@media (max-width: 599px) {
  :root {
    --br-header-height: 70px;
  }
  section:has(.br-box-main) {
    padding-top: calc(10vw / 2);
  }
  .br-box-main {
    border-width: 4px;
    border-radius: 20px;
  }
  .br-box-main-inner {
    padding: 0 20px 20px;
  }
  .br-box-main__heading {
    top: calc(10vw / -2);
    height: 10vw;
  }
  .br-box-main__heading + * {
    margin-top: 40px !important;
  }
  .br-hero {
    height: calc(100vh - var(--br-header-height));
    min-height: 500px;
    max-height: 640px;
    padding: 80px 10px 180px;
  }
  .br-hero::before {
    width: 130px;
  }
  .br-header__logo img {
    height: 60px;
  }
  #menu-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 50px;
    height: 50px;
    background: none;
    border: none;
    z-index: 100;
  }
  #menu-btn span {
    width: 100%;
    height: 4px;
    background: var(--br-color-white);
    border-radius: 4px;
    transition: .3s;
  }
  #menu-btn[aria-expanded="true"] span:first-child {
    transform: translateY(10px) rotate(45deg);
  }
  #menu-btn[aria-expanded="true"] span:last-child {
    transform: translateY(-10px) rotate(-45deg);
  }
  .br-header__nav {
    position: fixed;
    top: -100%;
    left: 0;
    flex-direction: column;
    width: 100%;
    height: auto;
    background: var(--br-color-red);
    border-top: 1px solid var(--br-color-white);
    z-index: -1;
    box-shadow: 0px 0px 10px #0000004d;
    transition: .3s;
  }
  #menu-btn[aria-expanded="true"] + .br-header__nav {
    top: var(--br-header-height);
  }
  #wpadminbar + .br-header .br-header__nav{
    top: -100%;
  }
  #wpadminbar + .br-header #menu-btn[aria-expanded="true"] + .br-header__nav{
    top: calc(var(--br-header-height) + var(--br-wpadminbar-height-sp));
  }
  .br-header__nav a {
    width: 100%;
    padding: 20px 10px;
  }
}
