/* =============================================
   Fonts
   =========================================== */

   /*
    .cinzel-<uniquifier> {
      font-family: "Cinzel", serif;
      font-optical-sizing: auto;
      font-weight: <weight>;
      font-style: normal;
    }

    .noto-sans-jp-<uniquifier> {
      font-family: "Noto Sans JP", sans-serif;
      font-optical-sizing: auto;
      font-weight: <weight>;
      font-style: normal;
    }
  */

/* =============================================
   Base styles
   =========================================== */

html {
  font-size: 1.2em;
  line-height: 1.4;
  font-family: "Noto Sans JP", sans-serif;
  height: 100%;
}

body { 
    background-image: url('../img/bg.jpg');
    background-size: cover;
    background-position: top center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    color: #ffffff;
}

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ffffff;
  margin: 1em 0;
  padding: 0;
}

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

textarea {
  resize: vertical;
}

.hidden,
[hidden] {
  display: none !important;
}

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

.invisible {
  visibility: hidden;
}

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

a {
  color: #ffffff;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Cinzel", serif;
  color: #ffffff;
  margin: 0;
  line-height: 1;
}

h1 { font-size: 3.96rem; }   /* 3.6rem * 1.10 */
h2 { font-size: 3.135rem; }  /* 2.85rem * 1.10 */
h3 { font-size: 2.475rem; }  /* 2.25rem * 1.10 */
h4 { font-size: 2.0625rem; } /* 1.875rem * 1.10 */
h5 { font-size: 1.65rem; }   /* 1.5rem * 1.10 */
h6 { font-size: 1.4025rem; } /* 1.275rem * 1.10 */

header .container-fluid {
  align-items: center !important;
}

header h1 {
  font-size: 2em;
}

header h1 img {
  height: 2em;
  width: auto;
  display: block;
}

header h1 a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
  display: inline-block;
  line-height: 1;
}

header h1 a:hover {
  opacity: 0.7;
  cursor: pointer;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.3s ease;
  z-index: 1001;
  align-items: center;
  gap: 0.5rem;
  line-height: 1;
}

.mobile-menu-toggle .menu-label {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  font-family: "Cinzel", serif;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
  color: #ffffff;
  outline: none;
}

.mobile-menu-toggle.active i:before {
  content: "\f00d"; /* Font Awesome X icon */
}

header nav a,
header nav a:visited {
  color: #ffffff !important;
  text-decoration: none;
  font-size: 1.25rem !important;
}

header nav a:hover,
header nav a:focus,
header nav a:active {
  color: #ffffff !important;
  text-decoration: underline;
}

/* Mobile Navigation Styles */
@media (max-width: 1220px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  header nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: rgba(31, 10, 5, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 5rem 2rem 2rem;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
  }
  
  header nav.active {
    right: 0;
  }
  
  header nav ul {
    flex-direction: column;
    gap: 0;
  }
  
  header nav .nav-item {
    width: 100%;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transform: translateX(50px);
    opacity: 0;
    transition: all 0.4s ease;
  }
  
  header nav.active .nav-item {
    transform: translateX(0);
    opacity: 1;
  }
  
  header nav.active .nav-item:nth-child(1) { transition-delay: 0.1s; }
  header nav.active .nav-item:nth-child(2) { transition-delay: 0.15s; }
  header nav.active .nav-item:nth-child(3) { transition-delay: 0.2s; }
  header nav.active .nav-item:nth-child(4) { transition-delay: 0.25s; }
  header nav.active .nav-item:nth-child(5) { transition-delay: 0.3s; }
  
  header nav .nav-link {
    display: block;
    padding: 1.2rem 1rem;
    color: #f5f5f5 !important;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }
  
  header nav .nav-link:hover,
  header nav .nav-link:focus {
    background: rgba(255, 255, 255, 0.15);
    padding-left: 1.5rem;
    color: #ffffff !important;
    text-decoration: none;
  }
  
  /* Overlay */
  body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 999;
  }
  
  body.menu-open::after {
    opacity: 1;
    visibility: visible;
  }
  
  body.menu-open {
    overflow: hidden;
  }
}

img { 
    max-width: 100%;
    height: auto;
}

footer { 
  margin-top: auto;
  padding-top: 15rem;
  background-size: cover;
}

.footer-bottom { 
    margin-top: 1rem;
    padding-top: 1rem;
    color: #ffffff;
}

footer nav a,
footer nav a:visited {
  color: #ffffff !important;
  text-decoration: none;
}

footer nav a:hover,
footer nav a:focus,
footer nav a:active {
  color: #ffffff !important;
  text-decoration: underline;
}

/* Banner Section */
.banner-section {
  position: relative;
  min-height: 600px;
}

.banner-section .container-fluid {
  position: relative;
  height: 600px;
}

/* Scale banner height down on smaller screens */
@media (max-width: 1400px) {
  .banner-section { min-height: 480px; }
  .banner-section .container-fluid { height: 480px; }
}

/* Scale banner height down on smaller screens */
@media (max-width: 1200px) {
  .banner-section { min-height: 380px; }
  .banner-section .container-fluid { height: 380px; }
}

@media (max-width: 768px) {
    .banner-section { min-height: 330px; }
    .banner-section .container-fluid { height: 330px; }
}

@media (max-width: 576px) {
  .banner-section { min-height: 290px; }
  .banner-section .container-fluid { height: 290px; }
}

@media (max-width: 420px) {
  .banner-section { min-height: 240px; }
  .banner-section .container-fluid { height: 240px; }
}

.banner-section img {
  position: absolute;
  cursor: pointer;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  max-width: 340px;
  width: auto;
  height: auto;
  transition: transform .18s ease, width .18s ease, max-width .18s ease;
}

.banner-section img.large { max-width: 380px; }
.banner-section img { max-width: 360px; }

@media (max-width: 1400px) {
  .banner-section img { max-width: 259px; }
  .banner-section img.large { max-width: 280px; }
}

/* Scaling points for smaller screens */
@media (max-width: 1200px) {
  .banner-section img { max-width: 258px; } /* ~10% larger than 234px */
  .banner-section img.large { max-width: 270px; } /* ~10% larger than 288px */
}

@media (max-width: 768px) {
  /* switch to viewport-based sizing for better fluidity on tablets (slightly larger) */
  .banner-section img { max-width: 210px; width: 34vw; }
  .banner-section img.large { max-width: 230px; width: 38vw; }
}

@media (max-width: 576px) {
  /* phone */
  .banner-section img { max-width: 140px; width: 40vw; }
  .banner-section img.large { max-width: 155px; width: 42vw; }
}


/* Fallback static layout when animation is disabled */
.banner-section.static-layout img {
  position: relative;
  display: inline-block;
  margin: 10px;
  transform: none !important;
  left: auto !important;
  top: auto !important;
}

.banner-section.static-layout .container-fluid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  height: auto;
  min-height: 550px;
}

/* Button Grid Section */
.row.g-4 a {
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.row.g-4 a:hover {
  transform: translateY(-10px);
  filter: brightness(1.1);
}

.row.g-4 a:hover img {
  box-shadow: 0 15px 30px rgba(255, 255, 255, 0.3);
}

.row.g-4 a img {
  transition: box-shadow 0.3s ease;
  border-radius: 4px;
}

@media (max-width: 767px) {
  .row.g-4 {
    row-gap: 2rem !important;
  }
}

section.border-top-bottom {
  border-top: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Team Slider Section */
.team-slider-section h2 {
  text-align: left;
  margin-bottom: 2rem;
}

.team-slider {
  position: relative;
  min-height: 400px;
}

.team-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  pointer-events: none;
}

.team-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  position: relative;
}

.team-content {
  margin-bottom: 1.5rem;
}

.team-content p {
  margin: 0;
  line-height: 1.8;
}

.team-full {
  margin-top: 1rem;
}

.team-actions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.read-more-btn {
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s ease;
  display: inline-block;
  width: fit-content;
}

.read-more-btn:hover {
  opacity: 0.7;
}

.slider-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slider-btn {
  background: none;
  border: none;
  padding: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.slider-btn img {
  width: 35px;
  height: 35px;
  display: block;
}

.slider-counter {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 500;
  min-width: 50px;
  text-align: center;
}

@media (max-width: 768px) {
  .team-slider {
    min-height: 500px;
  }
  
  .slider-nav {
    justify-content: center;
  }
}


/* Capabilities Section */
.capabilities-section {
  color: #ffffff;
}

.capabilities-section h2 {
  margin-bottom: 2rem;
}

.capability-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid #ffffff;
  font-size: 1.3225em;
  font-family: "Cinzel", serif;
}

.capabilities-section .capability-item:first-of-type {
  border-top: 1px solid #ffffff;
}

.capability-name {
  font-weight: 500;
}

.capability-number {
  font-weight: 300;
  opacity: 0.7;
}
/* Marquee Section */
.marquee-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  height: 180px;
  margin: 0;
  background: transparent;
  margin: 75px 0;
}

@media screen and (max-width: 768px) {
  .marquee-section {
    margin: 25px 0;
  }
}

.marquee-container {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.marquee-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee 60s linear infinite;
}

.marquee-text {
  color: #ffffff;
  font-family: "Cinzel", serif;
  font-size: 10rem;
  font-weight: 400;
  text-transform: uppercase;
  margin-right: 4rem;
  display: inline-block;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-33.333%);
  }
}

.ferrari-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
}

.ferrari-overlay img {
  max-width: 250px;
  width: 50vw;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .marquee-section {
    height: 140px;
  }
  
  .marquee-text {
    font-size: 3rem;
    margin-right: 3rem;
  }
  
  .ferrari-overlay img {
    max-width: 180px;
  }
}

@media (max-width: 576px) {
  .marquee-section {
    height: 100px;
  }
  
  .marquee-text {
    font-size: 2rem;
    margin-right: 2rem;
  }
  
  .ferrari-overlay img {
    max-width: 120px;
  }
}}
