/* landing.css — Hero, scroll sections, timeline, organizer grid */

@layer pages {
  /* ── Hero — Logo left, text right ────────────────────── */
  .hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--color-void);
    overflow: hidden;
    padding: 0 var(--content-padding);
  }

  .hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    animation: grain 0.8s steps(10) infinite;
  }

  .hero::after {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.06) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
  }

  .hero__inner {
    display: flex;
    align-items: center;
    gap: clamp(32px, 6vw, 80px);
    max-width: 1100px;
    width: 100%;
    position: relative;
    z-index: 2;
  }

  .hero__left {
    flex-shrink: 0;
    opacity: 0;
  }

  .hero__logo {
    width: clamp(120px, 20vw, 220px);
    height: auto;
    filter: drop-shadow(0 0 24px rgba(0, 229, 255, 0.2)) drop-shadow(0 0 48px rgba(255, 45, 107, 0.1));
  }

  .hero__right {
    flex: 1;
    min-width: 0;
  }

  .hero__eyebrow {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--type-xs);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--color-cyan);
    margin-bottom: 16px;
    opacity: 0;
  }

  .hero__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 1.15;
    max-width: 700px;
  }

  .hero__title .char {
    display: inline-block;
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }

  .hero__title .line-break {
    display: block;
    height: 0.1em;
  }

  .hero__subtitle {
    font-family: var(--font-body);
    font-size: var(--type-md);
    font-weight: 300;
    color: var(--color-muted);
    margin-top: 20px;
    max-width: 500px;
    opacity: 0;
  }

  .hero__scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-ghost);
    opacity: 0;
    animation: hero-fade-up 400ms var(--ease-out-expo) 2000ms both;
    transition: color var(--dur-fast);
  }

  .hero__scroll:hover {
    color: var(--color-cyan);
  }

  .hero__scroll svg {
    animation: bounce-down 2s ease-in-out infinite;
  }

  @keyframes bounce-down {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
  }

  @keyframes grain {
    0%   { transform: translate(0, 0); }
    10%  { transform: translate(-2%, -3%); }
    30%  { transform: translate(3%, 2%); }
    50%  { transform: translate(-1%, 4%); }
    70%  { transform: translate(4%, -1%); }
    90%  { transform: translate(-3%, 3%); }
    100% { transform: translate(0, 0); }
  }

  @media (max-width: 768px) {
    .hero__inner {
      flex-direction: column;
      text-align: center;
    }
    .hero__logo {
      width: 100px;
    }
    .hero__title {
      font-size: clamp(1.8rem, 8vw, 3rem);
    }
    .hero__subtitle {
      margin-left: auto;
      margin-right: auto;
    }
  }

  /* ── The Problem Section ─────────────────────────────── */
  .section-problem {
    background: var(--color-abyss);
  }

  .section-problem .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
  }

  @media (max-width: 900px) {
    .section-problem .container {
      grid-template-columns: 1fr;
      gap: 40px;
    }
  }

  /* ── Tasks Section ───────────────────────────────────── */
  .section-tasks {
    background: var(--color-void);
  }

  .task-card {
    background: var(--color-surface-1);
    border: 1px solid var(--color-border);
    border-radius: 2px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: border-color var(--dur-mid) var(--ease-out-quart),
                transform var(--dur-mid) var(--ease-out-quart);
    transform-style: preserve-3d;
    perspective: 800px;
    display: block;
  }

  .task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
    opacity: 0;
    transition: opacity var(--dur-mid) var(--ease-out-quart);
  }

  .task-card:hover {
    border-color: var(--color-border-lit);
    transform: translateY(-4px);
  }

  .task-card:hover::before {
    opacity: 1;
  }

  .task-card__badges {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
  }

  /* ── Metrics Section ─────────────────────────────────── */
  .section-metrics {
    background: var(--color-abyss);
  }

  .metrics-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .metric-row {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 24px 28px;
    background: var(--color-surface-1);
    border: 1px solid var(--color-border);
    border-radius: 2px;
    transition: border-color var(--dur-mid), background var(--dur-mid);
  }

  .metric-row:hover {
    border-color: var(--color-border-lit);
    background: var(--color-surface-2);
  }

  .metric-row__weight {
    flex-shrink: 0;
    padding-top: 2px;
  }

  .metric-row__content {
    flex: 1;
  }

  .metric-row__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--type-base);
    color: #ffffff;
    margin-bottom: 4px;
  }

  .metric-row__desc {
    font-family: var(--font-body);
    font-size: var(--type-sm);
    line-height: 1.6;
    color: var(--color-muted);
  }

  .metric-row__desc em {
    color: var(--color-cyan);
    font-style: italic;
  }

  @media (max-width: 600px) {
    .metric-row {
      flex-direction: column;
      gap: 12px;
    }
  }

  /* ── Stats Section ───────────────────────────────────── */
  .section-stats {
    background: var(--color-abyss);
  }

  .stat-card {
    text-align: center;
    padding: 32px;
  }

  .stat-card__number {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: var(--type-3xl);
    color: var(--color-cyan);
    line-height: 1;
    margin-bottom: 8px;
  }

  .stat-card__label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--type-xs);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 12px;
  }

  .stat-card__desc {
    font-family: var(--font-body);
    font-size: var(--type-sm);
    color: var(--color-ghost);
    line-height: 1.6;
  }

  /* ── Timeline Section ────────────────────────────────── */
  .section-timeline {
    background: var(--color-void);
  }

  :root {
    --DOT: 12px;
    --HALF: 6px;
    --CONN: 28px;
  }

  .tl {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
  }

  .tl-track {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: none;
  }

  .tl-track::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-border);
  }

  .tl-track::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0%;
    background: var(--color-cyan);
    transition: height 1.1s var(--ease-out-expo);
  }

  .tl.go .tl-track::after {
    height: 100%;
  }

  .tl-item {
    display: grid;
    grid-template-columns: 1fr var(--CONN) var(--DOT) var(--CONN) 1fr;
    align-items: start;
    margin-bottom: 36px;
    position: relative;
    z-index: 2;
  }

  .tl-item.odd {
    grid-template-areas: "cnt cl dot cr2 pad";
  }

  .tl-item.even {
    grid-template-areas: "pad cl2 dot cr cnt";
  }

  .tl-dot {
    grid-area: dot;
    justify-self: center;
    align-self: start;
    width: var(--DOT);
    height: var(--DOT);
    margin-top: 7px;
    border-radius: 50%;
    background: var(--color-void);
    border: 1.5px solid var(--color-border);
    z-index: 4;
    transform: scale(0);
    transition: transform 0.45s var(--ease-spring) 0.15s,
                border-color 0.3s,
                background 0.3s,
                box-shadow 0.3s;
  }

  .tl-item.go .tl-dot {
    transform: scale(1);
  }

  .tl-item.past .tl-dot {
    border-color: var(--color-cyan);
    background: var(--color-cyan);
  }

  .tl-item.active .tl-dot {
    border-color: var(--color-cyan);
    animation: dot-pulse 2s ease-in-out infinite;
  }

  .tl-item.future .tl-dot {
    border-color: var(--color-ghost);
  }

  @keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.18); }
    50%      { box-shadow: 0 0 0 9px rgba(0, 229, 255, 0.05); }
  }

  .tl-cl, .tl-cl2, .tl-cr, .tl-cr2 {
    height: 1px;
    margin-top: 13px;
    z-index: 3;
    transform: scaleX(0);
    transition: transform 0.3s var(--ease-out-expo) 0.28s;
  }

  .tl-item.go .tl-cl,
  .tl-item.go .tl-cl2,
  .tl-item.go .tl-cr,
  .tl-item.go .tl-cr2 {
    transform: scaleX(1);
  }

  .tl-cl  { grid-area: cl; transform-origin: right; }
  .tl-cl2 { grid-area: cl2; transform-origin: right; visibility: hidden; }
  .tl-cr  { grid-area: cr; transform-origin: left; }
  .tl-cr2 { grid-area: cr2; transform-origin: left; visibility: hidden; }

  .tl-item.past .tl-cl,
  .tl-item.past .tl-cr,
  .tl-item.active .tl-cl,
  .tl-item.active .tl-cr {
    background: var(--color-cyan);
  }

  .tl-item.future .tl-cl,
  .tl-item.future .tl-cr,
  .tl-item.future .tl-cl2,
  .tl-item.future .tl-cr2 {
    background: var(--color-ghost);
  }

  .tl-cnt {
    grid-area: cnt;
    opacity: 0;
    transition: opacity 0.5s var(--ease-out-expo) 0.08s,
                transform 0.5s var(--ease-out-expo) 0.08s;
  }

  .tl-item.odd .tl-cnt {
    text-align: right;
    transform: translateX(10px);
  }

  .tl-item.even .tl-cnt {
    text-align: left;
    transform: translateX(-10px);
  }

  .tl-item.go .tl-cnt {
    opacity: 1;
    transform: translateX(0);
  }

  .date-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    margin-bottom: 7px;
    color: var(--color-muted);
    transition: border-color 0.3s, color 0.3s;
  }

  .tl-item.odd .date-badge {
    border-right: none;
  }

  .tl-item.even .date-badge {
    border-left: none;
  }

  .tl-item.past .date-badge,
  .tl-item.active .date-badge {
    border-color: var(--color-cyan);
    color: var(--color-cyan);
    background: rgba(0, 229, 255, 0.06);
  }

  .tl-item.future .date-badge {
    border-color: var(--color-ghost);
    color: var(--color-ghost);
    background: rgba(0, 229, 255, 0.03);
  }

  .date-badge--active {
    background: rgba(0, 229, 255, 0.12) !important;
    border-color: var(--color-cyan) !important;
    color: var(--color-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.15);
  }

  .tl-event {
    font-family: var(--font-body);
    font-size: var(--type-base);
    line-height: 1.5;
    color: var(--color-text);
  }

  .tl-item.future .tl-event {
    color: var(--color-muted);
  }

  .tl-item.past .tl-event {
    opacity: 0.5;
  }

  /* Today marker as timeline item */
  .today-marker .tl-dot--today {
    border-color: var(--color-amber);
    background: var(--color-amber);
    box-shadow: 0 0 12px rgba(255, 179, 71, 0.5), 0 0 24px rgba(255, 179, 71, 0.2);
    animation: today-pulse 2s ease-in-out infinite;
  }

  @keyframes today-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(255, 179, 71, 0.2); }
    50%      { box-shadow: 0 0 0 10px rgba(255, 179, 71, 0.05); }
  }

  .date-badge--today {
    background: rgba(255, 179, 71, 0.1) !important;
    border-color: var(--color-amber) !important;
    color: var(--color-amber) !important;
  }

  .tl-item.odd .date-badge--today {
    border-right: none !important;
  }

  .tl-item.even .date-badge--today {
    border-left: none !important;
  }

  .tl-event--today {
    color: var(--color-amber) !important;
    font-weight: 500;
  }

  .today-marker .tl-cl,
  .today-marker .tl-cr {
    background: var(--color-amber) !important;
    box-shadow: 0 0 6px rgba(255, 179, 71, 0.3);
  }

  /* ── Page Title Animation ────────────────────────────── */
  .page-title .char {
    display: inline-block;
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    animation: hero-title-reveal 500ms var(--ease-out-expo) both;
  }

  .page-title .line-break {
    display: block;
    height: 0.1em;
  }

  @media (max-width: 768px) {
    .tl-track {
      left: 11px;
      transform: none;
    }

    .tl-item,
    .tl-item.odd,
    .tl-item.even {
      grid-template-columns: 11px var(--DOT) var(--CONN) 1fr;
      grid-template-areas: ". dot cr cnt";
    }

    .tl-cl, .tl-cl2 { display: none; }

    .tl-cr, .tl-cr2 {
      grid-area: cr !important;
      visibility: visible !important;
      transform-origin: left;
      background: var(--color-ghost);
    }

    .tl-item.past .tl-cr,
    .tl-item.past .tl-cr2,
    .tl-item.active .tl-cr,
    .tl-item.active .tl-cr2 {
      background: var(--color-cyan);
    }

    .tl-cnt {
      text-align: left !important;
      transform: translateX(-8px) !important;
    }

    .tl-item.go .tl-cnt {
      transform: translateX(0) !important;
    }

    .tl-item.odd .date-badge,
    .tl-item.even .date-badge {
      border-right: 1px solid var(--color-border) !important;
      border-left: none !important;
    }

    .tl-item.past .date-badge,
    .tl-item.active .date-badge {
      border-color: var(--color-cyan) !important;
    }

    .tl-item.future .date-badge {
      border-color: var(--color-ghost) !important;
    }
  }

  /* ── Organizers Section ──────────────────────────────── */
  .section-organizers {
    background: var(--color-abyss);
  }

  .organizer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
  }

  .organizer-card {
    background: var(--color-surface-1);
    border: 1px solid var(--color-border);
    border-radius: 2px;
    padding: 28px;
    width: calc(33.333% - 16px);
    min-width: 260px;
    transition: border-color var(--dur-mid);
  }

  .organizer-card:hover {
    border-color: var(--color-border-lit);
  }

  .organizer-card__name {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: var(--type-md);
    color: #ffffff;
    margin-bottom: 4px;
  }

  .organizer-card__affiliation {
    font-family: var(--font-body);
    font-style: italic;
    font-size: var(--type-sm);
    color: var(--color-muted);
    margin-bottom: 8px;
  }

  .organizer-card__email {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-cyan);
    display: block;
    margin-bottom: 8px;
    transition: color var(--dur-fast);
    text-decoration: none;
  }

  .organizer-card__email:hover {
    color: #ffffff;
  }

  .organizer-card__role {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-violet);
    letter-spacing: 0.05em;
  }

  @media (max-width: 900px) {
    .organizer-card {
      width: calc(50% - 12px);
    }
  }

  @media (max-width: 600px) {
    .organizer-card {
      width: 100%;
    }
  }

  /* ── Register Section ────────────────────────────────── */
  .section-register {
    background: var(--color-surface-1);
    text-align: center;
  }

  .section-register .eyebrow {
    margin-bottom: 16px;
  }

  .section-register h2 {
    margin-bottom: 16px;
  }

  .section-register .prose {
    margin: 0 auto 40px;
    text-align: center;
  }

  .register__coming-soon {
    font-family: var(--font-mono);
    font-size: var(--type-xs);
    color: var(--color-ghost);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 24px;
  }
}
