/* kri.cool — dreamy warm portal */

:root {
  --night: #140c0a;
  --ink: #1c100e;
  --ember: #ffb56b;
  --amber: #ffd9a0;
  --peach: #f0b48a;
  --rose: #e8a090;
  --mist: #fff4e8;
  --mist-soft: rgba(255, 244, 232, 0.72);
  --mist-faint: rgba(255, 244, 232, 0.42);
  --glow: rgba(255, 181, 107, 0.45);
  --glow-strong: rgba(255, 210, 150, 0.65);
  --ring: rgba(255, 220, 180, 0.22);

  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --stage-max: 72rem;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --page-gutter: clamp(1.25rem, 5.5vw, 1.75rem);
}

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

html {
  color-scheme: dark;
  background: var(--night);
}

body {
  margin: 0;
  min-height: 100dvh;
  min-height: 100svh;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--mist);
  background: var(--night);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* —— Atmosphere —— */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 55% at 50% 28%, #4a2a1c 0%, transparent 58%),
    radial-gradient(ellipse 70% 45% at 50% 55%, #2a1612 0%, transparent 55%),
    radial-gradient(ellipse 100% 70% at 50% 100%, #0a0605 0%, var(--night) 72%);
}

.wash {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.6;
  mix-blend-mode: screen;
  will-change: transform;
}

.wash-a {
  width: min(92vw, 34rem);
  height: min(92vw, 34rem);
  top: 12%;
  left: 50%;
  translate: -50% 0;
  background: radial-gradient(circle, rgba(255, 170, 100, 0.58) 0%, transparent 70%);
  animation: drift-a 18s ease-in-out infinite alternate;
}

.wash-b {
  width: min(70vw, 26rem);
  height: min(70vw, 26rem);
  bottom: 8%;
  left: 50%;
  translate: -40% 0;
  background: radial-gradient(circle, rgba(230, 120, 90, 0.32) 0%, transparent 70%);
  animation: drift-b 22s ease-in-out infinite alternate;
}

.vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 85% 55% at 50% 38%, transparent 22%, rgba(10, 6, 5, 0.5) 100%),
    linear-gradient(to top, rgba(10, 6, 5, 0.82) 0%, transparent 32%),
    linear-gradient(to bottom, rgba(10, 6, 5, 0.35) 0%, transparent 18%);
}

.embers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes drift-a {
  from {
    transform: translate(-4%, -2%) scale(1);
  }
  to {
    transform: translate(3%, 4%) scale(1.08);
  }
}

@keyframes drift-b {
  from {
    transform: translate(2%, 0) scale(1);
  }
  to {
    transform: translate(-5%, -3%) scale(1.12);
  }
}

/* —— Stage layout (mobile-first poster) —— */

.stage {
  position: relative;
  z-index: 1;
  width: min(100% - (var(--page-gutter) * 2), var(--stage-max));
  margin: 0 auto;
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding:
    calc(1.15rem + var(--safe-top))
    0
    calc(4.75rem + var(--safe-bottom));
  text-align: center;
}

/* —— Mast / wordmark —— */

.mast {
  position: relative;
  width: 100%;
  max-width: 22rem;
  margin: 0 0 1.35rem;
  animation: rise 1.1s var(--ease-out) both;
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--mist-faint);
}

.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.85rem, 12.5vw, 3.6rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--mist);
  text-shadow: 0 0 40px rgba(255, 180, 100, 0.18);
}

.wordmark-name {
  font-style: italic;
  font-weight: 400;
}

.wordmark-dot {
  color: var(--ember);
  margin-inline: 0.02em;
}

.wordmark-tld {
  font-weight: 400;
  opacity: 0.88;
}

.mast::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 1px;
  margin: 0.95rem auto 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 200, 140, 0.55),
    transparent
  );
}

/* —— Portrait —— */

.portrait {
  position: relative;
  margin: 0 0 1.5rem;
  width: min(78vw, 19.5rem);
  aspect-ratio: 1;
  flex-shrink: 0;
  animation: rise 1.2s var(--ease-out) 0.12s both;
}

.portrait-glow {
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 190, 120, 0.55) 0%,
    rgba(255, 150, 90, 0.22) 42%,
    transparent 68%
  );
  filter: blur(16px);
  animation: breathe 5.5s ease-in-out infinite;
  z-index: 0;
}

.portrait-ring {
  position: absolute;
  inset: -5.5%;
  border-radius: 50%;
  border: 1px solid var(--ring);
  box-shadow:
    0 0 40px rgba(255, 180, 100, 0.14),
    inset 0 0 40px rgba(255, 180, 100, 0.06);
  z-index: 1;
  pointer-events: none;
  animation: ring-pulse 5.5s ease-in-out infinite;
}

.portrait img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(255, 220, 180, 0.2),
    0 18px 48px rgba(0, 0, 0, 0.5),
    0 0 72px rgba(255, 160, 90, 0.32);
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

@keyframes ring-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.015);
    opacity: 1;
  }
}

/* —— Aside copy —— */

.aside {
  width: 100%;
  max-width: 21rem;
  margin: 0;
  animation: rise 1.25s var(--ease-out) 0.22s both;
}

.lede {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 5.2vw, 1.55rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  color: var(--mist);
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.lede br {
  display: none;
}

.note {
  margin: 0 auto 1.25rem;
  max-width: 18.5rem;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--mist-soft);
  text-wrap: pretty;
}

.hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.55rem 0.95rem;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist-soft);
  border: 1px solid rgba(255, 210, 160, 0.18);
  border-radius: 999px;
  background: rgba(255, 200, 140, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 24px rgba(255, 160, 90, 0.08);
  transition:
    opacity 0.6s ease,
    color 0.4s ease,
    border-color 0.4s ease,
    background 0.4s ease;
}

.hint.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* —— Footer —— */

.foot {
  position: fixed;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem calc(0.85rem + var(--safe-bottom));
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist-faint);
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(10, 6, 5, 0.72) 0%,
    rgba(10, 6, 5, 0.28) 55%,
    transparent 100%
  );
}

.foot-mark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--mist-soft);
}

.foot-sep {
  opacity: 0.45;
}

.foot-line {
  opacity: 0.85;
}

/* —— Motion —— */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.9rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— A11y —— */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .wash,
  .portrait-glow,
  .portrait-ring {
    animation: none !important;
  }

  .mast,
  .portrait,
  .aside {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

/* —— Compact phones (short viewport) —— */

@media (max-height: 720px) and (max-width: 879px) {
  .stage {
    padding-top: calc(0.75rem + var(--safe-top));
    padding-bottom: calc(3.85rem + var(--safe-bottom));
    justify-content: safe center;
  }

  .mast {
    margin-bottom: 0.85rem;
  }

  .mast::after {
    margin-top: 0.65rem;
  }

  .eyebrow {
    font-size: 0.6rem;
    margin-bottom: 0.25rem;
  }

  .wordmark {
    font-size: clamp(2.35rem, 10vw, 2.9rem);
  }

  .portrait {
    width: min(58vw, 14.5rem);
    margin-bottom: 1rem;
  }

  .lede {
    font-size: 1.15rem;
    margin-bottom: 0.55rem;
  }

  .note {
    font-size: 0.84rem;
    line-height: 1.5;
    margin-bottom: 0.9rem;
  }

  .hint {
    padding: 0.45rem 0.8rem;
    font-size: 0.58rem;
  }
}

/* Very short landscape / tiny phones */
@media (max-height: 560px) and (max-width: 879px) {
  .stage {
    justify-content: flex-start;
    padding-top: calc(0.6rem + var(--safe-top));
  }

  .portrait {
    width: min(42vw, 11.5rem);
    margin-bottom: 0.75rem;
  }

  .mast {
    margin-bottom: 0.55rem;
  }

  .note {
    display: none;
  }
}

/* —— Tablet+ —— */

@media (min-width: 600px) and (max-width: 879px) {
  .portrait {
    width: min(52vw, 20rem);
  }

  .lede {
    font-size: 1.5rem;
  }

  .lede br {
    display: revert;
  }

  .note {
    max-width: 22rem;
    font-size: 0.95rem;
  }
}

/* —— Desktop: three-column composition —— */

@media (min-width: 880px) {
  .atmosphere {
    background:
      radial-gradient(ellipse 80% 60% at 50% 35%, #3a2218 0%, transparent 55%),
      radial-gradient(ellipse 50% 40% at 70% 70%, #2a1612 0%, transparent 50%),
      radial-gradient(ellipse 100% 80% at 50% 100%, #0a0605 0%, var(--night) 70%);
  }

  .wash-a {
    width: min(70vw, 34rem);
    height: min(70vw, 34rem);
    top: 8%;
  }

  .wash-b {
    width: min(55vw, 26rem);
    height: min(55vw, 26rem);
    bottom: 5%;
    right: 10%;
    left: auto;
    translate: 0 0;
  }

  .vignette {
    background:
      radial-gradient(ellipse 70% 60% at 50% 45%, transparent 30%, rgba(10, 6, 5, 0.55) 100%),
      linear-gradient(to top, rgba(10, 6, 5, 0.75) 0%, transparent 28%);
  }

  .stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-rows: 1fr;
    align-items: center;
    justify-items: stretch;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    text-align: left;
    padding-block: clamp(2rem, 5vh, 4rem) clamp(4rem, 8vh, 5rem);
  }

  .mast {
    text-align: left;
    justify-self: end;
    max-width: 16rem;
    margin: 0;
  }

  .mast::after {
    margin-left: 0;
    margin-right: auto;
    width: 2rem;
    background: linear-gradient(
      90deg,
      rgba(255, 200, 140, 0.55),
      transparent
    );
  }

  .eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    margin-bottom: 0.65rem;
  }

  .wordmark {
    font-size: clamp(2.75rem, 4.2vw, 4.25rem);
    text-shadow: none;
  }

  .portrait {
    justify-self: center;
    width: min(100%, 26rem);
    margin: 0;
  }

  .aside {
    text-align: left;
    justify-self: start;
    max-width: 22rem;
    margin: 0;
  }

  .lede {
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    margin-bottom: 1rem;
  }

  .lede br {
    display: revert;
  }

  .note {
    margin: 0 0 1.35rem;
    max-width: none;
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .hint {
    /* Desktop: quieter text label instead of chip */
    display: block;
    width: fit-content;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    color: var(--mist-faint);
  }

  .foot {
    padding: 1rem 1.25rem calc(1.1rem + var(--safe-bottom));
    font-size: 0.72rem;
    background: linear-gradient(to top, rgba(10, 6, 5, 0.55), transparent);
  }
}

@media (min-width: 1100px) {
  .portrait {
    width: min(100%, 28rem);
  }
}
