/* ================================================
 *  DALTONMARTIN — Global Stylesheet
 * ================================================ */

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: #111;
  background: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Header ── */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 80px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo {
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-decoration: none;
  color: #111;
}

nav {
  display: flex;
  gap: 32px;
}

nav a {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: #555;
  position: relative;
  transition: color 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #111;
  transition: width 0.3s ease;
}

nav a:hover {
  color: #111;
}

nav a:hover::after {
  width: 100%;
}

/* ── Mobile Menu Toggle ── */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: #111;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ── Mobile Nav Overlay ── */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav a {
  font-size: 1.2rem;
  letter-spacing: 0.15em;
  text-decoration: none;
  color: #111;
  font-weight: 500;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding-top: 64px;
  padding-left: max(24px, calc((100vw - 1400px) / 2));
  padding-right: max(24px, calc((100vw - 1400px) / 2));
}

.hero-text {
  padding-left: clamp(0px, 4vw, 60px);
  padding-right: 40px;
}

.hero-label {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: #999;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.05;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.4s;
}

.hero-sub {
  font-size: clamp(0.9rem, 1.6vw, 1.15rem);
  color: #555;
  line-height: 1.9;
  margin-top: 28px;
  max-width: 420px;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.6s;
}

/* ── Hero Event Link ── */
.hero-event-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: #111;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  padding-bottom: 4px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.hero-event-link:hover {
  color: #555;
  border-color: rgba(0, 0, 0, 0.5);
}

.hero-event-label {
  font-weight: 600;
}

.hero-event-meta {
  color: #888;
  font-weight: 400;
}

.hero-event-arrow {
  transition: transform 0.2s ease;
}

.hero-event-link:hover .hero-event-arrow {
  transform: translateX(4px);
}

.hero-image {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  padding-right: clamp(16px, 4vw, 60px);
}

.hero-image img {
  max-height: 82vh;
  max-width: 85%;
  object-fit: contain;
  mix-blend-mode: multiply;
  opacity: 0;
  transform: translateX(40px);
  animation: fadeLeft 1s ease forwards;
  animation-delay: 0.5s;
}

/* ── Scroll Hint ── */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: clamp(24px, 8vw, 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 1.2s;
}

.scroll-hint span {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: #bbb;
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: #ccc;
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 1px;
  height: 100%;
  background: #111;
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0%   { top: -100%; }
  100% { top: 100%; }
}

/* ── Sections (common) ── */
.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: #999;
  margin-bottom: 16px;
}

.section-heading {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.3;
}

.section-line {
  width: 40px;
  height: 1px;
  background: #111;
  margin: 32px 0;
}

/* ── About ── */
.about {
  padding: 120px clamp(24px, 8vw, 120px);
  background: #fff;
}

.about-inner {
  max-width: 960px;
  margin: 0 auto;
}

.about-text {
  font-size: 1rem;
  line-height: 2.1;
  color: #333;
  max-width: 640px;
}

.about-text p + p {
  margin-top: 20px;
}

/* ── Vehicle ── */
.vehicle {
  padding: 120px clamp(24px, 8vw, 120px);
  background: #f5f5f5;
}

.vehicle-header {
  max-width: 1200px;
  margin: 0 auto 56px;
}

.vehicle-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.vehicle-card {
  background: #fff;
  text-decoration: none;
  color: #111;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.vehicle-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.vehicle-card-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vehicle-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
  transition: transform 0.6s ease;
}

.vehicle-card:hover .vehicle-card-image img {
  transform: scale(1.05);
}

.vehicle-card-body {
  padding: 28px 28px 32px;
}

.vehicle-card-gen {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: #999;
  margin-bottom: 8px;
}

.vehicle-card-name {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.vehicle-card-desc {
  font-size: 0.8rem;
  color: #777;
  line-height: 1.8;
  margin-bottom: 20px;
}

.vehicle-card-link {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: #111;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vehicle-card-link::after {
  content: '\2192';
  transition: transform 0.3s ease;
}

.vehicle-card:hover .vehicle-card-link::after {
  transform: translateX(4px);
}

/* ── News ── */
.news {
  padding: 120px clamp(24px, 8vw, 120px);
  background: #111;
  color: #fff;
}

.news-inner {
  max-width: 960px;
  margin: 0 auto;
}

.news .section-label {
  color: #666;
}

.news .section-heading {
  color: #fff;
}

.news .section-line {
  background: #333;
}

.news-list {
  list-style: none;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.news-item {
  background: #1a1a1a;
  transition: background 0.2s;
}

.news-item:hover {
  background: #222;
}

.news-item a {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
  text-decoration: none;
  color: #fff;
}

.news-date {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #666;
  flex-shrink: 0;
  min-width: 100px;
}

.news-tag {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 4px 12px;
  border: 1px solid #444;
  color: #aaa;
  flex-shrink: 0;
}

.news-title {
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
}

.news-item-arrow {
  font-size: 0.8rem;
  color: #555;
  flex-shrink: 0;
  transition: transform 0.2s, color 0.2s;
}

.news-item:hover .news-item-arrow {
  transform: translateX(4px);
  color: #fff;
}

/* ── Team ── */
.team {
  padding: 120px clamp(24px, 8vw, 120px);
  background: #fff;
}

.team-inner {
  max-width: 960px;
  margin: 0 auto;
}

.team-intro {
  font-size: 1rem;
  line-height: 2.1;
  color: #333;
  max-width: 640px;
  margin-bottom: 48px;
}

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

.role-card {
  border: 1px solid #e0e0e0;
  padding: 32px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.role-card:hover {
  border-color: #111;
  transform: translateY(-4px);
}

.role-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.role-desc {
  font-size: 0.8rem;
  color: #777;
  line-height: 1.8;
}

/* Team Header */
.team-header {
  text-align: center;
  margin-bottom: 24px;
}

.team-total-label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: #999;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.team-total-number {
  font-size: 4rem;
  font-weight: 900;
  color: #111;
}

.team-total-unit {
  font-size: 1.4rem;
  margin-left: 8px;
  font-weight: 600;
  vertical-align: middle;
}

.team-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #ddd 20%, #ddd 80%, transparent);
  margin: 40px 0 48px;
}

/* Team Cards Grid */
.team-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.team-card {
  border: 1px solid #e0e0e0;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.team-card:hover {
  border-color: #111;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111;
  line-height: 1.6;
  margin-bottom: 10px;
}

.card-desc {
  font-size: 0.78rem;
  color: #777;
  line-height: 1.8;
  margin-bottom: 20px;
  flex: 1;
}

.card-count {
  font-size: 2rem;
  font-weight: 900;
  color: #111;
  text-align: right;
  line-height: 1;
  position: relative;
}

.card-unit {
  font-size: 0.75rem;
  font-weight: 600;
  color: #777;
  vertical-align: bottom;
  margin-left: 2px;
  line-height: 1;
}

.team-note {
  font-size: 0.75rem;
  color: #999;
  text-align: center;
  margin-top: 12px;
}

/* ── Footer ── */
footer {
  background: #111;
  color: #fff;
  padding: 60px clamp(24px, 8vw, 120px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left .logo {
  color: #fff;
  display: block;
  margin-bottom: 12px;
}

.footer-left .copyright {
  font-size: 0.75rem;
  color: #666;
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: #888;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #fff;
}

/* ── Animations ── */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Ultrawide cap ── */
@media (min-width: 1600px) {
  .about, .vehicle, .news, .team {
    padding-left: calc((100vw - 1400px) / 2);
    padding-right: calc((100vw - 1400px) / 2);
  }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .mobile-nav {
    display: flex;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 64px;
    padding-bottom: 0;
    align-items: stretch;
  }

  /* First screen: title centered on viewport */
  .hero-text {
    padding: 0 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    order: 1;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .hero-label {
    font-size: 0.55rem;
    margin-bottom: 16px;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
    font-size: 0.85rem;
    text-align: center;
  }

  /* Second screen: image appears on scroll */
  .hero-image {
    display: none;
  }

  .hero-image img {
    max-height: 55vh;
    max-width: 90%;
  }

  .scroll-hint {
    display: none;
  }

  /* Sections */
  .about, .vehicle, .news, .team {
    padding: 80px 24px;
  }

  .section-heading {
    font-size: 1.6rem;
  }

  .vehicle-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .vehicle-card {
    flex-direction: row;
    align-items: stretch;
  }

  .vehicle-card-image {
    aspect-ratio: 1 / 1;
    width: 120px;
    min-width: 120px;
  }

  .vehicle-card-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .vehicle-card-name {
    font-size: 1.05rem;
    margin-bottom: 6px;
  }

  .vehicle-card-desc {
    font-size: 0.75rem;
    margin-bottom: 10px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .vehicle-card-gen {
    font-size: 0.6rem;
    margin-bottom: 4px;
  }

  .news-item a {
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 20px 20px;
  }

  .news-title {
    width: 100%;
  }

  .news-item-arrow {
    display: none;
  }

  .role-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .role-card {
    padding: 20px;
  }

  .role-title {
    font-size: 0.85rem;
  }

  .role-desc {
    font-size: 0.75rem;
  }

  footer {
    flex-direction: column;
    gap: 24px;
    text-align: center;
    padding: 40px 24px;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ── Small mobile (SE, etc) ── */
@media (max-width: 375px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-image img {
    max-height: 35vh;
  }

  /* Team section mobile adjustments */
  .team-total-number {
    font-size: 2.8rem;
  }

  .team-cards {
    grid-template-columns: 1fr;
  }

  .team-card {
    padding: 24px 20px;
  }
}
