:root {
  --primary-yellow: #ff6d00;
  --bg-black: #333333;
  --text-black: #ffffff;
  --text-white: #ffffff;
  --accent-orange: #ff6d00;
  --font-main: "Inter", "Noto Sans JP", sans-serif;
  --radius-sm: 4px;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-black);
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('./gray.webp');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: var(--text-white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

/* Typography */
h1,
h2,
h3 {
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-orange {
  color: var(--accent-orange);
}

/* Improve visibility of accented text inside colored cards */
.story-card .text-orange,
.value-item .text-orange,
.usecase-item .text-orange,
.timeline-step .text-orange {
  color: #000000;
  background: #ffffff;
  padding: 2px 6px;
  margin: 0 2px;
}

/* Masthead */
.masthead {
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: linear-gradient(-45deg, rgba(0, 0, 0, 0.95), rgba(40, 40, 40, 0.8), rgba(0, 0, 0, 0.95));
  background-size: 300% 300%;
  animation: headerShimmer 12s ease infinite;
  backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 2px solid var(--primary-yellow);
  min-height: 80px;
}

@keyframes headerShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes swayShadow {
  0%, 100% { box-shadow: 0 4px 15px rgba(255, 109, 0, 0.2); }
  50% { box-shadow: 0 8px 25px rgba(255, 109, 0, 0.4); }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}

.brand-mark {
  height: 36px;
  display: block;
}

.masthead-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 700;
  font-size: 0.9rem;
  height: 100%;
}

.masthead-nav a {
  display: flex;
  align-items: center;
  line-height: 1;
  /* Reset line height to avoid offset */
}

.masthead-link {
  background: var(--primary-yellow);
  color: var(--text-black);
  padding: 8px 20px;
  border-radius: 2px;
}

/* Hero */
.hero {
  padding: 40px 40px;
  min-height: 350px;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  /* Slightly brighter */
  position: relative;
  overflow: hidden;
}

/* Vertical Side Labels (Inspired by Sample) */
.hero::after {
  content: "PROGRESS THROUGH DIRECTION";
  position: absolute;
  right: 15px;
  /* Moved to right */
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  /* Rotate for right side */
  font-size: 1.1rem;
  /* Larger */
  font-weight: 900;
  color: var(--primary-yellow);
  letter-spacing: 0.4em;
  white-space: nowrap;
  z-index: 2;
  animation: heroFloat 8s ease-in-out infinite;
}

@keyframes heroFloat {

  0%,
  100% {
    transform: translateY(-50%) rotate(90deg);
  }

  50% {
    transform: translateY(-65%) rotate(90deg);
  }
}

.hero::before {
  content: "D+";
  position: absolute;
  top: -10px;
  right: -5px;
  font-size: 15vw;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.08);
  line-height: 1;
  pointer-events: none;
  z-index: 1;
}

.hero-copy {
  max-width: 1000px;
  z-index: 10;
}

.kicker {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-black);
  background: var(--primary-yellow);
  display: inline-block;
  padding: 5px 15px;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transform: rotate(-2deg);
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  margin-bottom: 25px;
  line-height: 1;
}

.hero-line {
  display: block;
}

.hero-line--accent {
  color: var(--primary-yellow);
}

.lead {
  font-size: 1.25rem;
  max-width: 650px;
  margin-bottom: 50px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-left: 4px solid var(--primary-yellow);
}

.hero-actions {
  display: flex;
  gap: 20px;
}

.button {
  padding: 20px 50px;
  font-weight: 900;
  font-size: 1.1rem;
  border-radius: 0;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.button:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.button-primary {
  background: var(--primary-yellow);
  color: var(--text-black);
}

.button-primary:hover {
  background: #fff;
}

.button-ghost {
  border: 3px solid var(--text-white);
  color: var(--text-white);
}

.button-ghost:hover {
  background: var(--text-white);
  color: var(--bg-black);
}

/* Ticker */
.ticker {
  background: var(--primary-yellow);
  color: var(--text-black);
  padding: 20px 0;
  overflow: hidden;
  white-space: nowrap;
  font-weight: 900;
  font-size: 2rem;
  text-transform: uppercase;
  border-top: 4px solid var(--bg-black);
  border-bottom: 4px solid var(--bg-black);
}

.ticker-track {
  display: inline-block;
  animation: ticker 30s linear infinite;
}

.ticker-track span {
  display: inline-block;
  padding: 0 30px;
}

@keyframes ticker {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

/* Sections */
.section {
  padding: 100px 40px;
}

.section-heading {
  margin-bottom: 60px;
}

.section-label {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-yellow);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 15px;
  display: block;
}

.section h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

/* Cards (The "DATEUMA" Style) */
.story-grid,
.value-grid,
.usecase-list,
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
}

.story-card,
.value-item,
.usecase-item,
.timeline-step {
  background: var(--primary-yellow);
  color: var(--text-black);
  padding: 60px 40px 40px;
  position: relative;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.story-card:hover,
.value-item:hover,
.usecase-item:hover,
.timeline-step:hover {
  transform: translateY(-10px) rotate(1deg);
}

/* Corner Fold Effect */
.story-card::after,
.value-item::after,
.usecase-item::after,
.timeline-step::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 60px 60px;
  border-color: transparent transparent var(--bg-black) transparent;
  transition: border-width 0.3s;
}

.story-card:hover::after,
.value-item:hover::after,
.usecase-item:hover::after,
.timeline-step:hover::after {
  border-width: 0 0 80px 80px;
}

.story-card::before,
.value-item::before,
.usecase-item::before,
.timeline-step::before {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, transparent 50%, rgba(0, 0, 0, 0.2) 50%);
  pointer-events: none;
  z-index: 5;
  transition: width 0.3s, height 0.3s;
}

.story-card:hover::before,
.value-item:hover::before,
.usecase-item:hover::before,
.timeline-step:hover::before {
  width: 80px;
  height: 80px;
}

/* Card Content Labels */
.story-num,
.value-item span,
.usecase-item span,
.timeline-step span {
  font-size: 0.85rem;
  font-weight: 900;
  background: var(--bg-black);
  color: var(--primary-yellow);
  padding: 6px 12px;
  position: absolute;
  top: 0;
  left: 0;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.story-card h3,
.timeline-step h3,
.value-item h3,
.member-card h3 {
  font-size: 2.2rem;
  margin-bottom: 8px;
  /* Reduced from 20px */
  line-height: 1;
  text-align: center;
  /* Center the h3 */
}

.story-card p,
.value-item p,
.usecase-item p,
.timeline-step p {
  font-weight: 700;
  font-size: 1rem;
  /* Slightly smaller to fit tighter */
  line-height: 1.2;
  /* Tighter line height */
}

/* Related Strip */
.related-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-black);
  border-top: 10px solid var(--primary-yellow);
  border-bottom: 10px solid var(--primary-yellow);
}

.related-visual {
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('./gray.webp');
  background-size: cover;
  background-position: center;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.related-visual::after {
  content: "CONNECTION";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--primary-yellow);
  letter-spacing: 0.3em;
}

.related-logo-stack {
  display: flex;
  gap: 30px;
  background: var(--primary-yellow);
  padding: 40px;
  transform: rotate(-3deg);
}

.related-logo-stack img {
  height: 100px;
}

.related-copy {
  padding: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 10px solid var(--primary-yellow);
}

.related-copy h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 20px;
  line-height: 1.1;
  font-weight: 900;
}

/* Team Section */
.member-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}

.member-card {
  text-align: center;
}

.member-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border: 4px solid var(--primary-yellow);
  margin-bottom: 20px;
  filter: grayscale(1);
  transition: filter 0.3s;
}

.member-card:hover img {
  filter: grayscale(0);
}

.role {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary-yellow);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.member-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.member-card p {
  font-size: 0.9rem;
  opacity: 0.8;
  text-align: left;
}

/* CTA Section */
.cta-section {
  background: var(--primary-yellow);
  color: var(--text-black);
  padding: 100px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 60px;
  border-top: 15px solid var(--bg-black);
}

.cta-section h2 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
}

.cta-copy {
  max-width: 600px;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.4;
}

.cta-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 280px;
}

.cta-links .button-ghost {
  border: 3px solid #ffffff;
  color: #ffffff;
  font-weight: 900;
}

.cta-links .button-ghost:hover {
  background: #ffffff;
  color: #000000;
}

/* Animations (Scroll Reveal) */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reveal Delays */
.is-visible[data-delay] {
  transition-delay: var(--delay);
}

/* Responsive */
@media (max-width: 1024px) {
  .related-strip {
    grid-template-columns: 1fr;
  }

  .related-copy {
    padding: 40px;
  }

  .cta-section {
    flex-direction: column;
    text-align: center;
  }

  .cta-links {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .masthead {
    padding: 10px 20px;
    flex-direction: column;
    gap: 10px;
    min-height: auto;
  }

  .masthead-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }

  .hero {
    padding: 40px 20px;
    min-height: 300px;
    text-align: center;
  }

  /* Ensure vertical label is visible on mobile but smaller */
  .hero::after {
    display: block;
    right: 5px;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
  }

  .hero::before {
    font-size: 40vw;
    top: 0;
    right: -10vw;
  }

  .section {
    padding: 40px 20px;
  }

  .section-heading h2 {
    font-size: 2rem;
  }

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

  .story-grid,
  .value-grid,
  .usecase-list {
    grid-template-columns: 1fr;
  }

  .related-logo-stack {
    transform: rotate(0);
    padding: 20px;
    flex-direction: column;
    align-items: center;
  }

  .related-logo-stack img {
    height: 80px;
  }

  .related-copy {
    padding: 40px 20px;
    border-left: none;
    border-top: 6px solid var(--primary-yellow);
    text-align: center;
  }

  .related-copy h2 {
    font-size: 2.2rem;
  }
}

/* PC Specific Refinements */
@media (min-width: 1025px) {
  .story-card {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  }

  .story-card:hover {
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: 15px 15px 0 rgba(0, 0, 0, 0.3);
    z-index: 20;
  }

  .button {
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  }

  .button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }

  .hero::after {
    letter-spacing: 0.6em;
    /* More spaced out on PC */
    transition: letter-spacing 0.5s ease;
  }

  .hero:hover::after {
    letter-spacing: 0.8em;
  }

  /* Ensure breaks are visible as requested */
  .section-heading h2 br {
    display: block;
  }

  /* Re-enable breaks only where explicitly needed or keep it clean */
  .section-heading h2 {
    max-width: 900px;
    margin-left: 0;
    margin-right: auto;
    text-align: left;
  }
}