/* ============================================================
   PRISM — a starter stylesheet
   Read top to bottom. The interesting part is section 3.
   ============================================================ */

/* 1. TOKENS ------------------------------------------------- */
/* Every color and size lives here. Change one value, the whole
   site follows. Try swapping the four --iris colors first. */

:root {
  --ink:      #08060F;   /* deepest background */
  --ink-2:    #120C20;   /* slightly lifted background */
  --paper:    #EFEBF7;   /* main text */
  --muted:    #948CAC;   /* secondary text */

  --iris-1:   #6FE9FF;   /* cyan   */
  --iris-2:   #B08CFF;   /* violet */
  --iris-3:   #FF8FC8;   /* rose   */
  --iris-4:   #8CFFD1;   /* mint   */

  --edge:     rgba(255,255,255,.14);   /* glass border */
  --panel:    rgba(255,255,255,.045);  /* glass fill   */

  --pad:      clamp(1.25rem, 5vw, 4rem);
  --maxw:     1120px;
}

/* 2. BASE --------------------------------------------------- */

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(60rem 40rem at 15% -10%, #2A1A4D 0%, transparent 60%),
    radial-gradient(50rem 35rem at 95% 20%,  #0E3A4A 0%, transparent 55%),
    linear-gradient(var(--ink), var(--ink-2));
  background-attachment: fixed;
  color: var(--paper);
  font-family: "Karla", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* Keyboard users need to see where they are. */
a:focus-visible {
  outline: 2px solid var(--iris-1);
  outline-offset: 4px;
  border-radius: 4px;
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* 3. THE GLASS + IRIDESCENCE ------------------------------- */
/* Three properties stacked make the whole look:
     a) a nearly-transparent background          -> it's glass
     b) backdrop-filter: blur()                  -> it's frosted
     c) a conic-gradient blob in ::before, set to
        mix-blend-mode: screen                   -> it's oily/iridescent
   The blob is centered on --mx / --my, which the script updates
   from your cursor. isolation:isolate keeps the blend contained. */

.prism {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: 20px;
  background: var(--panel);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.prism::before {
  content: "";
  position: absolute;
  inset: -50%;
  z-index: -1;
  background: conic-gradient(
    from 0deg at var(--mx, 50%) var(--my, 50%),
    var(--iris-1), var(--iris-2), var(--iris-3), var(--iris-4), var(--iris-1)
  );
  filter: blur(34px);
  mix-blend-mode: screen;
  opacity: .14;
  transition: opacity .45s ease;
}

.prism:hover::before,
.prism:focus-within::before { opacity: .48; }

/* A thin lit edge along the top — reads as a light source. */
.prism::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
}

/* 4. HEADER ------------------------------------------------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--pad);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.wordmark {
  font-family: "Michroma", sans-serif;
  font-size: .78rem;
  letter-spacing: .22em;
}

.bar-nav {
  display: flex;
  gap: 1.4rem;
  font-family: "Chakra Petch", sans-serif;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.bar-nav a:hover { color: var(--iris-1); }

/* 5. HERO --------------------------------------------------- */

.hero { padding: clamp(4rem, 12vw, 8rem) 0 clamp(3rem, 8vw, 5rem); }

.eyebrow {
  margin: 0 0 1.5rem;
  font-family: "Chakra Petch", sans-serif;
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Gradient text: paint a gradient, then clip it to the letterforms. */
.title {
  margin: 0;
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -.02em;
  background: linear-gradient(100deg,
    var(--paper) 10%, var(--iris-1) 35%, var(--iris-2) 55%, var(--iris-3) 75%, var(--paper) 95%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: drift 14s ease-in-out infinite alternate;
}

@keyframes drift {
  from { background-position:   0% 50%; }
  to   { background-position: 100% 50%; }
}

.lede {
  max-width: 46ch;
  margin: 1.6rem 0 0;
  color: var(--muted);
}

.rule {
  height: 2px;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border-radius: 2px;
  background: linear-gradient(90deg,
    var(--iris-1), var(--iris-2), var(--iris-3), var(--iris-4));
  opacity: .7;
}

/* 6. SECTIONS ----------------------------------------------- */

.section-label {
  margin: 0 0 1.5rem;
  font-family: "Chakra Petch", sans-serif;
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
}

.rooms, .log, .say { padding: clamp(3rem, 8vw, 5.5rem) 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.6rem;
  min-height: 210px;
  transition: transform .3s ease, border-color .3s ease;
}

.card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.3); }

.card-kind {
  font-family: "Chakra Petch", sans-serif;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--iris-1);
}

.card-title {
  margin: 0;
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -.01em;
}

.card-note {
  margin: 0;
  font-size: .93rem;
  color: var(--muted);
}

.card-go {
  margin-top: auto;
  padding-top: 1rem;
  font-family: "Chakra Petch", sans-serif;
  font-size: .8rem;
  letter-spacing: .1em;
}

/* 7. LOG ---------------------------------------------------- */

.entry { padding: 1.75rem; margin-bottom: 1rem; }

.entry time {
  font-family: "Chakra Petch", sans-serif;
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--iris-3);
}

.entry h3 {
  margin: .5rem 0 .6rem;
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.3rem;
}

.entry p { margin: 0; color: var(--muted); }

.entry code {
  font-size: .85em;
  padding: .1em .4em;
  border-radius: 5px;
  background: rgba(255,255,255,.08);
  color: var(--iris-4);
}

/* 8. CONTACT + FOOTER --------------------------------------- */

.say-line { max-width: 48ch; color: var(--muted); }

.button {
  display: inline-block;
  margin-top: 1.25rem;
  padding: .85rem 1.6rem;
  font-family: "Chakra Petch", sans-serif;
  letter-spacing: .06em;
  border-radius: 999px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem var(--pad) 4rem;
  border-top: 1px solid rgba(255,255,255,.07);
  font-size: .8rem;
  color: var(--muted);
}

/* 9. RESPECT REDUCED MOTION --------------------------------- */

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
