@charset "UTF-8";

/* ============================================================
   RAP DOJO — Theme 3: Streetwise (High-Contrast Light Mode)
   ============================================================ */

/* Using a heavy, bold font like Archivo Black or similar standard defaults impact */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Inter:wght@400;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --v-space: clamp(90px, 9vw, 120px);
  --accent: #FF3B30; /* Vivid Red-Orange (Supreme-ish) */
  --accent-hover: #D62F25;
  --btn-color: #000000;
  --text-dark: #000000; /* Pitch Black */
  --text-gray: #333333; /* Charcoal */
  --bg-body: #FFFFFF; /* Pure White */
  --bg-white: #FFFFFF;
  --bg-section: #F2F2F2; /* Light Grey */
  --border-color: #000000;
  --font-display: 'Archivo Black', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg-body);
  color: var(--text-dark);
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, figure, ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

p { line-height: 1.6; }

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* --- Layout --- */
.w-container {
  width: min(92%, 1166px);
  margin: auto;
  position: relative;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  height: 80px;
  background-color: var(--bg-white);
  border-bottom: 3px solid #000; /* Heavy border */
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.site a {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--text-dark);
  text-transform: uppercase;
  background: black;
  color: white;
  padding: 4px 10px;
  transform: skew(-5deg);
  display: inline-block;
}

.site a:hover {
  text-decoration: none;
  background: var(--accent);
}

.site .accent {
  color: white; /* Part of the block */
}

/* Navigation */
/* Navigation */
.nav > ul {
  display: flex;
  gap: 32px;
  color: var(--text-dark);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  list-style: none; /* Ensure no bullets */
  margin: 0;
  padding: 0;
  align-items: center; /* Align items vertically */
}

.nav > ul > li {
  white-space: nowrap;
}

.nav li {
  position: relative; /* For dropdown positioning */
}

.nav a {
  text-decoration: none;
  display: block; /* Ensure hit area */
}

.nav a.lang-switch {
  display: inline; /* Keep on same line as text */
}

.nav a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 3px;
}

/* Dropdown Menu */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -20px; /* Slight offset to align better */
  background-color: var(--bg-white);
  border: 3px solid #000;
  min-width: 240px;
  box-shadow: 6px 6px 0px rgba(0,0,0,0.1);
  z-index: 1000;
  padding: 0;
  margin: 0;
  list-style: none;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu li {
  display: block;
  width: 100%;
  margin: 0;
  text-align: left;
}

.dropdown-menu a {
  display: block;
  padding: 12px 20px;
  white-space: nowrap;
  font-size: 14px;
  color: var(--text-dark);
  border-bottom: 1px solid #eee;
}

.dropdown-menu a:hover {
  background-color: var(--bg-section);
  text-decoration: none;
  color: var(--accent);
}

.dropdown-menu li:last-child a {
  border-bottom: none;
}

.dropdown-arrow {
  font-size: 0.6em;
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
}

/* Mobile Nav */
.navbtn {
  display: none;
  padding: 0;
  outline: none;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-dark);
  font-size: 32px;
}

@media (max-width: 767px) {
  .navbtn { display: block; }

  .nav {
    position: fixed;
    inset: 0 -100% 0 100%;
    z-index: 100;
    background-color: var(--accent);
    transition: transform 0.3s;
  }

  .open .nav {
    transform: translate(-100%, 0);
  }

  .nav > ul {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Start from top */
    align-items: flex-start;
    height: 100%;
    gap: 20px; /* Reduced gap */
    color: #fff;
    font-size: 20px; /* Adjusted size */
    font-family: var(--font-display);
    padding-top: 80px; /* Space for close button */
    padding-left: 40px;
    overflow-y: auto; /* Allow scrolling if menu is long */
  }

  /* Mobile Dropdown Handling */
  .dropdown-menu {
    position: static; /* Stack naturally */
    display: block; /* Always show on mobile */
    background: transparent; /* Match parent background */
    border: none;
    box-shadow: none;
    padding: 10px 0;
    min-width: 100%; /* Full width */
    text-align: left;
    padding-left: 20px;
    margin: 10px 0 20px 0;
  }

  .dropdown-menu li {
    margin-bottom: 0;
    width: 100%;
  }

  .dropdown-menu a {
    color: #fff; /* White text on mobile menu */
    font-size: 16px;
    padding: 10px 0;
    border-bottom: none;
  }
  
  .dropdown-menu a:hover {
    background: transparent;
    color: #fff;
    text-decoration: underline;
  }
  
  .dropdown > a {
     /* Label for the group */
     font-weight: 900;
     opacity: 0.9;
  }

  .close-btn {
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    line-height: 1;
  }
}

@media (min-width: 768px) {
  .navbtn { display: none; }
  .close-btn { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  height: 520px;
  background-color: var(--bg-body);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  border-bottom: 3px solid #000;
}

.hero-container {
  display: grid;
  justify-items: left;
  align-content: center;
  height: 100%;
  text-align: left;
}

.hero-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #000;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 24px;
  border-radius: 4px;
}

.hero-badge::before { content: 'WARNING: '; color: var(--accent); margin-right: 4px; }

.hero h1 {
  margin-bottom: 24px;
  font-family: var(--font-display);
  font-size: clamp(38px, 8vw, 84px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.hero h1 .gradient-text {
  color: var(--accent);
  background: none;
  -webkit-text-fill-color: initial;
}

.hero p {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-dark);
  max-width: 600px;
  font-weight: 600;
  border-left: 5px solid var(--accent);
  padding-left: 20px;
}

/* ============================================================
   FEATURE CARDS
   ============================================================ */
.posts {
  padding: var(--v-space) 0;
  background-color: var(--bg-section);
}

.posts-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 25px;
}

@media (max-width: 767px) {
  .posts-container {
    grid-template-columns: 1fr;
  }
}

/* Section heading */
.heading {
  position: absolute;
  top: calc((var(--v-space) + 0.6em) * -0.97);
  font-family: var(--font-display);
  font-size: clamp(60px, 8vw, 100px);
  min-height: 0vw;
  font-weight: 900;
  color: #fff; /* Solid white to cover line */
  -webkit-text-stroke: 1px #000; /* Thicker stroke for impact */
  z-index: 10;
  line-height: 0.8;
}

.heading span {
  position: relative;
  z-index: 11;
  display: block;
  color: #000;
  -webkit-text-stroke: 0;
  font-size: 20px;
  font-family: var(--font-body);
  font-weight: 700;
  background: var(--accent);
  color: white;
  display: inline-block;
  padding: 4px 8px;
  margin-left:5px;
  transform: rotate(-2deg);
  top: -6px; /* Shift up */
}

/* Feature card */
.feature-card {
  display: flex;
  flex-direction: column;
  padding: 40px 32px;
  background-color: var(--bg-white);
  border: 4px solid #000;
  box-shadow: 8px 8px 0px #000;
  transition: transform 0.2s;
  text-decoration: none;
  color: var(--text-dark);
}

.feature-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 12px 12px 0px var(--accent);
  text-decoration: none;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 12px;
  text-transform: uppercase;
  line-height: 1;
}

.tag {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: black;
  border: 2px solid black;
  background: white;
}


.feature-card p {
  color: var(--text-dark);
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 500;
  flex: 1;
}

.card-link {
  display: inline-block;
  margin-top: 24px;
  background: #000;
  color: white;
  padding: 8px 16px;
  font-weight: 700;
  text-transform: uppercase;
}

.card-link::after {
  content: ' >>';
}

.feature-card:hover .card-link {
  background: var(--accent);
}

/* ============================================================
   TOOL PAGE (Entry)
   ============================================================ */
.entry {
  padding: var(--v-space) 0;
  background-color: var(--bg-body);
}

.entry .w-container {
  max-width: 720px;
}

.heading-decoration {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 46px);
  font-weight: 900;
  text-transform: uppercase;
  background: transparent;
  color: #000;
  display: inline-block;
  padding: 0 0 4px 0;
  margin-bottom: 0.5em; /* Add some space below */
}

.heading-decoration::after {
  display: none;
}

.heading-decoration + p {
  margin-top: 1.5em;
  margin-bottom: 3em;
  color: var(--text-dark);
  font-size: 18px;
}

/* Back link */
.back-link {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  color: var(--text-dark);
  font-size: 1rem;
  text-transform: uppercase;
  margin-bottom: 30px;
}

.back-link::before { content: '←'; font-weight: 900; }

.back-link:hover {
  color: var(--accent);
}

/* ============================================================
   FORM STYLES
   ============================================================ */
.entry-container {
  font-size: 16px;
}

.form-group {
  margin-bottom: 30px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 900;
  color: var(--text-dark);
  text-transform: uppercase;
}

.form-group select,
.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 18px;
  border-radius: 0;
  border: 4px solid #000;
  background: #fff;
  color: #000;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  box-shadow: 6px 6px 0px rgba(0,0,0,0.1);
  outline: none;
  box-sizing: border-box;
}

.form-group select:focus,
.form-group input[type="text"]:focus,
.form-group textarea:focus {
  background: #fff;
  box-shadow: 6px 6px 0px var(--accent);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: block;
  width: 100%;
  max-width: 300px;
  padding: 16px;
  box-sizing: border-box;
  background-color: #000;
  color: #fff;
  font-size: 20px;
  text-align: center;
  border: 4px solid #000;
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
  transition: all 0.2s;
}

.btn:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  box-shadow: 5px 5px 0px #000;
  transform: translate(-2px, -2px);
}

.btn-primary {
  @extend .btn; /* Conceptually */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 20px 24px;
  border: 4px solid #000;
  background-color: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  margin-top: 60px !important;

  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 8px 8px 0px #000;
  transition: all 0.2s;
}

.btn-primary:hover:not(:disabled) {
  background-color: #000;
  color: var(--accent);
  box-shadow: 12px 12px 0px var(--text-gray);
  transform: translate(-4px, -4px);
}

.btn-primary:disabled {
  opacity: 1;
  background-color: #ccc;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  border-color: #ccc;
}

/* ============================================================
   LOADING & OUTPUT
   ============================================================ */
.loading {
  display: none;
  text-align: center;
  padding: 40px 0;
}

.loading.active {
  display: block;
}

.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 6px solid #000;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-bottom: 20px;
}

.progress-wrapper {
  width: 100%;
  max-width: 400px;
  background-color: #fff;
  border: 4px solid #000;
  height: 30px;
  margin: 0 auto 20px;
  position: relative;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
}

.progress-bar {
  width: 0%;
  height: 100%;
  background-color: var(--accent);
  transition: width 0.2s linear;
}

.wait-message {
  font-size: 0.9em;
  color: #666;
  font-weight: 700;
  margin-top: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.output-content {
  margin-top: 40px;
  padding: 30px;
  background-color: #000;
  color: #fff;
  border: 4px solid #000;
  white-space: pre-wrap;
  font-size: 18px;
  line-height: 1.6;
  font-weight: 600;
  display: none;
  box-shadow: 10px 10px 0px var(--accent);
}

.output-content.visible {
  display: block;
}

/* ============================================================
   NEWS / お知らせ
   ============================================================ */
.news {
  padding: var(--v-space) 0;
  background-color: var(--bg-body);
  border-top: 3px solid #000;
}

.news-list {
  margin-top: 16px;
  border-top: 1px solid #ddd;
}

.news-item {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid #ddd;
}

.news-date {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.news-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.15s;
}

.news-text a {
  color: var(--text-dark);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  transition: opacity 0.15s;
}

.news-text a:hover {
  opacity: 0.6;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 80px 0;
  background-color: #000;
  color: #fff;
  font-size: 14px;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: auto;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
  .hero { height: auto; padding: 100px 0; }

  .posts-container {
    grid-template-columns: 1fr;
  }
}
