/* ============================================================
   紫電一閃株式会社 — Corporate site styles
   Design tokens transcribed from the official Design System.
   ============================================================ */

/* ---------- Webfonts (self-hosted woff2) ---------- */
@font-face {
  font-family: "LINE Seed JP";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../assets/fonts/LINESeedJP_Rg.woff2") format("woff2");
}
@font-face {
  font-family: "LINE Seed JP";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("../assets/fonts/LINESeedJP_Bd.woff2") format("woff2");
}
@font-face {
  font-family: "LINE Seed JP";
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url("../assets/fonts/LINESeedJP_Eb.woff2") format("woff2");
}

/* ---------- Design tokens ---------- */
:root {
  /* Colors */
  --color-brand-purple: #5B00FF;
  --color-violet-base: #0D0B14;
  --color-dark-bg: #1A1625;
  --color-light-tint: #C4B5FD;
  --color-muted-violet: #8B5CF6;
  --color-pure-white: #F8F7FF;
  --color-electric-yellow: #EEFF00;
  --color-warm-amber: #FCD34D;
  --color-cyan-electric: #67E8F9;
  --gradient-cinematic: linear-gradient(90deg, #0D0B14 0%, #5B00FF 55%, #EEFF00 100%);

  /* Typography */
  --font-sans: "LINE Seed JP", "Geist", system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
  --font-serif-display: "Noto Serif JP", serif;

  /* Spacing */
  --space-4: 16px;
  --space-6: 32px;
  --space-8: 64px;

  /* Radius */
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Motion */
  --ease-flash: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast: 140ms;
  --dur-base: 240ms;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: #0D0B14;
  color: #F8F7FF;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: #EEFF00; color: #0D0B14; }
:focus-visible { outline: 2px solid #EEFF00; outline-offset: 3px; }
.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;
}
/* スパム対策ハニーポット（人間には非表示） */
.hp { display: none; }

/* ============================================================
   起動イントロ演出 ——「紫電一閃」
   紫地に白ロゴ → 黄色の一閃（単発・滑らか）→ フェードでサイト表示。
   ヘッダーはその後に現れる。刺激を避けるため点滅はせず1回のみ。
   ============================================================ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #5B00FF;            /* メインカラーの紫 */
  overflow: hidden;
  animation: introOverlay 2s ease forwards;
}
/* やわらかな発光（ロゴの背面でふわっと広がる） */
.intro__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(238,255,0,0.55) 0%, rgba(238,255,0,0.18) 34%, rgba(238,255,0,0) 64%);
  opacity: 0;
  animation: introGlow 2s ease-in-out both;
}
/* ロゴは2枚重ね：下＝白ロゴ、上＝稲妻だけ黄色のロゴ */
.intro__logo {
  position: relative;
  display: block;
  width: min(440px, 72vw);
  animation: introLogo 2s ease both;
}
.intro__logo-img {
  display: block;
  width: 100%;
  height: auto;
}
.intro__logo-bolt {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation: introBolt 2s ease-in-out both;
}
@keyframes introOverlay {
  0%, 60% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes introLogo {
  0% { opacity: 0; transform: scale(0.94); }
  18% { opacity: 1; transform: scale(1); }
  50% { opacity: 1; transform: scale(1); }
  65% { opacity: 0.85; }
  100% { opacity: 0; }
}
@keyframes introGlow {
  0%, 28% { opacity: 0; }
  46% { opacity: 1; }
  72% { opacity: 0.22; }
  100% { opacity: 0; }
}
/* 発光に合わせて稲妻マークが黄色くなり、そのまま維持される */
@keyframes introBolt {
  0%, 30% { opacity: 0; }
  48% { opacity: 1; }
  100% { opacity: 1; }
}
/* ヘッダーはイントロの後にフェードイン */
@keyframes headerReveal {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .site-header { animation: headerReveal 0.6s ease 2.1s both; }
}
/* 視覚効果を減らす設定の利用者にはイントロを出さず即表示 */
@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
}

/* ---------- Japanese phrase-aware line breaking ----------
   本文テキストは文節（フレーズ）単位で改行させる。HTML側の <wbr> を
   改行可能点として使い、それ以外では極力改行しない（keep-all）。
   overflow-wrap: anywhere は極端に狭い幅での溢れを防ぐ保険。 */
.hero__tagline, .hero__sub, .strip__title, .strip__desc,
.lead, .card__title, .card__desc, .works-lead, .work__title,
.news__title, .contact__intro, .company__value {
  line-break: strict;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: rgba(248, 247, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(13, 11, 20, 0.08);
}
.site-header__logo { display: flex; align-items: center; }
.site-header__logo img { height: 34px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #1A1625;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-flash);
}
.site-nav a:hover { color: #5B00FF; }
.nav-cta {
  font-weight: 700;
  color: #0D0B14 !important;
  background: #EEFF00;
  padding: 10px 20px;
  border-radius: 999px;
  transition: box-shadow var(--dur-base) var(--ease-flash), transform var(--dur-fast) var(--ease-flash);
}
.nav-cta:hover { box-shadow: 0 0 24px rgba(238, 255, 0, 0.35); }
.nav-cta:active { transform: scale(0.97); }

/* Mobile menu toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  border: 1px solid rgba(13, 11, 20, 0.28);
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px; background: #1A1625; border-radius: 2px;
}
.nav-toggle span + span { margin-top: 4px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 40px;
  overflow: hidden;
  background: #F8F7FF;
}
.hero__spark {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--gradient-cinematic);
  z-index: 1;
}
.hero__inner { position: relative; z-index: 1; max-width: 1100px; }
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #5B00FF;
  margin: 0 0 30px;
}
.hero__logo { margin: 0; }
.hero__logo img { width: min(640px, 84vw); height: auto; }
.hero__tagline {
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 700;
  line-height: 1.6;
  margin: 34px 0 0;
  max-width: 720px;
  color: #0D0B14;
}
.mark {
  background: #EEFF00;
  color: #0D0B14;
  padding: 0 8px;
  border-radius: 3px;
}
.hero__sub {
  font-size: 15px;
  line-height: 1.9;
  color: rgba(13, 11, 20, 0.6);
  margin: 26px 0 0;
  max-width: 620px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }

/* Buttons */
.btn {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: 999px;
  transition: box-shadow var(--dur-base) var(--ease-flash), transform var(--dur-fast) var(--ease-flash), background var(--dur-fast) var(--ease-flash);
}
.btn--primary { color: #0D0B14; background: #EEFF00; }
.btn--primary:hover { box-shadow: 0 0 24px rgba(238, 255, 0, 0.35); }
.btn--primary:active { transform: scale(0.97); }
.btn--ghost { color: #0D0B14; background: transparent; border: 1px solid rgba(13, 11, 20, 0.28); }
.btn--ghost:hover { border-color: #5B00FF; color: #5B00FF; }
.btn--ghost:active { transform: scale(0.97); }

/* ---------- Services strip ---------- */
.strip {
  border-top: 1px solid rgba(248, 247, 255, 0.08);
  border-bottom: 1px solid rgba(248, 247, 255, 0.08);
  background: #1A1625;
}
.strip__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip__cell {
  padding: 40px 32px;
  border-right: 1px solid rgba(248, 247, 255, 0.08);
}
.strip__cell:last-child { border-right: none; }
.strip__no { font-family: var(--font-mono); font-size: 12px; color: #8B5CF6; }
.strip__title { font-size: 19px; font-weight: 700; margin: 14px 0 6px; }
.strip__desc { font-size: 13px; line-height: 1.7; color: #C4B5FD; margin: 0; }

/* ---------- Section shell ---------- */
.section { padding: 110px 40px; }
.section--surface { background: #1A1625; border-top: 1px solid rgba(248, 247, 255, 0.08); }
.section__inner { max-width: 1100px; margin: 0 auto; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #8B5CF6;
  margin: 0 0 14px;
}
.h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; margin: 0 0 40px; }
.lead { font-size: 17px; line-height: 2; color: #F8F7FF; max-width: 760px; margin: 0 0 18px; }

/* ---------- Business cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 50px; }
.card {
  background: #1A1625;
  border: 1px solid rgba(248, 247, 255, 0.1);
  border-radius: 20px;
  padding: 34px 30px;
  transition: border-color var(--dur-base) var(--ease-flash), transform var(--dur-base) var(--ease-flash), box-shadow var(--dur-base) var(--ease-flash);
}
.card:hover {
  border-color: rgba(91, 0, 255, 0.6);
  transform: translateY(-4px);
  box-shadow: 0 0 40px rgba(91, 0, 255, 0.25);
}
.card__no { font-family: var(--font-mono); font-size: 13px; color: #EEFF00; }
.card__title { font-size: 20px; font-weight: 700; line-height: 1.5; margin: 18px 0 12px; }
.card__desc { font-size: 14px; line-height: 1.8; color: #C4B5FD; margin: 0; }

/* ---------- Works ---------- */
.works-lead { font-size: 15px; line-height: 1.9; color: #C4B5FD; max-width: 680px; margin: 0 0 44px; }
.works { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.work {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(248, 247, 255, 0.1);
  background: linear-gradient(150deg, #0D0B14 0%, #2a1a5e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.work__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms var(--ease-flash);
}
.work:hover .work__img { transform: scale(1.05); }
/* 下部を暗くして、ステータス／タイトルの可読性を確保 */
.work::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 11, 20, 0.9) 0%, rgba(13, 11, 20, 0.45) 32%, rgba(13, 11, 20, 0) 62%);
  pointer-events: none;
}
.work__meta { position: absolute; left: 24px; right: 24px; bottom: 22px; z-index: 1; }
.work__status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #0D0B14;
  background: #EEFF00;
  padding: 5px 12px;
  border-radius: 999px;
}
.work__title { font-size: 18px; font-weight: 700; margin: 12px 0 0; }

/* ---------- Company table ---------- */
.company { border-top: 1px solid rgba(248, 247, 255, 0.14); }
.company__row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 24px 4px;
  border-bottom: 1px solid rgba(248, 247, 255, 0.1);
}
.company__label { font-size: 14px; font-weight: 700; color: #C4B5FD; }
.company__value { font-size: 15px; line-height: 1.8; color: #F8F7FF; }

/* ---------- News ---------- */
.news__row {
  display: grid;
  grid-template-columns: 150px 120px 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 22px 4px;
  border-bottom: 1px solid rgba(248, 247, 255, 0.1);
}
.news__date { font-family: var(--font-mono); font-size: 14px; color: #EEFF00; }
.news__tag {
  justify-self: start;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #C4B5FD;
  border: 1px solid rgba(248, 247, 255, 0.24);
  padding: 3px 12px;
  border-radius: 999px;
}
.news__title { font-size: 15px; line-height: 1.7; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.contact__intro { font-size: 15px; line-height: 1.9; color: #C4B5FD; margin: 0 0 36px; }
.contact__address { font-size: 14px; line-height: 2; color: #C4B5FD; }
.contact__address p { margin: 0; }
.contact__address .company-name { color: #F8F7FF; font-weight: 700; margin-bottom: 4px; }

.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: #C4B5FD; }
.field input,
.field textarea,
.field select {
  background: #1A1625;
  border: 1px solid rgba(248, 247, 255, 0.16);
  border-radius: 12px;
  padding: 14px 16px;
  color: #F8F7FF;
  font-size: 15px;
  font-family: var(--font-sans);
  transition: border-color var(--dur-fast) var(--ease-flash), box-shadow var(--dur-fast) var(--ease-flash);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: #5B00FF;
  box-shadow: 0 0 0 3px rgba(91, 0, 255, 0.25);
}
.field textarea { resize: vertical; }
.field .req { color: #EEFF00; font-weight: 700; margin-left: 4px; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  /* 右端に下向きシェブロン（電気イエロー） */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23EEFF00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}
.field select:invalid { color: rgba(248, 247, 255, 0.5); }
/* プルダウンの選択肢：Windows Chrome 等は option の背景/文字色を反映するため、
   明るい文字×濃い背景を明示して可読性を確保（濃字×濃背景で読めなくなる不具合対策） */
.field select option {
  background-color: #1A1625;
  color: #F8F7FF;
}
.field select option:disabled { color: rgba(248, 247, 255, 0.45); }
.form__submit {
  align-self: flex-start;
  font-size: 15px;
  font-weight: 700;
  color: #0D0B14;
  background: #EEFF00;
  border: none;
  padding: 15px 40px;
  border-radius: 999px;
  cursor: pointer;
  transition: box-shadow var(--dur-base) var(--ease-flash), transform var(--dur-fast) var(--ease-flash);
}
.form__submit:hover { box-shadow: 0 0 24px rgba(238, 255, 0, 0.35); }
.form__submit:active { transform: scale(0.97); }
.form__submit:disabled { opacity: 0.6; cursor: default; }
.form__status { font-size: 13px; margin: 0; min-height: 1em; }
.form__status--ok { color: #EEFF00; }
.form__status--err { color: #FCD34D; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 48px 40px;
  border-top: 1px solid rgba(248, 247, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0D0B14;
}
.site-footer img { height: 24px; width: auto; }
.site-footer__copy { font-family: var(--font-mono); font-size: 12px; color: #8B5CF6; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .strip__grid { grid-template-columns: repeat(2, 1fr); }
  .strip__cell:nth-child(2n) { border-right: none; }
  .cards { grid-template-columns: 1fr 1fr; }
  .contact__grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 720px) {
  .site-header { padding: 14px 20px; position: relative; flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 12px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 10px 0; font-size: 15px; }
  .nav-cta { padding: 10px 20px; margin-top: 6px; }

  .hero { padding: 0 20px; min-height: 78vh; }
  .section { padding: 72px 20px; }
  .strip__grid { grid-template-columns: 1fr; }
  .strip__cell { border-right: none; border-bottom: 1px solid rgba(248, 247, 255, 0.08); }
  .strip__cell:last-child { border-bottom: none; }
  .cards { grid-template-columns: 1fr; }
  .works { grid-template-columns: 1fr; }
  .company__row { grid-template-columns: 1fr; gap: 6px; }
  .news__row { grid-template-columns: 1fr; gap: 6px; }
  .news__date { font-size: 13px; }
  .site-footer { padding: 32px 20px; flex-direction: column; gap: 16px; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
