/* ============================================================
   TURTLE DATA STORAGE & LOGGING – 2026 edition
   Clean, technical, amber-beige accent – matches real logs
============================================================ */

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

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  color: #f3f4f6;
  background: #0b132b;
}

/* Hero */
.detail-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 2rem 9rem;
  background: #0f172a;
  overflow: hidden;
}

.hero-bg-grain {
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="3"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/></filter><rect width="100" height="100" filter="url(%23n)" opacity="0.05"/></svg>');
  pointer-events: none;
}

.detail-hero h1 {
  font-size: clamp(3.2rem, 8vw, 5.4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #d97706;
  margin-bottom: 1.4rem;
  text-shadow: 0 2px 12px rgba(217,119,6,0.15);
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  color: #fbbf24;
  opacity: 0.94;
  max-width: 800px;
  margin: 0 auto;
  font-weight: 400;
}

/* Main Content */
.detail-content {
  padding: 6rem 2rem 10rem;
  max-width: 1320px;
  margin: 0 auto;
}

/* Reference Cards */
.reference-card {
  background: rgba(30,41,59,0.88);
  border: 1px solid rgba(217,119,6,0.22);
  border-radius: 1.6rem;
  padding: 3rem 2.5rem;
  margin-bottom: 7rem;
  box-shadow: 0 12px 48px rgba(0,0,0,0.35), inset 0 0 20px rgba(217,119,6,0.08);
}

.reference-card h2 {
  font-size: 2.2rem;
  color: #fbbf24;
  text-align: center;
  margin-bottom: 1.5rem;
}

.ref-intro {
  text-align: center;
  color: #d1d5db;
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
}

.json-reference,
.log-example {
  background: #0f172a;
  border-radius: 1rem;
  padding: 2rem;
  overflow-x: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #e2e8f0;
  border: 1px solid rgba(217,119,6,0.18);
  white-space: pre;
}

.log-example code {
  color: #a5b4fc; /* soft blue for log lines to distinguish from JSON */
}

/* Accordion */
.accordion {
  margin-bottom: 7rem;
}

.accordion-item {
  background: rgba(30,41,59,0.75);
  border: 1px solid rgba(217,119,6,0.20);
  border-radius: 1rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.accordion-item summary {
  padding: 1.5rem 2rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fbbf24;
  cursor: pointer;
  transition: background 0.3s ease;
}

.accordion-item summary:hover {
  background: rgba(217,119,6,0.08);
}

.accordion-item summary::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  float: right;
  transition: transform 0.3s ease;
}

.accordion-item[open] summary::after {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0 2rem 2rem;
  color: #d1d5db;
  font-size: 1.05rem;
}

.accordion-content ul {
  list-style: disc;
  padding-left: 1.8rem;
  margin: 1rem 0;
}

.accordion-content li {
  margin-bottom: 0.8rem;
}

/* Field Table */
.field-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.98rem;
}

.field-table th,
.field-table td {
  padding: 1rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid rgba(217,119,6,0.15);
}

.field-table th {
  background: rgba(217,119,6,0.08);
  color: #fbbf24;
  font-weight: 700;
}

.field-table td {
  color: #e2e8f0;
}

/* Schema Flow */
.visual-section h2 {
  font-size: 2.4rem;
  text-align: center;
  color: #fbbf24;
  margin-bottom: 2.5rem;
}

.schema-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.2rem 2rem;
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
  color: #d1d5db;
}

.schema-box {
  background: rgba(30,41,59,0.9);
  border: 2px solid #d97706;
  border-radius: 1rem;
  padding: 1.2rem 1.8rem;
  font-weight: 600;
  text-align: center;
  min-width: 160px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.schema-box.root,
.schema-box.final {
  background: rgba(217,119,6,0.12);
  border-color: #fbbf24;
}

.schema-arrow {
  font-size: 2.2rem;
  color: #d97706;
  font-weight: bold;
}

.schema-arrow.down {
  transform: rotate(90deg);
}

.schema-note {
  text-align: center;
  font-size: 1.1rem;
  font-style: italic;
  color: #9ca3af;
  max-width: 800px;
  margin: 0 auto;
}

/* Back Link */
.back-link {
  text-align: center;
  margin-top: 6rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 2.5rem;
  background: rgba(217,119,6,0.14);
  border: 1px solid rgba(217,119,6,0.30);
  border-radius: 1.1rem;
  color: #fbbf24;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.4s ease;
}

.btn-back:hover {
  background: rgba(217,119,6,0.22);
  transform: translateY(-3px);
  border-color: #d97706;
  box-shadow: 0 6px 20px rgba(217,119,6,0.20);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(35px);
  animation: fadeInUp 1s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 900px) {
  .detail-hero { padding: 6rem 1.5rem 8rem; }
  .detail-content { padding: 5rem 1.5rem 8rem; }
  .reference-card { padding: 2.5rem 1.8rem; }
  .json-reference, .log-example { padding: 1.6rem; font-size: 0.92rem; }
  .schema-wrapper { flex-direction: column; gap: 1.5rem; }
  .schema-arrow.down { transform: rotate(0deg); }
}

@media (max-width: 640px) {
  .field-table th, .field-table td { padding: 0.9rem 0.8rem; font-size: 0.92rem; }
}