/*
Theme Name: CASQ SEO Theme
Theme URI: https://casq.jp/
Author: Unity Marketing
Description: SEO-first WordPress theme scaffold for the CASQ renewal site, visually modeled after the current public CASQ site.
Version: 0.2.0
Requires at least: 6.4
Tested up to: 6.5
Requires PHP: 8.1
Text Domain: casq-seo-theme
*/

:root {
  --casq-ink: #1f2430;
  --casq-navy: #1d2e6b;
  --casq-blue: #2f78b8;
  --casq-header: #dfe8f5;
  --casq-soft: #eaf5ff;
  --casq-yellow: #e4d86c;
  --casq-green: #38a857;
  --casq-line: #d9e3ef;
  --casq-muted: #5f6877;
  --casq-max: 1140px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--casq-ink);
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.8;
  background: #fff;
}

a {
  color: inherit;
}

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

.site-shell {
  width: min(100% - 40px, var(--casq-max));
  margin-inline: auto;
}

.site-header .site-shell {
  width: calc(100% - 32px);
  max-width: none;
}

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  background: var(--casq-header);
  box-shadow: 0 1px 0 rgba(31, 36, 48, 0.06);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 150px minmax(520px, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 108px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-brand img {
  width: 130px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 1.55vw, 24px);
  white-space: nowrap;
}

.site-nav a {
  position: relative;
  color: #151b24;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 3px;
  background: var(--casq-blue);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-dot {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.social-dot--facebook {
  background: #2f7bdc;
}

.social-dot--youtube {
  background: #e51d1a;
}

.social-dot--instagram {
  background: #d93282;
}

.social-dot--tiktok {
  background: #111;
}

.header-news,
.header-trial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  font-weight: 900;
  text-decoration: none;
}

.header-news {
  min-width: 184px;
  background: linear-gradient(90deg, #fff589, #fff9c9);
  color: #192134;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.header-news::before {
  content: "▣";
  margin-right: 8px;
  font-size: 20px;
}

.header-news::after {
  content: "›";
  margin-left: 20px;
  color: var(--casq-navy);
  font-size: 28px;
  line-height: 1;
}

.header-trial {
  min-width: 172px;
  background: var(--casq-blue);
  color: #fff;
}

.home-hero {
  position: relative;
  min-height: calc(100vh - 108px);
  overflow: hidden;
  background: #d8e3f1;
}

.home-hero__slides {
  position: absolute;
  inset: 0;
}

.home-hero__slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 67% 50%;
  opacity: 0;
  animation: casqHero 20s infinite;
}

.home-hero__slides img:nth-child(1) {
  opacity: 1;
}

.home-hero__slides img:nth-child(2) {
  animation-delay: 5s;
}

.home-hero__slides img:nth-child(3) {
  animation-delay: 10s;
}

.home-hero__slides img:nth-child(4) {
  animation-delay: 15s;
}

@keyframes casqHero {
  0%, 22% {
    opacity: 1;
  }
  28%, 100% {
    opacity: 0;
  }
}

.home-hero__copy {
  position: absolute;
  bottom: 9%;
  left: 4%;
  z-index: 2;
  color: #fff;
  font-style: italic;
  font-weight: 900;
  text-shadow: 0 5px 8px rgba(26, 40, 82, 0.6);
  transform: skewX(-10deg) rotate(-7deg);
}

.home-hero__line {
  margin: 0 0 8px;
  font-size: clamp(34px, 5vw, 78px);
  line-height: 1.05;
}

.home-hero h1 {
  position: relative;
  width: fit-content;
  margin: 16px 0 0;
  padding: 0 22px 8px;
  font-size: clamp(66px, 10vw, 150px);
  line-height: 0.95;
}

.home-hero h1::before {
  content: "";
  position: absolute;
  inset: 16px 0 0;
  z-index: -1;
  background: rgba(29, 46, 107, 0.82);
  transform: skewX(-10deg);
}

.home-hero__dots,
.page-hero__dots {
  position: absolute;
  z-index: 1;
  width: 250px;
  height: 250px;
  background-image: radial-gradient(rgba(225, 238, 255, 0.9) 2px, transparent 2.5px);
  background-size: 18px 18px;
  opacity: 0.85;
  pointer-events: none;
}

.home-hero__dots--left,
.page-hero__dots--left {
  bottom: 7%;
  left: -30px;
  transform: rotate(-20deg);
}

.home-hero__dots--right,
.page-hero__dots--right {
  top: 0;
  right: 18px;
  transform: rotate(18deg);
}

.page-hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 385px;
  overflow: hidden;
  color: #fff;
  background-image: linear-gradient(rgba(22, 38, 70, 0.28), rgba(22, 38, 70, 0.28)), var(--hero-image);
  background-position: center;
  background-size: cover;
}

.page-hero__inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
}

.section {
  position: relative;
  padding: 80px 0;
}

.section--news,
.section--school {
  background: linear-gradient(135deg, #f4fbff, #d9edff);
}

.section--about,
.section--service,
.section--ambassador {
  background: #fff;
}

.section-heading {
  margin-bottom: 34px;
  text-align: center;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--casq-blue);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.35;
  font-weight: 900;
}

h3 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.45;
  font-weight: 900;
}

.lead {
  max-width: 760px;
  color: var(--casq-muted);
  font-size: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.news-card,
.archive-card,
.service-card,
.card {
  border-radius: 0;
  background: #fff;
  box-shadow: 0 10px 28px rgba(38, 60, 93, 0.08);
}

.news-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
  padding: 22px;
}

.news-card img {
  width: 34px;
  margin-top: 4px;
}

.news-card time,
.archive-card time {
  color: var(--casq-blue);
  font-size: 13px;
}

.news-card h3 {
  font-size: 17px;
}

.news-card a,
.archive-card a {
  text-decoration: none;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.image-stack {
  margin: 0;
}

.image-stack img,
.service-card img,
.archive-card__image img,
.single-eyecatch img {
  width: 100%;
  object-fit: cover;
}

.image-stack img {
  aspect-ratio: 4 / 3;
}

.button-origin {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: 24px;
}

.button-origin a,
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 22px;
  color: #222;
  font-weight: 900;
  line-height: 1.35;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.button-origin a::before,
.button--yellow::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 2px solid #333;
  background: var(--casq-yellow);
  box-shadow: 4px 4px #333;
  transform: skewX(-15deg);
}

.button-origin a:hover,
.button--yellow:hover {
  transform: translate(4px, 4px);
}

.button-origin a:hover::before,
.button--yellow:hover::before {
  box-shadow: none;
}

.area-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.area-card {
  position: relative;
  min-height: 138px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  background: var(--casq-navy);
}

.area-card img {
  width: 100%;
  height: 100%;
  min-height: 138px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.area-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(19, 35, 75, 0.28);
}

.area-card span {
  position: absolute;
  right: 18px;
  bottom: 14px;
  z-index: 1;
  font-size: 22px;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.area-card:hover img {
  transform: scale(1.1);
}

.service-card {
  overflow: hidden;
}

.service-card img {
  aspect-ratio: 16 / 10;
}

.service-card h3,
.service-card p {
  padding-inline: 24px;
}

.service-card h3 {
  margin-top: 22px;
}

.service-card p {
  margin-bottom: 28px;
}

.ambassador-card {
  margin: 0;
  background: linear-gradient(135deg, #eef7ff, #ffffff);
  box-shadow: 0 10px 28px rgba(38, 60, 93, 0.08);
}

.ambassador-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 24px;
}

.contact-band {
  position: relative;
  display: grid;
  min-height: 360px;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: var(--casq-navy);
}

.contact-band__image {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(17, 30, 63, 0.5), rgba(17, 30, 63, 0.5)), url("assets/images/contact.jpg");
  background-position: center 38%;
  background-size: cover;
}

.contact-band__content {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 64px 0;
}

.contact-band p {
  max-width: 700px;
}

.floating-banner {
  position: fixed;
  right: 0;
  bottom: 28px;
  z-index: 30;
  width: min(300px, 32vw);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.18));
}

.floating-banner img {
  width: 100%;
}

.breadcrumb {
  margin: 24px 0 0;
  color: var(--casq-muted);
  font-size: 13px;
  font-weight: 700;
}

.breadcrumb a {
  color: inherit;
}

.page-content,
.single-layout,
.archive-shell {
  padding: 64px 0;
}

.entry-content {
  max-width: 880px;
  margin-inline: auto;
  font-weight: 600;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content h2 {
  margin-top: 54px;
  padding-left: 18px;
  border-left: 6px solid var(--casq-blue);
  font-size: 30px;
}

.entry-content h3 {
  margin-top: 36px;
  color: var(--casq-navy);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  background: #fff;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--casq-line);
  padding: 14px 16px;
  text-align: left;
}

.entry-content th {
  background: var(--casq-soft);
}

.entry-content .wp-block-table table {
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(38, 60, 93, 0.08);
}

.entry-content .wp-block-table td:first-child {
  width: 32%;
  background: var(--casq-soft);
  color: var(--casq-navy);
  font-weight: 900;
}

.archive-grid {
  align-items: stretch;
}

.archive-card {
  overflow: hidden;
}

.archive-card__image img {
  aspect-ratio: 16 / 9;
}

.archive-grid--coach {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.archive-grid--coach .archive-card__image img {
  aspect-ratio: 1 / 1;
}

.archive-grid--coach .archive-card__body {
  text-align: center;
}

.archive-card__body {
  padding: 24px;
}

.archive-card__label {
  margin: 0 0 4px;
  color: var(--casq-blue);
  font-size: 12px;
  font-weight: 900;
}

.archive-card h2 {
  margin: 4px 0 10px;
  font-size: 22px;
}

.coach-school-chips,
.coach-school-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.coach-school-chips li,
.coach-school-links a,
.coach-school-links span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid var(--casq-line);
  background: var(--casq-soft);
  color: var(--casq-navy);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.coach-profile {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.coach-profile__image {
  margin: 0;
}

.coach-profile__image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(38, 60, 93, 0.08);
}

.coach-profile .entry-content {
  margin-inline: 0;
}

.coach-schools {
  margin-top: 56px;
  padding: 32px;
  background: var(--casq-soft);
  text-align: center;
}

.casq-contact-form-block {
  max-width: 880px;
  margin: 48px auto;
  padding: 32px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(38, 60, 93, 0.08);
}

.casq-contact-form .p-form__fields {
  display: grid;
  gap: 18px;
}

.casq-contact-form .p-form__field {
  display: grid;
  gap: 8px;
}

.casq-contact-form input,
.casq-contact-form select,
.casq-contact-form textarea {
  width: 100%;
  border: 1px solid var(--casq-line);
  background: #fff;
  padding: 12px 14px;
  font: inherit;
  font-weight: 600;
}

.p-form__field-tag {
  color: #d52b2b;
}

.casq-hp-field {
  position: absolute;
  left: -9999px;
}

.casq-form-message {
  margin-bottom: 20px;
  padding: 14px 18px;
  font-weight: 900;
}

.casq-form-message--success {
  background: #e8f8ed;
  color: #176b31;
}

.casq-form-message--error {
  background: #fff1f1;
  color: #a82020;
}

.archive-description {
  margin: 0 auto 32px;
  text-align: center;
}

.empty-state {
  padding: 48px;
  background: var(--casq-soft);
  text-align: center;
}

.school-info {
  margin: 36px 0;
  padding: 28px;
  background: var(--casq-soft);
}

.meta-list {
  display: grid;
  grid-template-columns: minmax(130px, 180px) 1fr;
  gap: 10px 18px;
  margin: 0;
}

.meta-list dt {
  color: var(--casq-navy);
}

.meta-list dd {
  margin: 0;
  font-weight: 600;
}

.site-footer {
  background: var(--casq-header);
  padding: 34px 0 20px;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-brand--footer img {
  width: 112px;
}

.site-copy {
  margin: 20px 0 0;
  color: var(--casq-muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1180px) {
  .site-header__inner {
    grid-template-columns: 145px 1fr;
    min-height: 96px;
  }

  .site-actions {
    grid-column: 1 / -1;
    justify-content: center;
    padding-bottom: 14px;
  }
}

@media (max-width: 1320px) {
  .site-nav {
    gap: 15px;
  }

  .site-nav a {
    font-size: 14px;
  }

  .header-news,
  .header-trial {
    min-width: 154px;
    padding-inline: 14px;
  }
}

@media (max-width: 860px) {
  .site-shell {
    width: min(100% - 28px, var(--casq-max));
  }

  .site-header__inner {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 0;
  }

  .site-brand,
  .site-nav,
  .site-actions {
    justify-content: center;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .site-actions {
    flex-wrap: wrap;
    padding-bottom: 0;
  }

  .header-news,
  .header-trial {
    min-height: 42px;
    min-width: 0;
    padding-inline: 14px;
    font-size: 13px;
  }

  .home-hero {
    min-height: 620px;
  }

  .home-hero__slides img {
    object-position: right center;
  }

  .home-hero__copy {
    right: 16px;
    bottom: 12%;
    left: 16px;
  }

  .home-hero h1 {
    font-size: clamp(48px, 17vw, 88px);
  }

  .split,
  .grid--two,
  .coach-profile {
    grid-template-columns: 1fr;
  }

  .floating-banner {
    width: min(190px, 48vw);
  }

  .site-footer__inner {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .site-brand img {
    width: 92px;
  }

  .site-nav a {
    font-size: 12px;
  }

  .social-dot,
  .header-news {
    display: none;
  }

  .home-hero {
    min-height: 560px;
  }

  .home-hero__line {
    font-size: 34px;
  }

  .home-hero h1 {
    padding-inline: 10px;
    font-size: 52px;
  }

  .page-hero {
    min-height: 270px;
  }

  .section {
    padding: 56px 0;
  }

  .area-strip {
    grid-template-columns: 1fr;
  }

  .floating-banner {
    bottom: 12px;
    width: 160px;
  }

  .meta-list {
    grid-template-columns: 1fr;
  }
}
