/* =========================
   Thoughtthoughts – minimal core
   ========================= */

/* Base & tokens */
:root{
  --ink: #eae5ff;           /* primary text on dark */
  --muted: #bcb3e6;
  --bg: #0f0c18;            /* page background */
  --bg-soft: #171327;       /* card background */
  --accent: #8d7cff;        /* gentle highlight */
  --shadow: 0 8px 24px rgba(0,0,0,.35);
  --radius: 16px;
}

*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; background:var(--bg); color:var(--ink);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  line-height: 1.55; }

.page{ max-width: 980px; margin: 3rem auto; padding: 0 1.25rem; }
header .title{ font-size: clamp(2rem, 4vw, 3rem); margin:0 0 .25rem; }
header .subtitle{ color: var(--muted); margin:0 0 1.25rem; }
.section{ margin: 1.2rem 0 0; }

/* ---------- Portal cards ---------- */
.portal-grid{
  display:grid; gap:1.2rem;
  grid-template-columns: 1fr;
}
@media (min-width:760px){ .portal-grid{ grid-template-columns: repeat(2,1fr); } }
@media (min-width:1100px){ .portal-grid{ grid-template-columns: repeat(3,1fr); } }

/* whole card is a link */
.portal-card{
  display:flex; flex-direction:column; overflow:hidden;
  background: var(--bg-soft);
  border:1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration:none; color:var(--ink);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  min-height: 340px;
}
.portal-card:hover{
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.portal-card:focus-visible{ outline: 3px solid var(--accent); outline-offset: 2px; }

/* image */
.thumb-wrap{ overflow:hidden; border-bottom:1px solid rgba(255,255,255,.06); }
.thumb{
  display:block; width:100%;
  /* 4:3 cover makes every image a consistent “icon” without editing */
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* optional focal helpers (use on .thumb-wrap) */
.pos-top .thumb{    object-position: 50% 15%; }
.pos-center .thumb{ object-position: 50% 50%; }
.pos-bottom .thumb{ object-position: 50% 85%; }

/* text area */
.portal-card .body{ padding: 1rem 1rem 1.1rem; }
.portal-card h3{ margin:.2rem 0 .35rem; font-size:1.2rem; }
.portal-card p{ margin:.25rem 0 .6rem; color: var(--muted); }
.portal-card .cta{ font-weight: 700; opacity:.95; }

/* footer helper */
.muted{ color: var(--muted); }
a{ color: inherit; }


/* Uniform 4:3 thumbnails — show whole image (no cropping) */
.thumb-wrap{ background: #1a1530; border-bottom:1px solid rgba(255,255,255,.06); }
.thumb{
  width:100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;      /* no crop; adds bars if needed */
  object-position: 50% 50%;
  display:block;
}


/* add once */
.portal-card.fx-sheen{ position:relative; isolation:isolate; }
.portal-card.fx-sheen::before{
  content:""; position:absolute; inset:0; pointer-events:none; opacity:0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.20) 45%, transparent 60%);
  transform: translateX(-120%);
  transition: transform .6s ease, opacity .2s ease;
}
.portal-card.fx-sheen:hover::before{ opacity:.7; transform: translateX(110%); }

/* respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .portal-card.fx-sheen::before{ display:none; }
}

.portal-card.fx-depth{ box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.portal-card.fx-depth:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  border-color: rgba(255,255,255,.18);
}

.portal-card.fx-halo:hover{
  box-shadow:
    0 18px 50px rgba(0,0,0,.45),
    0 0 30px rgba(141,124,255,.25); /* accent halo */
}

.portal-card .cta{
  position: relative;
  display: inline-block;
}
.portal-card .cta::after{
  content:""; position:absolute; left:0; bottom:-2px;
  width:100%; height:2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin:left;
  transition: transform .3s ease;
}
.portal-card:hover .cta::after{
  transform: scaleX(1);
}
.portal-card{
  opacity:0; transform: translateY(10px);
  animation: cardIn .6s ease forwards;
}
.portal-card:nth-child(1){ animation-delay: .1s; }
.portal-card:nth-child(2){ animation-delay: .2s; }
.portal-card:nth-child(3){ animation-delay: .3s; }
.portal-card:nth-child(4){ animation-delay: .4s; }
.portal-card:nth-child(5){ animation-delay: .5s; }
.portal-card:nth-child(6){ animation-delay: .6s; }

@keyframes cardIn{
  to{ opacity:1; transform: translateY(0); }
}

.portal-card.fx-tilt:hover{
  transform: translateY(-3px) rotateX(2deg) rotateY(-2deg);
}

/* --- Portal card halo effect on hover --- */
.portal-card:hover{
  box-shadow:
    0 18px 50px rgba(0,0,0,.45),
    0 0 30px rgba(141,124,255,.25); /* accent halo */
}

/* --- Animated CTA underline --- */
.portal-card .cta{
  position: relative;
  display: inline-block;
}
.portal-card .cta::after{
  content:"";
  position:absolute;
  left:0; bottom:-2px;
  width:100%; height:2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin:left;
  transition: transform .3s ease;
}
.portal-card:hover .cta::after{
  transform: scaleX(1);
}

/* --- Staggered entrance for portal cards --- */
@keyframes portalCardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* default: animate in once */
.portal-grid .portal-card{
  opacity: 0;
  animation: portalCardIn .55s ease forwards;
}

/* stagger the six tiles */
.portal-grid .portal-card:nth-child(1){ animation-delay: .06s; }
.portal-grid .portal-card:nth-child(2){ animation-delay: .14s; }
.portal-grid .portal-card:nth-child(3){ animation-delay: .22s; }
.portal-grid .portal-card:nth-child(4){ animation-delay: .30s; }
.portal-grid .portal-card:nth-child(5){ animation-delay: .38s; }
.portal-grid .portal-card:nth-child(6){ animation-delay: .46s; }

/* respect motion preferences */
@media (prefers-reduced-motion: reduce){
  .portal-grid .portal-card{
    opacity: 1;
    animation: none;
    transform: none;
  }
}

/* --- Portal 3D backdrop --- */
body{
  background:
    radial-gradient(circle at 20% 30%, rgba(141,124,255,.15), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(255,190,255,.12), transparent 60%),
    linear-gradient(180deg, #0f0c18 0%, #1a132b 100%);
  background-attachment: fixed; /* gives it depth when scrolling */
}
.portal-card{
  perspective: 1000px;
}
.portal-card .thumb-wrap{
  transition: transform .4s ease;
  will-change: transform;
}
.portal-card:hover .thumb-wrap{
  transform: scale(1.03) rotateX(3deg) rotateY(-3deg);
}

.portal-grid{
  position: relative;
  z-index: 1;
}
.portal-grid::before{
  content:"";
  position: absolute;
  inset: -10%;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,.02) 0,
    rgba(255,255,255,.02) 2px,
    transparent 2px,
    transparent 6px
  );
  z-index: -1;
  animation: wobble 12s linear infinite;
}

@keyframes wobble{
  from{ transform: translateX(0); }
  to{   transform: translateX(-40px); }
}

/* --- Disable previous parallax/tilt on thumbs (motion-safe) --- */
.portal-card:hover .thumb-wrap{ transform: none !important; }

/* --- Depth background: gentle funnel toward content --- */
body{
  background:
    radial-gradient(1200px 800px at 50% 20%, rgba(160,140,255,.14), transparent 70%),
    radial-gradient(900px 700px at 50% 90%, rgba(120,210,255,.08), transparent 65%),
    linear-gradient(180deg, #0f0c18 0%, #1a132b 100%) !important;
  background-attachment: fixed;
}

/* Subtle vignette to make center feel closer */
.page::before{
  content:""; position: fixed; inset:0; pointer-events:none;
  background: radial-gradient(70% 50% at 50% 45%, transparent 55%, rgba(0,0,0,.35) 100%);
  z-index: -1;
}

/* --- “Coming at you” card interaction (no wobble) --- */
.portal-card{
  transform: translateY(0) scale(1);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

/* stronger lift + slight scale forward */
.portal-card:hover,
.portal-card:focus-visible{
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 22px 60px rgba(0,0,0,.48),
    0 0 34px rgba(141,124,255,.25);  /* soft halo */
  border-color: rgba(255,255,255,.20);
}

/* inner highlight ridge to enhance 3-D without motion */
.portal-card .body{
  position: relative;
}
.portal-card .body::before{
  content:""; position:absolute; inset:0 0 auto 0; height:1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  opacity:.6;
}

/* Thoughtthoughts corridor image scaling */
.tt-panels img {
  max-width: 45%;   /* shrink image to 70% of its natural width */
  height: auto;     /* keep proportions */
  display: block;
  margin: 1.5rem auto; /* center with breathing space */
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.tt-figure {
  position: relative;
}

.tt-figure::after {
  content: attr(data-ttnum); /* pulls from HTML attribute */
  position: absolute;
  bottom: 6px;
  right: 10px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.2); /* faint, semi-transparent */
  font-style: italic;
  pointer-events: none;
}

.tt-figure::after {
  content: attr(data-ttnum);
  position: absolute;
  bottom: 6px;
  right: 10px;
  font-size: 0.7rem;
  color: rgba(200, 160, 255, 0.35); /* faint violet */
  font-style: italic;
  text-shadow: 0 0 4px rgba(200, 160, 255, 0.5);
  pointer-events: none;
}


.enter-portal{
  display:flex;
  justify-content:center;
  margin: 2.5rem 0 0 0;
}

.portal-button{
  display:inline-block;
  padding: 1rem 2rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-decoration:none;
  color: #fff;
  background: linear-gradient(135deg, #6b4efc, #9d7bff);
  border-radius: 999px;
  box-shadow: 0 8px 25px rgba(0,0,0,.3);
  transition: transform .15s ease, box-shadow .15s ease;
}
.portal-button:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
}

a:hover {
  opacity: 0.85;
  text-decoration: underline;
}














































