@charset "UTF-8";

/* ==========================================================================
   株式会社ラクリマサイバード コーポレートサイト

   数値の書き方
   - calc(N * var(--u)) の N は Figma の px 値そのまま。
   - PC（768px以上）：--u は 1440px 幅で 1px。1440px 未満は画面幅に比例して縮小、
     1440px 超は 1px で固定（中身は最大 1440px で中央寄せ）。
   - スマホ（767px以下）：--u は常に 1px。

   文字サイズ
   - Figma で 15px 以上の文字：比例縮小しても 15px を下回らない（max(15px, …)）。
   - Figma で 15px 未満の文字（10〜14px）：縮小せず Figma の px 値で固定。
   ========================================================================== */

:root {
  --u: min(100vw / 1440, 1px);

  --c-accent: #1574ee;
  --c-accent-hover: #2e8aff;
  --c-heading: #15212f;
  --c-text: #536171;
  --c-sub: #7a8796;
  --c-line: #dce3eb;
  --c-bg: #f5f8fc;
  --c-mv-bg: #06539f;
  --c-error: #d93a3a;

  --font-ja: "Noto Sans JP", sans-serif;
  --font-en: "Michroma", sans-serif;

  /* Figma の行間「自動」の実寸に合わせた値 */
  --lh-ja: 1.2;
  --lh-en: 1.42;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--c-heading);
  font-family: var(--font-ja);
  font-size: max(15px, calc(16 * var(--u)));
  font-weight: 400;
  line-height: var(--lh-ja);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
}

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

img {
  display: block;
  max-width: none;
}

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

small {
  font-size: inherit;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* Layout
   ========================================================================== */
.l-inner {
  width: 100%;
  max-width: calc(1440 * var(--u));
  margin-inline: auto;
  padding-inline: calc(96 * var(--u));
}

/* Header
   ========================================================================== */
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(24 * var(--u));
  height: calc(112 * var(--u));
}

/* ナビの文字は縮小しないため、幅が足りないときはロゴ側を縮めて収める */
.header__logo {
  flex: 0 1 auto;
  min-width: 0;
}

.header__logo a {
  display: block;
  transition: opacity 0.3s;
}

.header__logo img {
  width: calc(240 * var(--u));
  max-width: 100%;
  height: auto;
  aspect-ratio: 292 / 48;
  object-fit: cover;
}

.gnav {
  flex: none;
}

.gnav__list {
  display: flex;
  align-items: center;
  gap: calc(36 * var(--u));
}

.gnav__link {
  display: block;
  color: var(--c-heading);
  font-family: var(--font-en);
  font-size: 14px;
  line-height: var(--lh-en);
  white-space: nowrap;
  transition: color 0.3s;
}

.gnav__contact {
  display: flex;
  align-items: center;
  gap: calc(20 * var(--u));
  height: calc(44 * var(--u));
  padding: 0 calc(24 * var(--u)) 0 calc(32 * var(--u));
  background: var(--c-accent);
  color: #fff;
  font-family: var(--font-en);
  font-size: 14px;
  line-height: var(--lh-en);
  white-space: nowrap;
  transition: background-color 0.3s;
}

.menu-btn {
  display: none;
}

/* 矢印アイコン（12×12 の枠から SVG が少しはみ出す Figma の配置を再現） */
.icon-arrow {
  position: relative;
  flex: none;
  width: calc(12 * var(--u));
  height: calc(12 * var(--u));
  transition: transform 0.3s;
}

.icon-arrow img {
  position: absolute;
  top: calc(-0.3841 * var(--u));
  left: 0;
  width: calc(12.781 * var(--u));
  height: calc(12.7682 * var(--u));
}

.icon-arrow--down {
  transform: rotate(90deg);
}

/* Drawer（スマホのみ）
   ========================================================================== */
.drawer {
  display: none;
}

/* Main visual
   ========================================================================== */
/* 動画の枠は画面幅いっぱい */
.mv__visual {
  position: relative;
  height: calc(540 * var(--u));
  background: var(--c-mv-bg);
}

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

/* 動画の上下左右中央に重ねる白ロゴ。社名はロゴの位置を動かさないよう、ロゴの下に絶対配置 */
.mv__brand {
  position: absolute;
  top: 48%;
  left: 50%;
  width: calc(640 * var(--u));
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.mv__logo {
  width: 100%;
  height: auto;
}

.mv__name {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  margin-top: calc(28 * var(--u));
  color: #fff;
  font-size: max(15px, calc(18 * var(--u)));
  text-align: center;
  white-space: nowrap;
}

/* スクロールの案内（スマホのみ表示） */
.mv__scroll {
  display: none;
}

@keyframes mv-scroll {
  0%,
  100% {
    transform: translateY(-3px);
  }

  50% {
    transform: translateY(3px);
  }
}

/* Section 共通
   ========================================================================== */
.section--bg {
  background: var(--c-bg);
}

.section__inner {
  display: flex;
  align-items: flex-start;
  gap: calc(80 * var(--u));
  padding-block: calc(120 * var(--u));
}

.section__inner--message {
  padding-top: calc(136 * var(--u));
}

.section__body {
  flex: 1 0 0;
  min-width: 0;
}

.section-head {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: calc(20 * var(--u));
  width: calc(400 * var(--u));
}

.section-head__marker {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--u));
}

.section-head__marker::before {
  content: "";
  width: calc(56 * var(--u));
  height: 1px;
  background: var(--c-accent);
}

.section-head__num {
  color: var(--c-accent);
  font-family: var(--font-en);
  font-size: 10px;
  line-height: var(--lh-en);
}

.section-head__title {
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--u));
  font-weight: 400;
}

.section-head__en {
  color: var(--c-heading);
  font-family: var(--font-en);
  font-size: calc(48 * var(--u));
  line-height: var(--lh-en);
}

.section-head__ja {
  color: var(--c-text);
  font-size: 15px;
  line-height: var(--lh-ja);
}

/* Message
   ========================================================================== */
.message {
  display: flex;
  flex-direction: column;
  gap: calc(32 * var(--u));
}

.message__headline {
  color: var(--c-accent);
  font-size: calc(40 * var(--u));
  font-weight: 500;
  line-height: 1.7;
}

.message__text {
  color: var(--c-text);
  font-size: max(15px, calc(16 * var(--u)));
  line-height: 2.2;
}

/* Service
   ========================================================================== */
.service {
  display: flex;
  flex-direction: column;
  gap: calc(48 * var(--u));
}

.service__item {
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--u));
  padding-top: calc(28 * var(--u));
  border-top: 1px solid var(--c-line);
}

.service__category {
  color: var(--c-accent);
  font-family: var(--font-en);
  font-size: 12px;
  line-height: var(--lh-en);
}

.service__title {
  color: var(--c-heading);
  font-size: calc(32 * var(--u));
  font-weight: 500;
  line-height: var(--lh-ja);
}

.service__text {
  color: var(--c-text);
  font-size: max(15px, calc(16 * var(--u)));
  line-height: 2;
}

/* Company
   ========================================================================== */
.company {
  border-top: 1px solid var(--c-line);
}

.company__row {
  display: flex;
  align-items: center;
  gap: calc(24 * var(--u));
  padding-block: calc(28 * var(--u));
  border-bottom: 1px solid var(--c-line);
}

.company__label {
  flex: none;
  width: calc(136 * var(--u));
  color: var(--c-text);
  font-size: 14px;
}

.company__value {
  flex: 1 0 0;
  min-width: 0;
  color: var(--c-heading);
  font-size: max(15px, calc(16 * var(--u)));
  overflow-wrap: anywhere;
}

/* Contact
   ========================================================================== */
.contact {
  display: flex;
  flex-direction: column;
  gap: calc(40 * var(--u));
}

.contact__intro {
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--u));
}

.contact__title {
  color: var(--c-heading);
  font-size: calc(32 * var(--u));
  font-weight: 500;
  line-height: var(--lh-ja);
}

.contact__text {
  color: var(--c-text);
  font-size: max(15px, calc(16 * var(--u)));
  line-height: 2;
}

/* --label-w はラベル列の幅。ラベルの文字は縮小しないため、
   最長の「お問い合わせ内容」＋バッジが収まる 172px を下限にしている */
.form {
  --label-w: max(calc(210 * var(--u)), 172px);

  display: flex;
  flex-direction: column;
  gap: calc(40 * var(--u));
}

.form__fields {
  display: flex;
  flex-direction: column;
  gap: calc(24 * var(--u));
}

.form-field {
  display: flex;
  align-items: flex-start;
  gap: calc(24 * var(--u));
}

.form-field__head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  width: var(--label-w);
  height: calc(56 * var(--u));
}

.form-field__label {
  color: var(--c-heading);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.badge {
  flex: none;
  padding: calc(4 * var(--u)) calc(8 * var(--u));
  font-size: 11px;
  white-space: nowrap;
}

.badge--required {
  background: #e7f0ff;
  color: var(--c-accent);
}

.badge--optional {
  background: #e9edf2;
  color: var(--c-text);
}

.form-field__body {
  flex: 1 0 0;
  min-width: 0;
}

/* Figma の余白（左右18 / 上下17）は枠線の外側基準のため、枠線1pxぶんを引いている */
.form-field__input {
  display: block;
  width: 100%;
  height: calc(56 * var(--u));
  padding: 0 calc(18 * var(--u) - 1px);
  border: 1px solid var(--c-line);
  border-radius: 2px;
  background: #fff;
  color: var(--c-heading);
  font-size: max(15px, calc(16 * var(--u)));
  line-height: var(--lh-ja);
  appearance: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-field__input::placeholder {
  color: var(--c-sub);
  opacity: 1;
}

.form-field__input:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(21, 116, 238, 0.15);
}

/* 入力文の行間は 1.6。1行目の位置が Figma（行間自動）と揃うよう上余白で差分を吸収 */
.form-field__input--textarea {
  height: calc(176 * var(--u));
  min-height: calc(176 * var(--u));
  padding-block: calc(13.8 * var(--u) - 1px) calc(17 * var(--u) - 1px);
  line-height: 1.6;
  resize: vertical;
}

.form-field__input.is-error {
  border-color: var(--c-error);
}

.form-field__input.is-error:focus {
  box-shadow: 0 0 0 3px rgba(217, 58, 58, 0.15);
}

.form-field__error {
  margin-top: calc(8 * var(--u));
  color: var(--c-error);
  font-size: 12px;
  line-height: 1.5;
}

.form-field__error:empty {
  display: none;
}

/* スパム対策用の入力欄は画面外へ */
.form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__action {
  padding-left: calc(var(--label-w) + 24 * var(--u));
}

.form__status {
  margin-bottom: calc(16 * var(--u));
  color: var(--c-error);
  font-size: 14px;
  line-height: 1.7;
}

.form__status:empty {
  display: none;
}

.form__submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(320 * var(--u));
  height: calc(64 * var(--u));
  padding: 0 calc(32 * var(--u));
  border: 0;
  border-radius: 0;
  background: var(--c-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  line-height: var(--lh-ja);
  cursor: pointer;
  appearance: none;
  transition: background-color 0.3s, opacity 0.3s;
}

.form__submit:disabled {
  opacity: 0.6;
  cursor: default;
}

/* 24×16 の枠から SVG が少しはみ出す Figma の配置を再現 */
.form__submit-arrow {
  flex: none;
  width: calc(24.7619 * var(--u));
  height: calc(16.7396 * var(--u));
  margin: calc(-0.3698 * var(--u)) calc(-0.7619 * var(--u)) calc(-0.3698 * var(--u)) 0;
  transition: transform 0.3s;
}

/* reCAPTCHA：右下のバッジは非表示にし、代わりにフォーム下へ表記を置く
   （Google の指定どおり display: none ではなく visibility: hidden を使う） */
.grecaptcha-badge {
  visibility: hidden;
}

.form__recaptcha {
  margin-top: calc(24 * var(--u));
  color: var(--c-sub);
  font-size: 12px;
  line-height: 1.7;
}

.form__recaptcha a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-complete {
  padding: calc(40 * var(--u));
  border: 1px solid var(--c-line);
  background: #fff;
}

.form-complete:focus {
  outline: none;
}

.form-complete__title {
  color: var(--c-heading);
  font-size: max(15px, calc(24 * var(--u)));
  font-weight: 500;
  line-height: 1.7;
}

.form-complete__text {
  margin-top: calc(16 * var(--u));
  color: var(--c-text);
  font-size: max(15px, calc(16 * var(--u)));
  line-height: 2;
}

/* Footer
   ========================================================================== */
/* Figma の上罫線は高さに含まれないため、border ではなく内側の影で描画 */
.footer {
  box-shadow: inset 0 1px 0 var(--c-line);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(152 * var(--u));
}

.footer__logo img {
  width: calc(244 * var(--u));
  height: calc(40 * var(--u));
  object-fit: cover;
}

.footer__copy {
  color: var(--c-sub);
  font-size: 14px;
  white-space: nowrap;
}

/* Hover（マウス操作の端末のみ）
   ========================================================================== */
@media (hover: hover) {
  .header__logo a:hover {
    opacity: 0.7;
  }

  .gnav__link:hover,
  .form__recaptcha a:hover {
    color: var(--c-accent);
  }

  .gnav__contact:hover,
  .form__submit:not(:disabled):hover {
    background: var(--c-accent-hover);
  }

  .gnav__contact:hover .icon-arrow,
  .form__submit:not(:disabled):hover .form__submit-arrow {
    transform: translateX(calc(4 * var(--u)));
  }
}

/* PC用の改行（<br class="u-pc">）
   文字が 15px で止まるぶん、999px 以下では1行に収まらなくなるため改行を外す
   ========================================================================== */
@media (max-width: 999px) {
  .u-pc {
    display: none;
  }
}

/* ==========================================================================
   スマホ（767px以下）
   ========================================================================== */
@media (max-width: 767px) {
  :root {
    --u: 1px;
  }

  html {
    scroll-padding-top: 80px;
  }

  body.is-drawer-open {
    overflow: hidden;
  }

  .l-inner {
    padding-inline: 24px;
  }

  /* Header：スマホのみ上部固定 */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
    background: #fff;
  }

  .header__inner {
    height: 80px;
  }

  .header__logo img {
    width: 176px;
  }

  .gnav {
    display: none;
  }

  .menu-btn {
    position: relative;
    display: block;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    appearance: none;
  }

  /* 2本線（Figma：長さ40・太さ1.5、中心から上下6px）が回転して ✕ になる。
     ✕ は Figma の閉じるアイコンと同じ 24×24（線の長さ 40 × 0.8485 ≒ 33.94px） */
  .menu-btn__line {
    position: absolute;
    top: 21.25px;
    left: 2px;
    width: 40px;
    height: 1.5px;
    background: var(--c-accent);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .menu-btn__line:nth-child(1) {
    transform: translateY(-6px) rotate(0deg) scaleX(1);
  }

  .menu-btn__line:nth-child(2) {
    transform: translateY(6px) rotate(0deg) scaleX(1);
  }

  .menu-btn[aria-expanded="true"] .menu-btn__line:nth-child(1) {
    transform: translateY(0) rotate(225deg) scaleX(0.8485);
  }

  .menu-btn[aria-expanded="true"] .menu-btn__line:nth-child(2) {
    transform: translateY(0) rotate(135deg) scaleX(0.8485);
  }

  /* Drawer */
  .drawer {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: block;
    padding-top: 80px;
    background: #fff;
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }

  .drawer.is-open {
    opacity: 1;
    visibility: visible;
  }

  .drawer__nav {
    padding: 40px 24px 32px;
    transform: translateY(-8px);
    transition: transform 0.3s;
  }

  .drawer.is-open .drawer__nav {
    transform: translateY(0);
  }

  .drawer__list {
    border-top: 1px solid var(--c-line);
  }

  .drawer__item {
    border-bottom: 1px solid var(--c-line);
  }

  .drawer__link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-block: 24px;
  }

  .drawer__num {
    flex: none;
    color: var(--c-accent);
    font-family: var(--font-en);
    font-size: 10px;
    line-height: var(--lh-en);
  }

  .drawer__heading {
    display: flex;
    flex: 1 0 0;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
  }

  .drawer__en {
    color: var(--c-heading);
    font-family: var(--font-en);
    font-size: 24px;
    line-height: var(--lh-en);
  }

  .drawer__ja {
    color: var(--c-text);
    font-size: 13px;
  }

  /* Main visual：ヘッダー込みで 100svh */
  .mv {
    height: 100vh;
    height: 100svh;
    padding-top: 80px;
  }

  .mv__visual {
    height: 100%;
  }

  .mv__brand {
    width: 296px;
    top: 46%;
  }

  .mv__name {
    margin-top: 16px;
    font-size: 14px;
  }

  /* Figma の非表示レイヤー「Scroll cue」の寸法（間隔16・矢印12×24）を使用 */
  .mv__scroll {
    position: absolute;
    bottom: 24px;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 16px;
    color: #fff;
    font-family: var(--font-en);
    font-size: 12px;
    line-height: var(--lh-en);
    white-space: nowrap;
    transform: translateX(-50%);
  }

  /* 矢印の SVG は青なので、動画の上で見えるよう白に変換 */
  .mv__scroll-arrow {
    width: 12.6727px;
    height: 24.6757px;
    margin: 0 -0.3363px -0.6757px;
    filter: brightness(0) invert(1);
    animation: mv-scroll 1.6s ease-in-out infinite;
  }

  /* Section 共通 */
  .section__inner {
    flex-direction: column;
    gap: 40px;
    padding-block: 80px;
  }

  .section__body {
    flex: none;
    width: 100%;
  }

  .section-head {
    width: 100%;
  }

  .section-head__en {
    font-size: 32px;
  }

  /* Message */
  .message {
    gap: 24px;
  }

  .message__headline {
    font-size: 26px;
  }

  /* Service */
  .service {
    gap: 40px;
  }

  .service__item {
    padding-top: 24px;
  }

  .service__category {
    font-size: 10px;
  }

  .service__title {
    font-size: 24px;
  }

  /* Company */
  .company__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-block: 24px;
  }

  .company__label {
    width: auto;
  }

  .company__value {
    flex: none;
    width: 100%;
    line-height: 1.8;
  }

  /* Contact */
  .contact__title {
    font-size: 24px;
    line-height: 1.7;
  }

  .form-field {
    flex-direction: column;
    gap: 12px;
  }

  .form-field__head {
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    height: auto;
  }

  .form-field__body {
    flex: none;
    width: 100%;
  }

  .form__action {
    padding-left: 0;
  }

  .form__submit {
    width: 100%;
  }

  .form-complete {
    padding: 32px 24px;
  }

  .form-complete__title {
    font-size: 20px;
  }

  /* Footer */
  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 24px;
    height: auto;
    padding-block: 48px;
  }

  .footer__logo img {
    width: 146px;
    height: 24px;
  }

  .footer__copy {
    font-size: 11px;
  }
}

/* 動きを減らす設定の端末ではアニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .mv__scroll-arrow {
    animation: none;
  }
}
