/* ==========================================================
   Fantia Engineer Recruiting
   ========================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --color-bg: #ffffff;
  --color-bg-soft: #f4f4f4;
  --color-bg-card: #ffffff;
  --color-border: #e6e6e6;
  --color-border-strong: #d8d8d8;

  --color-text: #1a1a1a;
  --color-text-strong: #0d0d0d;
  --color-text-muted: #5b5b5b;
  --color-text-faint: #8a8a8a;

  --color-accent: #dc1a22;          /* Fantia red */
  --color-accent-hover: #b91219;
  --color-accent-soft: #ef7d76;     /* coral used for "つくる" */

  --color-dark: #322F2F;
  --color-dark-2: #232323;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-cta: 0 10px 30px rgba(220, 26, 34, 0.35);

  --container: 880px;
  --section-py: 96px;

  --font-jp: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", "Meiryo", sans-serif;
  --font-en: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-jp);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.7;
  font-size: 14px;
  letter-spacing: 0.02em;
}
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.section {
  padding-block: var(--section-py);
  position: relative;
}
.bg-gray { background: var(--color-bg-soft); }

/* ---------- Common typography ---------- */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--color-text-faint);
  margin: 0 0 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}
.section-label-on-dark { color: rgba(255, 255, 255, 0.7); }

.section-title {
  font-size: 33px;
  line-height: 1.5;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin: 0 0 36px;
  color: var(--color-text-strong);
  /* Prevent Japanese line breaks inside words */
  overflow-wrap: normal;
  line-break: strict;
}
.accent { color: var(--color-accent); }
.accent-soft { 
  background: linear-gradient(to bottom, #D4463E, #F1B7B6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
 }
.body-text {
  color: var(--color-text-strong);
  line-height: 1.9;
  font-size: 14px;
  margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  transition: transform 0.12s ease, background-color 0.15s ease,
    box-shadow 0.15s ease, color 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 10px 20px; font-size: 12px; }
.btn-pill { border-radius: var(--radius-pill); }
.btn .arrow {
  font-family: var(--font-en);
  font-weight: 500;
  transition: transform 0.15s ease;
}
.btn:hover .arrow { transform: translateX(3px); }
.btn:hover .arrow.arrow-down { transform: translateY(3px); }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover { background: var(--color-accent-hover); }

.btn-outline {
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.btn-outline:hover { background: #f7f7f7; }

.btn-outline-pill {
  background: #fff;
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-outline-pill:hover { background: #f7f7f7; }

.btn-outline-on-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-outline-on-dark:hover { background: rgba(255, 255, 255, 0.08); }

/* ==========================================================
   HEADER
   ========================================================== */
.site-header {
  top: 0;
  z-index: 50;
  background: var(--color-bg-soft);
  backdrop-filter: saturate(180%) blur(12px);
}
.header-inner {
  max-width: 1124px;
  margin-inline: auto;
  padding: 18px 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand-mark {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
}
.brand-text {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-en);
}
.header-logo {
  margin: auto 0;
}
.header-logo sup { font-size: 9px; font-weight: 500; }
.brand-sub {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  margin: auto 0 0;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.nav a {
  color: var(--color-text-muted);
  transition: color 0.15s ease;
  position: relative;
  white-space: nowrap;
}
.nav a:hover { color: var(--color-accent); }
.nav a.is-active { color: var(--color-accent); }

/* ==========================================================
   HERO
   ========================================================== */
  
@media (min-width: 961px) {
  .hero-inner {
    position: relative;
  }
  .hero-visual {
    position: absolute;
    top: 50%;
    left: -22%;
    transform: translateY(-50%);
    width: 50vw;
    z-index: 1;
  }
  .tablet-frame {
    max-width: 802px;
    margin-left: 0;
    margin-right: auto;
  }
}

.hero {
  padding-top: 56px;
  padding-bottom: 0;
  overflow: hidden;
  background: var(--color-bg-soft);
}
.hero-inner {
  max-width: 1010px;
  display: grid;
  grid-template-columns: minmax(600px, 1fr) 1.05fr;
  gap: 32px;
  align-items: center;
  min-height: 480px;
}
.hero-copy { padding-block: 40px; }
.hero-title {
  font-size: 52px;
  line-height: 1.32;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin: 0 0 28px;
  color: var(--color-text-strong);
  overflow-wrap: normal;
  line-break: strict;
}
.hero-title .quoted {
  font-family: var(--font-en);
  font-weight: 900;
}
.hero-lead {
  font-size: 14px;
  line-height: 2;
  margin: 0 0 36px;
  font-weight: bold;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Tablet mockup placeholder */
.hero-visual { position: relative; }
.tablet-frame {
  position: relative;
  width: 100%;
  max-width: 802px;
  aspect-ratio: 4 / 3;
  margin-left: auto;
  margin-right: auto;
}
.tablet-screen {
  position: absolute;
  inset: 14px;
  background: linear-gradient(135deg, #fff5f5 0%, #ffe2dc 40%, #ffd1ce 100%);
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  padding: 18px;
}
.tablet-fantia-logo {
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 28px;
  color: var(--color-text-strong);
  text-align: center;
  letter-spacing: 0.08em;
  padding: 6px 0;
}
.tablet-banners {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.tablet-banners .banner {
  font-size: 9px;
  padding: 8px 6px;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
  text-align: center;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.banner.b1 { background: linear-gradient(135deg, #fbb04c, #f77b3b); }
.banner.b2 { background: linear-gradient(135deg, #2a5cdf, #1842b5); }
.banner.b3 { background: linear-gradient(135deg, #c8203a, #7d0b22); }
.banner.b4 { background: linear-gradient(135deg, #f9c84f, #f08a31); }

.tablet-thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.tablet-thumbs span {
  display: block;
  aspect-ratio: 1 / 1.1;
  border-radius: 5px;
  background: linear-gradient(135deg, #ffd0c8, #efb6ad);
}
.tablet-thumbs span:nth-child(2) {
  background: linear-gradient(135deg, #c1d8f4, #6c8fd8);
}
.tablet-thumbs span:nth-child(3) {
  background: linear-gradient(135deg, #f7c6c3, #c47877);
}
.tablet-thumbs span:nth-child(4) {
  background: linear-gradient(135deg, #b6c9e7, #7689b0);
}
.tablet-thumbs span:nth-child(5) {
  background: linear-gradient(135deg, #f2dca3, #c6a26d);
}
.tablet-thumbs span:nth-child(6) {
  background: linear-gradient(135deg, #1e2a4a, #0b1326);
}

/* Tech ticker */
.tech-ticker {
  overflow: hidden;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-soft);
  margin-top: 40px;
}
.ticker-track {
  display: flex;
  gap: 36px;
  padding: 18px 0;
  width: max-content;
  animation: tickerScroll 35s linear infinite;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}
.ticker-track li:nth-child(odd) {
  color: var(--color-accent);
  font-family: var(--font-en);
}
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.sp-index {
  display: none;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  flex-wrap: wrap;
  padding: 18px;
  background-color: #fff;
}

.sp-index a {
  color: var(--color-text-muted);
  transition: color 0.15s ease;
  position: relative;
  white-space: nowrap;
}

.sp-index a:hover {
  color: var(--color-accent);
}

.sp-index a.is-active {
  color: var(--color-accent);
}

/* ==========================================================
   02 MESSAGE
   ========================================================== */
.section-message { background: var(--color-bg-soft); }
.msg-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: start;
}
.msg-body { color: var(--color-text-strong); line-height: 2; font-size: 14px; }
.msg-body p { margin: 0 0 18px; }

/* ==========================================================
   03 OUR SERVICE
   ========================================================== */
@media (min-width: 961px) {
  .service-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 60px;
    align-items: center;
  }
  .service-copy {
    padding-right: 0;
  }
  .service-visual {
    position: relative;
    width: 30vw;
    aspect-ratio: 4 / 3;
    margin-left: auto;
    margin-right: auto;
  }
}
    
.service-grid {
  display: grid;
  grid-template-columns: 520px auto;
  gap: 60px;
  align-items: center;
}
/* ==========================================================
   04 TECHNOLOGY STACK
   ========================================================== */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}
.tech-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px 22px 24px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-card);
}
.tech-card-chips {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.tech-card-head {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 4px;
  align-items: center;
  min-height: 51px;
}
.tech-card-eyebrow {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--color-text-faint);
  margin: 0;
}
.tech-card-title {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  font-family: var(--font-en);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-strong);
  letter-spacing: 0.02em;
}
.tech-card-icon {
  grid-column: 2;
  grid-row: 1 / 3;
  color: var(--color-text-muted);
  display: inline-flex;
}

.tech-card-icon svg {
  width: 51px;
  height: 51px;
  color: #D9D9D9;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip-list li {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
  color: var(--color-text);
  line-height: 1.2;
}
.tech-card-etc {
  margin: 8px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
  line-height: 1.2;
}

/* ==========================================================
   05 DEVELOPMENT CULTURE
   ========================================================== */
.culture-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.culture-card {
  background: #fff;
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
}
.culture-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(220, 26, 34, 0.08);
  color: var(--color-accent);
  display: inline-grid;
  place-items: center;
  margin-bottom: 10px;
}
.culture-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--color-text-faint);
  margin: 0 0 2px;
}
.culture-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text-strong);
}
.culture-body {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.85;
}

/* ==========================================================
   06 WORKING ENVIRONMENT
   ========================================================== */
.env-grid {
  display: grid;
  grid-template-columns: 1fr 0.75fr;
  gap: 24px;
}
.env-card {
  padding: 28px 28px 32px;
  border-radius: var(--radius-md);
  min-height: 240px;
}
.env-card-light {
  background: #fff;
  border: 1px solid var(--color-border);
}
.env-card-dark {
  background: var(--color-dark);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.env-card-dark::after {
  content: "";
  position: absolute;
  inset: -40% -30% auto auto;
  width: 70%;
  aspect-ratio: 1;
  filter: blur(20px);
  pointer-events: none;
}
.env-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--color-text-faint);
  margin: 0 0 12px;
}
.env-card-dark .env-eyebrow { color: rgba(255, 255, 255, 0.55); }
.env-title {
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-strong);
  letter-spacing: 0.04em;
}
.env-card-dark .env-title { color: #fff; }

.env-chip-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.env-chip-list li {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px 14px;
  text-align: center;
  font-size: 12px;
  color: var(--color-text);
  background: #fff;
  font-family: var(--font-en);
  font-weight: 500;
}

.env-defs {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
}
.env-def-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}
.env-def-row dt {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}
.env-def-row dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

/* ==========================================================
   07 OPEN POSITIONS
   ========================================================== */
.positions-list {
  display: flex;
  flex-direction: column;
}
.position-row {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 28px 4px;
  border-top: 1px solid var(--color-border);
}
.position-row:last-child { border-bottom: 1px solid var(--color-border); }
.position-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--color-accent);
  margin: 0 0 6px;
}
.position-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text-strong);
  letter-spacing: 0.04em;
}
.position-body {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.9;
}

/* ==========================================================
   JOIN US CTA
   ========================================================== */
.section-cta { background: var(--color-bg); }
.cta-card {
  background: linear-gradient(51deg, #b6afaf -20%, #332F2F 21%, #4a1f24 100%);
  border-radius: var(--radius-lg);
  padding: 56px 64px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  color: #fff;
  min-height: 240px;
}
.cta-card::after {
  content: "";
  position: absolute;
  right: -10%;
  top: -20%;
  width: 60%;
  height: 120%;
  background: radial-gradient(
    ellipse at top right,
    rgba(220, 26, 34, 0.7) 10%,
    rgba(220, 26, 34, 0) 85%
  );
  filter: blur(30px);
  pointer-events: none;
}
.cta-card > * { position: relative; z-index: 1; }
.cta-copy { display: flex; flex-direction: column; }
.cta-title {
  margin: 16px 0 0;
  font-size: 28px;
  line-height: 1.5;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.04em;
  overflow-wrap: normal;
}
.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 260px;
  align-self: end;
  .btn {
    padding: 8px 26px;
  }
}

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
  background: var(--color-bg-soft);
  padding-top: 60px;
  padding-bottom: 88px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-tagline {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--color-text-faint);
}
.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--color-text);
  margin: 0 0 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 12px;
  color: var(--color-text-faint);
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--color-accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 11px;
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

/* Floating CTA */
.floating-cta {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-cta);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.floating-cta:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
}

/* ==========================================================
   Responsive (simple)
   ========================================================== */
@media (max-width: 960px) {
  :root { --section-py: 72px; }
  .header-inner { padding: 14px 20px; gap: 16px; grid-template-columns: auto auto; }
  .nav { display: none; }

  .sp-index { display: flex; }

  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-title { font-size: 38px; }
  .hero-visual { order: -1; }
  .tablet-frame { transform: none; max-width: 100%; }

  .section-title { font-size: 28px; }
  .msg-grid, .service-grid { grid-template-columns: 1fr; gap: 24px; }

  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .culture-grid { grid-template-columns: repeat(2, 1fr); }
  .env-grid { grid-template-columns: 1fr; }
  .env-chip-list { grid-template-columns: repeat(2, 1fr); }

  .position-row { grid-template-columns: 1fr; gap: 12px; padding: 24px 4px; }
  .cta-card { padding: 36px 28px; grid-template-columns: 1fr; }
  .cta-actions { min-width: 0; }
  .cta-title { font-size: 22px; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 6px; }

  .floating-cta { right: 16px; bottom: 16px; padding: 12px 18px; }
}

@media (max-width: 560px) {
  .tech-grid, .culture-grid { grid-template-columns: 1fr; }
  .env-chip-list { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 32px; }
  .section-title { font-size: 23px; }
  .footer-nav { grid-template-columns: repeat(2, 1fr); }
}
