/**
 * Derived Properties - Content Styles
 * Layout handled by shared/layout.css
 */

/* ============================================================================
 * RESET & BASE
 * ============================================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
}

/* ============================================================================
 * CONTENT CONTAINER OVERRIDE - Narrower for spine layout
 * ============================================================================ */

.site-layout__inner {
  max-width: 840px;
}

/* ============================================================================
 * PAGE TITLE - Content header below site navigation
 * ============================================================================ */

.page-header {
  text-align: center;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin: 0;
}

/* Page title accent - purple underline */
.page-header--derived::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: #8B5CF6;
  margin: var(--spacing-3) auto 0;
  border-radius: var(--radius-full);
}

/* ============================================================================
 * SPINE LAYOUT
 * ============================================================================ */

.spine-layout {
  --spine-color: var(--color-border);
  --spine-width: 1px;
  --connector-gap: 0;
  
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  max-width: 840px;
  margin: 0 auto;
}

/* Main vertical spine */
.spine-layout::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 60px;
  bottom: 240px;
  width: var(--spine-width);
  margin-left: calc(var(--spine-width) / -2);
  background: var(--spine-color);
}

/* ============================================================================
 * PAGE HEADER
 * ============================================================================ */

/* Page header now uses shared component from shared/components.css */

/* ============================================================================
 * PREMISE CARD
 * ============================================================================ */

.premise-card {
  width: 100%;
  max-width: 560px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px 24px;
  text-align: center;
  position: relative;
  z-index: 2;
}

/* Connector to spine */
.premise-card::after {
  content: '';
  position: absolute;
  bottom: -17px;
  left: 50%;
  width: var(--spine-width);
  height: 17px;
  margin-left: calc(var(--spine-width) / -2);
  background: var(--spine-color);
}

.premise-text {
  font-size: 14px;
  color: var(--color-text-2);
  margin-bottom: 8px;
}

.premise-emphasis {
  font-size: 15px;
  color: var(--color-text);
  line-height: 1.5;
}

.premise-emphasis strong {
  color: #8B5CF6;
  font-weight: 600;
}

/* ============================================================================
 * SPINE CARD
 * ============================================================================ */

.spine-card {
  width: 100%;
  max-width: 480px;
  background: var(--color-surface);
  border: var(--spine-width) solid var(--spine-color);
  border-radius: 12px;
  padding: 20px 24px;
  text-align: center;
  position: relative;
  z-index: 2;
  margin: 16px 0;
}

.spine-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.spine-icon {
  width: 14px;
  height: 14px;
  color: #8B5CF6;
}

.spine-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.spine-quote {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  font-style: italic;
  color: var(--color-text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.spine-note {
  font-size: 12px;
  color: var(--color-text-2);
}

/* ============================================================================
 * LAYER
 * ============================================================================ */

.layer {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  margin: 12px 0;
}

/* Layer header */
.layer-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.layer-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============================================================================
 * PROPERTY GROUP
 * ============================================================================ */

.property-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.property-group--horizontal {
  flex-direction: row;
  gap: 0;
  position: relative;
}

/* Central spine segment */
.property-group--horizontal::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: var(--spine-width);
  margin-left: calc(var(--spine-width) / -2);
  background: var(--spine-color);
  z-index: 1;
}

.property-group--horizontal .property-card {
  flex: 1;
}

/* Left card - touches spine */
.property-group--horizontal .property-card:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* Right card - touches spine */
.property-group--horizontal .property-card:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* ============================================================================
 * PROPERTY CARD
 * ============================================================================ */

.property-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 16px;
  position: relative;
  z-index: 2;
}

.property-card--primary {
  max-width: 520px;
  border-top: var(--spine-width) solid var(--spine-color);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Connector from spine to primary card */
.property-card--primary::before {
  content: '';
  position: absolute;
  top: calc(var(--spine-width) * -1 - 12px);
  left: 50%;
  width: var(--spine-width);
  height: 12px;
  margin-left: calc(var(--spine-width) / -2);
  background: var(--spine-color);
}

.property-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.property-icon {
  width: 14px;
  height: 14px;
  color: #8B5CF6;
}

.property-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.property-description {
  font-size: 13px;
  color: var(--color-text-2);
  line-height: 1.5;
  margin-left: 22px;
}

/* ============================================================================
 * CONVERGENCE PANEL
 * ============================================================================ */

.convergence-panel {
  width: 100%;
  max-width: 560px;
  background: var(--color-surface);
  border: var(--spine-width) solid var(--spine-color);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-top: 12px;
  position: relative;
  z-index: 2;
}

/* Connector from spine */
.convergence-panel::before {
  content: '';
  position: absolute;
  top: calc(var(--spine-width) * -1 - 12px);
  left: 50%;
  width: var(--spine-width);
  height: 12px;
  margin-left: calc(var(--spine-width) / -2);
  background: var(--spine-color);
}

.convergence-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.convergence-icon {
  width: 14px;
  height: 14px;
  color: #8B5CF6;
}

.convergence-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.convergence-intro {
  font-size: 14px;
  color: var(--color-text-2);
  margin-bottom: 16px;
}

.convergence-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  list-style: none;
  margin-bottom: 20px;
}

.convergence-list li {
  padding: 4px 12px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
}

.convergence-conclusion {
  font-size: 15px;
  color: var(--color-text-2);
  line-height: 1.5;
}

.convergence-conclusion strong {
  color: #8B5CF6;
  font-weight: 600;
}

/* Footer handled by shared/layout.css */

/* ============================================================================
 * ANIMATIONS
 * ============================================================================ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header { animation: fadeIn 400ms ease forwards; }
.premise-card { opacity: 0; animation: fadeIn 400ms ease 50ms forwards; }
.spine-card { opacity: 0; animation: fadeIn 400ms ease 100ms forwards; }
.layer { opacity: 0; animation: fadeIn 400ms ease 150ms forwards; }
.layer:nth-of-type(2) { animation-delay: 200ms; }
.layer:nth-of-type(3) { animation-delay: 250ms; }
.layer:nth-of-type(4) { animation-delay: 300ms; }
.convergence-panel { opacity: 0; animation: fadeIn 400ms ease 350ms forwards; }

/* ============================================================================
 * RESPONSIVE
 * ============================================================================ */

@media (max-width: 680px) {
  .property-group--horizontal {
    flex-direction: column;
    gap: 8px;
  }
  
  .property-group--horizontal::before { display: none; }
  
  .property-group--horizontal .property-card:first-child,
  .property-group--horizontal .property-card:last-child {
    margin: 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
  }
  
  .property-group--horizontal .property-card:first-child::after,
  .property-group--horizontal .property-card:last-child::before {
    display: none;
  }
  
  .layer-header::before {
    width: 120px;
    margin-left: -60px;
  }
  
}
