/* ==========================================
   メインスタイルシート
========================================== */

/* リセットとMixinsのインポート */
@import url("../reset.css?v=1774950322");
@import url("../mixins.css?v=1774950322");

/* ==========================================
   ページ全体
========================================== */
/* 視覚的に非表示（SEO・アクセシビリティ用） */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrapper {
  min-height: 100vh;
  width: 100%;
  position: relative;

  @media (min-width: 440px) {
    display: flex;
    justify-content: space-evenly;
    align-items: flex-start;
  }
}

/* 固定背景レイヤー */
.wrapper::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    url(../img/bg-texture-pc.png) center / contain,
    linear-gradient(180deg, #f5f4ea 0%, #d8d6cc 100%);
  z-index: -1;
  pointer-events: none;
}

.wrapper-bg {
  display: none;
  position: sticky;
  top: 0;
  width: min(100vw - 375px - 3%, 902px);
  height: 100vh;
  justify-content: center;
  align-items: center;

  @media (min-width: 1024px) {
    display: flex;
  }

  .background-image {
    position: absolute;
    top: 44%;
    left: 33%;
    transform: translate(-50%, -50%);
    background-image: url('../img/svg/logo-bg.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0 auto;
    width: 100%;
    height: 100%;
    max-width: 635px;
    z-index: 0;
  }
}

.pc-fixed-buttons {
  width: 100%;
  max-width: 902px;
  z-index: 1;
  transform: scale(clamp(0.7, tan(atan2(100vh, 740px)), 1));
  transform-origin: center center;
  @media (max-height: 740px) {
    padding: 30px 0 0;
  }
}

.pc-video {
  width: 100%;
  height: 500px;
  margin: 0 auto;
  display: block;
  border: none;
  border-radius: var(--radius-sm);
}

.pc-buttons {
  display: flex;
  gap: var(--space-lg);
  width: 100%;
  height: 57px;
  margin: var(--space-lg) 0 0;
}

.btn-primary {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: var(--space-md) 0;
  border: 1px solid #a51924;
  border-radius: var(--radius-xs);
  background: var(--color-primary-gradient);
  color: var(--color-gold);
  text-align: center;
  font-size: var(--font-lg);
  font-style: normal;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.05625rem;
  isolation: isolate;
}

.btn-primary .arrow-icon {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  vertical-align: middle;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-xs);
  background: linear-gradient(
    0deg,
    rgba(68, 0, 6, 1) 0%,
    rgba(68, 0, 6, 1) 100%
  );
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: -1;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: var(--space-md) 0;
  border-radius: var(--radius-xs);
  background: var(--color-secondary-gradient);
  color: var(--color-text-dark);
  font-size: var(--font-lg);
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.05625rem;
  line-height: 1.4;
  isolation: isolate;
}

.btn-secondary .arrow-icon {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  vertical-align: middle;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-xs);
  background: linear-gradient(
    0deg,
    rgba(153, 108, 56, 1) 0%,
    rgba(153, 108, 56, 1) 100%
  );
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: -1;
}

.btn-secondary:hover::before {
  opacity: 1;
}

.page {
  width: 100%;
  margin: 0 auto;
  position: relative;
  background: var(--color-bg-main) url('../img/bg-texture.png') center / contain;

  @media (min-width: 440px) {
    max-width: 375px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-page);
  }

  @media (min-width: 1024px) {
    margin: 68px 0 0;
  }
}

/* ==========================================
   スマイルゼミコースセクション
========================================== */
.smile-zemi-logo {
  width: 188px;
  margin: 0 auto;
}

.smile-zemi-courses {
  display: flex;
  flex-direction: column;
  padding: 20px var(--space-md) 40px;
  background-color: var(--color-bg-gray);
}

.courses-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-border-gray);
  font-size: 12px;
  line-height: 1.5;
  transition: var(--transition);
  padding: var(--space-xs);
}

.courses-link::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: var(--space-sm);
  background-image: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.22108 12C0.879177 12 0.59019 11.882 0.354114 11.6459C0.118038 11.4098 0 11.1208 0 10.7789V1.22108C0 0.879177 0.118038 0.59019 0.354114 0.354114C0.59019 0.118038 0.879177 0 1.22108 0H5.70778V0.987342H1.22108C1.16259 0.987342 1.10905 1.01171 1.06044 1.06044C1.01171 1.10905 0.987342 1.16259 0.987342 1.22108V10.7789C0.987342 10.8374 1.01171 10.8909 1.06044 10.9396C1.10905 10.9883 1.16259 11.0127 1.22108 11.0127H10.7789C10.8374 11.0127 10.8909 10.9883 10.9396 10.9396C10.9883 10.8909 11.0127 10.8374 11.0127 10.7789V6.29222H12V10.7789C12 11.1208 11.882 11.4098 11.6459 11.6459C11.4098 11.882 11.1208 12 10.7789 12H1.22108ZM4.2488 8.45658L3.54342 7.7512L10.3073 0.987342H7.82278V0H12V4.17722H11.0127V1.69272L4.2488 8.45658Z" fill="%23333"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: var(--transition);
}

/* ==========================================
   ページヘッダー（共通）
========================================== */
.page-header {
  text-align: left;
  margin-bottom: var(--space-3xl);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.page-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-black);
  font-family: var(--font-gothic);
  font-size: var(--font-2xl);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.4px;
}

.page-last-updated {
  font-size: var(--font-xs);
  color: var(--color-text);
  margin-top: var(--space-sm);
}

/* ==========================================
   セクションタイトル（共通）
========================================== */
.section-title {
  color: var(--color-black);
  font-family: var(--font-gothic);
  font-size: var(--font-xl);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.05rem;
  padding-left: var(--space-xs);
  border-left: 3px solid var(--color-secondary);
  margin-bottom: var(--space-lg);
}

/* ==========================================
   Skill Table
========================================== */
.skill-table-wrapper {
  margin: var(--space-xl) 0 10px;
  position: relative;
}

.skill-table {
  width: 100%;
  max-width: 345px;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
  overflow: visible;
}

/* ヘッダー */
.skill-table thead {
  display: table-header-group;
}

.skill-table thead th {
  width: 31%;
  padding: 4px 8px;
  border-right: 1px solid var(--color-bg-white);
  letter-spacing: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;

  @media (min-width: 768px) {
    padding: 4px 0;
  }
}

.skill-table thead th:last-child {
  border-right: none;
}

.cefr-header {
  background-color: #68000a;
  border-bottom: 1px solid var(--color-bg-white);
  color: #e9d48b;
}

.eiken-header {
  background-color: #403e39;
  color: var(--color-bg-white);
}

.toeic-header {
  background-color: #403e39;
  color: var(--color-bg-white);
}

/* テーブル本体 */
.skill-table tbody tr {
  border: none;
}

.skill-table tbody td {
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 0;
  border-right: 1px solid var(--color-bg-white);
  border-bottom: 1px solid var(--color-bg-white);
}

.skill-table tbody td:last-child {
  border-right: none;
}

.skill-table tbody tr:last-child td {
  border-bottom: none;
}

.cefr-cell {
  min-width: 116px;
  background-color: #2e0407;
  color: #e9d48b;
  font-size: 16px;
  font-weight: 700 !important;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  position: relative;

  @media (min-width: 768px) {
    font-size: var(--font-xl);
  }
}

.eiken-cell {
  max-width: 106px;
  background-color: #d2cec4;
  color: #2f2f2f;
}

.toeic-cell {
  max-width: 106px;
  background-color: #d2cec4;
  color: #2f2f2f;
}

/* B2〜A1全体を囲む外側の黄色枠線 */
.skill-table tbody tr.level-b2 .cefr-cell::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  width: calc(100% + 2px);
  height: calc(400% + 5px);
  border: 5px solid #c19b2a;
  pointer-events: none;
  z-index: 2;
}

/* 吹き出し */
.skill-table-callout {
  position: relative;
  max-width: 345px;
  margin: 26px auto 0;
  background-color: #c19b2a;
  color: var(--color-bg-white);
  padding: 10px 15px 13px;
  font-family: var(--font-gothic);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.03rem;
}

.skill-table-callout::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 30px;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 0px solid transparent;
  border-bottom: 11px solid #c19b2a;
}

.skill-table-callout-text {
  margin: 0;
  letter-spacing: 0.04em;
}

.skill-table-callout .note {
  font-size: 0.7em;
  vertical-align: super;
}

.divider {
  display: block;
  width: calc(100% - 30px);
  height: 1px;
  margin: 0 auto;
  padding: 0 15px;
  background-color: #c19b2a;
}
