/* ============================================================
   IRO Creative Studio — engines.css
   AI Engines product page styles.
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --black:    #000000;
  --surface:  #0D0D0D;
  --surface2: #131313;
  --border:   rgba(255,255,255,0.065);
  --border-md:rgba(255,255,255,0.11);
  --orange:   #E8663C;
  --orange-lo: rgba(232,102,60,0.1);
  --orange-bd: rgba(232,102,60,0.35);
  --white:    #FFFFFF;
  --text:     #FFFFFF;
  --text-dim: #FFFFFF;
  --text-faint:#FFFFFF;
  --font-d: 'Sora', sans-serif;
  --font-b: 'Space Grotesk', sans-serif;
}

html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--text);
  font-family: var(--font-b);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── NAV ─── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 56px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
}
.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 5px;
  text-decoration: none;
}
.nav-logo-iro {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 17px;
  color: var(--white);
  letter-spacing: -0.3px;
}
.nav-logo-kanji {
  font-size: 13px;
  color: var(--orange);
}
.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-cta {
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  background: transparent;
  border: 1px solid var(--border-md);
  border-radius: 8px;
  padding: 9px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.nav-cta:hover { border-color: rgba(255,255,255,0.35); }

/* ─── HERO ─── */
.hero {
  text-align: center;
  padding: 100px 56px 88px;
  border-bottom: 1px solid var(--border);
  background: url('../assets/images/engine-bg.png') top center/cover no-repeat;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 24px;
}
.hero h1 {
  font-family: var(--font-d);
  font-size: clamp(38px, 5vw, 66px);
  font-weight: 800;
  letter-spacing: -2.5px;
  line-height: 1.04;
  color: var(--white);
  margin-bottom: 22px;
}
.hero-desc {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-dim);
  max-width: 480px;
  margin: 0 auto 56px;
}
.hero-stats {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.hero-stat {
  padding: 20px 40px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.hero-stat:last-child { border-right: none; }
.hero-stat-n {
  display: block;
  font-family: var(--font-d);
  font-size: 30px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -1px;
  line-height: 1;
}
.hero-stat-n.accent { color: var(--orange); }
.hero-stat-l {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  margin-top: 5px;
}

/* ─── SHARED SECTION ─── */
.section-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: center;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-d);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--white);
  text-align: center;
  margin-bottom: 52px;
}
.divider { height: 1px; background: var(--border); }

/* ─── ENGINE CARDS ─── */
.engines-section {
  padding: 72px 56px;
  border-bottom: 1px solid var(--border);
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.engine-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.engine-card:hover {
  border-color: var(--orange-bd);
  box-shadow: 0 0 0 1px var(--orange-lo), 0 8px 40px rgba(232,102,60,0.08);
}
.engine-card.featured {
  border-color: var(--orange-bd);
}
.engine-card.featured:hover {
  border-color: var(--orange);
  box-shadow: 0 0 0 1px rgba(232,102,60,0.25), 0 8px 48px rgba(232,102,60,0.14);
}
.engine-card.selected {
  border-color: var(--orange-bd) !important;
  box-shadow: 0 0 0 1px var(--orange-lo) !important;
}
.engine-card.featured.selected {
  border-color: var(--orange) !important;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.card-num {
  font-family: var(--font-b);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}
.card-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  background: var(--orange-lo);
  border: 1px solid var(--orange-bd);
  border-radius: 20px;
  padding: 3px 9px;
}
.card-name {
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 5px;
}
.card-tagline {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.card-desc {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.card-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 24px;
  flex: 1;
}
.card-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  line-height: 1.35;
}
.check-reg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}
.check-feat {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

/* All cards get the same orange button */
.card-btn {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border: 1px solid var(--orange);
  background: var(--orange);
  color: var(--white);
}
.card-btn:hover {
  background: transparent;
  color: var(--orange);
  box-shadow: 0 0 20px rgba(232,102,60,0.18);
}
.card-btn.active {
  background: transparent;
  color: var(--orange);
}

/* ─── RESEARCH TABLE ─── */
.table-section {
  padding: 80px 56px;
  border-bottom: 1px solid var(--border);
}

.table-wrap {
  position: relative;
}
.table-extra-rows {
  display: none;
}
.table-extra-rows.open {
  display: table-row-group;
}
.table-gradient {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 180px;
  background: linear-gradient(to bottom, transparent 0%, #000000 100%);
  pointer-events: none;
  border-radius: 0 0 14px 14px;
  transition: opacity 0.4s;
}
.table-gradient.hidden { opacity: 0; pointer-events: none; }
.see-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  background: transparent;
  border: 1px solid var(--border-md);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.see-more-btn:hover { border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.03); }
.see-more-btn svg { transition: transform 0.3s; }
.see-more-btn.open svg { transform: rotate(180deg); }
.table-intro {
  margin-bottom: 64px;
  display: flex;
  align-items: center;
  gap: 56px;
}
.table-intro-left { flex-shrink: 0; }
.table-intro-num {
  display: block;
  font-family: var(--font-d);
  font-size: clamp(72px, 10vw, 112px);
  font-weight: 800;
  letter-spacing: -4px;
  color: var(--orange);
  line-height: 1;
}
.table-intro-unit {
  font-family: var(--font-d);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dim);
  display: block;
  margin-top: 4px;
  letter-spacing: -0.5px;
}
.table-intro-headline {
  font-family: var(--font-d);
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--white);
  margin-bottom: 12px;
  line-height: 1.2;
}
.table-intro-sub {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 460px;
  line-height: 1.7;
}

.research-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.research-table thead tr {
  background: var(--surface2);
}
.research-table th {
  padding: 16px 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.research-table th:first-child { color: var(--text-dim); }
.research-table th:not(:first-child) {
  text-align: center;
  color: var(--text-faint);
}
.research-table td {
  padding: 13px 20px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.research-table tr:last-child td { border-bottom: none; }
.research-table tbody tr { background: var(--black); }
.research-table tbody tr:nth-child(odd) { background: rgba(255,255,255,0.015); }
.research-table td:not(:first-child) { text-align: center; }

.row-label { font-weight: 500; color: var(--white); }
.row-sub {
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 400;
  display: block;
  margin-top: 3px;
}
.cell-no { color: var(--text-faint); font-size: 16px; }

.chk {
  display: block;
  margin: 0 auto;
  width: 16px;
  height: 16px;
}

/* ─── MODES ─── */
.modes-section {
  padding: 80px 56px;
  border-bottom: 1px solid var(--border);
}
.modes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.mode-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 34px;
}
.mode-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
  display: block;
}
.mode-name {
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--white);
  margin-bottom: 10px;
}
.mode-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.mode-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.mode-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
}
.mode-tag.on {
  color: var(--orange);
  border-color: var(--orange-bd);
  background: var(--orange-lo);
}

/* ─── WAITLIST SECTION ─── */
.waitlist-section {
  padding: 96px 56px;
  border-bottom: 1px solid var(--border);
}
.waitlist-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.waitlist-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 20px;
  display: block;
}
.waitlist-title {
  font-family: var(--font-d);
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--white);
  line-height: 1.08;
  margin-bottom: 14px;
}
.waitlist-sub {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 44px;
}
.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
.form-field input,
.form-field select {
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 400;
  color: var(--white);
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-radius: 9px;
  padding: 13px 16px;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2 4.5L6 8L10 4.5' stroke='rgba(255,255,255,0.4)' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
.form-field select option {
  background: #1a1a1a;
  color: var(--white);
}
.form-field input:focus,
.form-field select:focus {
  border-color: rgba(255,255,255,0.28);
}
.form-field input::placeholder { color: rgba(255,255,255,0.25); }
.form-submit {
  margin-top: 8px;
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  background: var(--orange);
  border: none;
  border-radius: 9px;
  padding: 15px;
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
}
.form-submit:hover { opacity: 0.88; }
.form-note {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  margin-top: 12px;
}
/* success state */
.waitlist-success {
  display: none;
  text-align: center;
  padding: 40px 0;
}
.waitlist-success.visible { display: block; }
.success-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--orange-lo);
  border: 1px solid var(--orange-bd);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.success-title {
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--white);
  margin-bottom: 8px;
}
.success-msg {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ─── FOOTER CTA ─── */
.footer-cta {
  padding: 72px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-cta h2 {
  font-family: var(--font-d);
  font-size: clamp(20px, 2.5vw, 32px);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--white);
  margin-bottom: 8px;
}
.footer-cta p {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 400px;
  line-height: 1.6;
}
.footer-btns { display: flex; gap: 12px; flex-shrink: 0; }
.btn-orange {
  display: inline-block;
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  background: var(--orange);
  border: none;
  border-radius: 9px;
  padding: 13px 26px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-orange:hover { opacity: 0.88; }
.btn-ghost {
  display: inline-block;
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border-md);
  border-radius: 9px;
  padding: 13px 26px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-ghost:hover { color: var(--white); border-color: rgba(255,255,255,0.25); }

/* ─── SITE FOOTER ─── */
.site-footer {
  padding: 24px 56px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.f-logo {
  font-family: var(--font-d);
  font-size: 14px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.3px;
}
.f-logo .k { color: var(--orange); font-size: 12px; }
.f-note { font-size: 12px; color: var(--text-faint); }

/* ─── HOVER ANIMATIONS ─── */

/* Card lift + glow on hover */
.engine-card {
  transform: translateY(0);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.35s cubic-bezier(0.22,1,0.36,1);
}
.engine-card:hover {
  transform: translateY(-6px);
  border-color: var(--orange-bd);
  box-shadow: 0 0 0 1px var(--orange-lo), 0 16px 48px rgba(232,102,60,0.12);
}
.engine-card.featured:hover {
  transform: translateY(-6px);
  border-color: var(--orange);
  box-shadow: 0 0 0 1px rgba(232,102,60,0.3), 0 16px 56px rgba(232,102,60,0.18);
}

/* Mode card hover glow */
.mode-card {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.35s cubic-bezier(0.22,1,0.36,1);
}
.mode-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

/* Feature list items slide on hover */
.card-features li {
  transition: transform 0.25s ease, color 0.25s ease;
}
.engine-card:hover .card-features li {
  transform: translateX(4px);
}

/* Button micro-animation */
.card-btn {
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.card-btn:active {
  transform: scale(0.96);
}

/* Hero stat hover pulse */
.hero-stat {
  transition: background 0.3s ease;
}
.hero-stat:hover {
  background: rgba(255,255,255,0.03);
}
.hero-stat-n {
  transition: color 0.3s ease, transform 0.3s ease;
}
.hero-stat:hover .hero-stat-n {
  color: var(--orange);
  transform: scale(1.08);
}

/* Nav links underline animation */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--white);
  transition: width 0.3s ease;
}
.nav-links a:hover::after {
  width: 100%;
}

/* See-more button hover */
.see-more-btn {
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.see-more-btn:hover {
  transform: translateY(-2px);
}

/* Footer CTA buttons */
.btn-orange {
  transition: opacity 0.2s, transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-orange:hover {
  opacity: 0.88;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232,102,60,0.25);
}

/* ─── REVEAL ON SCROLL ─── */
.reveal-el {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.reveal-el.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger cards */
.engine-card.reveal-el:nth-child(1) { transition-delay: 0s; }
.engine-card.reveal-el:nth-child(2) { transition-delay: 0.08s; }
.engine-card.reveal-el:nth-child(3) { transition-delay: 0.16s; }
.engine-card.reveal-el:nth-child(4) { transition-delay: 0.24s; }

/* Stagger mode cards */
.mode-card.reveal-el:nth-child(1) { transition-delay: 0s; }
.mode-card.reveal-el:nth-child(2) { transition-delay: 0.1s; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1080px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  nav { padding: 18px 24px; }
  .nav-links { display: none; }
  .hero, .engines-section, .table-section, .modes-section, .waitlist-section, .footer-cta { padding-left: 24px; padding-right: 24px; }
  .cards-grid { grid-template-columns: 1fr; }
  .modes-grid { grid-template-columns: 1fr; }
  .hero-stats { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
  }
  .hero-stat { 
    border-right: 1px solid var(--border); 
    border-bottom: 1px solid var(--border); 
    padding: 20px 16px;
  }
  .hero-stat:nth-child(2n) { border-right: none; }
  .hero-stat:nth-child(n+3) { border-bottom: none; }
  .table-intro { flex-direction: column; gap: 24px; align-items: flex-start; }
  .table-intro-left { text-align: left; }
  #tableVisible tr:nth-child(n+6) { display: none; }
  #tableWrap.open #tableVisible tr:nth-child(n+6) { display: table-row; }
  .footer-cta { flex-direction: column; align-items: flex-start; }
  .site-footer { padding: 24px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .form-row { grid-template-columns: 1fr; }
}
