/* =========================================================
   VALRYN HOME
   Responsive production stylesheet
========================================================= */

:root {
  --home-header-height: 88px;
  --home-bg: #02050b;
  --home-gold: #d4af37;
  --home-gold-light: #ffe36d;
  --home-text: #ffffff;
  --home-muted: rgba(255, 255, 255, 0.76);
  --home-border: rgba(255, 255, 255, 0.12);
}

/* =========================================================
   DOCUMENT
========================================================= */

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--home-header-height);
}

body.home-page {
  min-width: 320px;
  min-height: 100svh;

  overflow-x: hidden;
  overflow-y: auto;

  background: var(--home-bg);
  color: var(--home-text);
}

body.home-page main {
  width: 100%;
  min-width: 0;
}

/* Respect the native hidden attribute. */
[hidden] {
  display: none !important;
}

/* =========================================================
   HOME HEADER
========================================================= */

.home-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  width: 100%;
  min-height: var(--home-header-height);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  padding:
    12px
    clamp(20px, 5vw, 80px);

  background: rgba(4, 12, 28, 0.94);
  border-bottom: 1px solid var(--home-border);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-logo {
  width: 64px;
  height: 64px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  text-decoration: none;
}

.header-logo img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;

  filter:
    drop-shadow(0 0 12px rgba(255, 255, 255, 0.16))
    drop-shadow(0 0 22px rgba(212, 175, 55, 0.18));
}

.header-actions {
  min-width: 0;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;

  flex-wrap: wrap;
}

.header-button {
  min-height: 42px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 18px;

  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;

  background: rgba(255, 255, 255, 0.04);
  color: var(--home-text);

  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;

  text-decoration: none;
  white-space: nowrap;

  cursor: pointer;

  transition:
    color 0.25s ease,
    border-color 0.25s ease,
    background-color 0.25s ease,
    transform 0.25s ease;
}

.header-button:hover,
.header-button:focus-visible {
  color: var(--home-gold-light);

  border-color: rgba(255, 227, 109, 0.5);
  background: rgba(255, 227, 109, 0.08);

  transform: translateY(-2px);
}

.header-button:focus-visible,
.header-logo:focus-visible,
.hero-enter-button:focus-visible {
  outline: 3px solid rgba(255, 227, 109, 0.44);
  outline-offset: 3px;
}

.header-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
}

/* =========================================================
   HOME HERO
========================================================= */

.home-hero {
  position: relative;
  isolation: isolate;

  width: 100%;

  min-height:
    calc(
      100svh -
      var(--home-header-height)
    );

  display: grid;
  place-items: center;

  overflow: clip;

  background:
    linear-gradient(
      180deg,
      rgba(2, 6, 14, 0.42) 0%,
      rgba(2, 7, 17, 0.44) 42%,
      rgba(1, 4, 10, 0.84) 100%
    ),
    radial-gradient(
      circle at 50% 25%,
      rgba(255, 255, 255, 0.14),
      transparent 34%
    ),
    url("../assets/images/earth.jpg")
      center 54% / cover
      no-repeat;
}

.home-hero::before {
  content: "";

  position: absolute;
  inset: 0;
  z-index: -2;

  background:
    radial-gradient(
      circle at 50% 55%,
      rgba(26, 111, 255, 0.25),
      transparent 43%
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.05),
      transparent 27%,
      transparent 73%,
      rgba(212, 175, 55, 0.08)
    );

  pointer-events: none;
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;

  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.1),
      rgba(0, 0, 0, 0.7)
    );

  pointer-events: none;
}

.home-hero-content {
  width: min(1000px, calc(100% - 32px));

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding:
    clamp(28px, 5vh, 54px)
    18px
    clamp(38px, 6vh, 70px);

  text-align: center;
}

/* =========================================================
   DATE AND TIME
========================================================= */

.daily-date-card {
  max-width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 26px);

  margin-bottom: clamp(14px, 2vh, 22px);
  padding:
    10px
    clamp(18px, 3vw, 34px);

  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;

  background: rgba(4, 12, 28, 0.68);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.24);
}

.daily-date-card p,
.daily-date-card strong,
.daily-date-card span {
  margin: 0;

  color: var(--home-text);

  font-size: clamp(0.8rem, 1.2vw, 1rem);
  font-weight: 800;

  white-space: nowrap;
}

/* =========================================================
   MAIN LOGO
========================================================= */

.home-main-logo {
  display: block;

  width: clamp(150px, 20vw, 260px);
  height: auto;
  max-height: 230px;

  margin:
    0
    auto
    clamp(8px, 1.4vh, 14px);

  object-fit: contain;

  filter:
    drop-shadow(0 0 18px rgba(255, 255, 255, 0.2))
    drop-shadow(0 0 44px rgba(39, 112, 255, 0.42));
}

/* =========================================================
   HOME TEXT
========================================================= */

.home-hero .eyebrow {
  margin: 0;

  color: var(--home-gold-light);

  font-size: clamp(0.68rem, 1.2vw, 0.88rem);
  font-weight: 900;

  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.home-hero h1 {
  max-width: 1000px;

  margin:
    clamp(8px, 1.2vh, 14px)
    0
    0;

  color: var(--home-text);

  font-size: clamp(2.35rem, 5.6vw, 5.25rem);
  line-height: 0.98;

  text-wrap: balance;

  text-shadow:
    0 0 22px rgba(255, 255, 255, 0.22),
    0 0 54px rgba(53, 124, 255, 0.28);
}

#dailyMotivation {
  margin:
    clamp(12px, 1.8vh, 20px)
    0
    0;

  color: var(--home-gold-light);

  font-size: clamp(1.2rem, 2.2vw, 2rem);
  line-height: 1.2;

  text-wrap: balance;
}

#dailyMessage {
  max-width: 790px;

  margin:
    clamp(8px, 1.3vh, 14px)
    auto
    0;

  color: rgba(255, 255, 255, 0.88);

  font-size: clamp(0.92rem, 1.35vw, 1.12rem);
  line-height: 1.5;

  text-wrap: balance;
}

/* =========================================================
   SCRIPTURE PANEL
========================================================= */

.daily-verse {
  width: min(820px, 100%);

  margin-top: clamp(14px, 2vh, 22px);
  padding:
    clamp(14px, 2vh, 20px)
    clamp(18px, 3vw, 34px);

  border: 1px solid rgba(255, 227, 109, 0.2);
  border-radius: 18px;

  background: rgba(2, 8, 20, 0.6);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.25),
    0 0 30px rgba(212, 175, 55, 0.08);
}

.verse-title {
  margin: 0 0 7px;

  color: var(--home-gold-light);

  font-size: clamp(1rem, 1.8vw, 1.4rem);
  font-weight: 900;
}

#dailyVerse {
  margin: 0;

  color: var(--home-text);

  font-size: clamp(1rem, 1.7vw, 1.35rem);
  font-weight: 700;
  line-height: 1.42;

  text-wrap: balance;
}

#dailyVerseReference {
  display: block;

  margin-top: 7px;

  color: rgba(255, 255, 255, 0.82);

  font-size: clamp(0.88rem, 1.25vw, 1rem);
  font-weight: 800;
}

/* =========================================================
   EXPLORE / DASHBOARD BUTTON
========================================================= */

.hero-enter-button {
  position: relative;
  z-index: 5;

  min-width: 210px;
  min-height: 50px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  margin-top: clamp(16px, 2.4vh, 26px);
  padding: 12px 28px;

  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 13px;

  background:
    linear-gradient(
      180deg,
      #fff18a,
      var(--home-gold)
    );

  color: #07101f;

  font-size: 1rem;
  font-weight: 900;

  text-decoration: none;

  box-shadow:
    0 0 28px rgba(212, 175, 55, 0.38),
    0 14px 35px rgba(0, 0, 0, 0.3);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.hero-enter-button:hover {
  transform: translateY(-4px);

  box-shadow:
    0 0 42px rgba(212, 175, 55, 0.52),
    0 18px 44px rgba(0, 0, 0, 0.36);
}

/* =========================================================
   FOOTER
========================================================= */

.home-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding:
    24px
    clamp(20px, 5vw, 80px);

  color: rgba(255, 255, 255, 0.65);

  background: #010204;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.home-footer p {
  margin: 0;
}

/* =========================================================
   LEGACY TOPBAR SUPPORT
========================================================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;

  width: 100%;
  min-height: var(--home-header-height);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;

  padding:
    12px
    clamp(20px, 5vw, 80px);

  background: rgba(4, 12, 28, 0.96);
  border-bottom: 1px solid var(--home-border);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;

  flex: 0 0 auto;

  color: var(--home-text);
  text-decoration: none;

  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 900;
  letter-spacing: 0.16em;
}

.top-logo {
  width: 54px;
  height: 54px;

  object-fit: contain;
}

.topbar nav {
  min-width: 0;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 2vw, 32px);

  overflow-x: auto;

  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.topbar nav::-webkit-scrollbar {
  display: none;
}

.topbar nav a {
  flex: 0 0 auto;

  color: var(--home-text);
  text-decoration: none;

  font-size: 0.96rem;
  font-weight: 800;
}

.topbar nav a:hover,
.topbar nav a.active,
.topbar nav a[aria-current="page"] {
  color: var(--home-gold-light);
}

/* =========================================================
   COMMAND CENTER SUPPORT
========================================================= */

.command-center {
  width: 100%;
  min-height:
    calc(
      100svh -
      var(--home-header-height)
    );

  padding:
    clamp(36px, 5vw, 70px)
    clamp(20px, 5vw, 78px);

  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(27, 74, 145, 0.22),
      transparent 42%
    ),
    var(--home-bg);
}

.command-center-heading h2 {
  margin: 9px 0 0;

  color: var(--home-text);

  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
}

.command-center-heading > p:not(.eyebrow) {
  margin: 10px 0 0;

  color: rgba(255, 255, 255, 0.7);

  font-size: clamp(0.9rem, 1.3vw, 1.05rem);
}

.command-grid {
  display: grid;
  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: clamp(12px, 1.5vw, 18px);

  margin-top: clamp(22px, 3vw, 34px);
}

.command-card {
  min-width: 0;
  min-height: 132px;

  display: flex;
  align-items: center;
  gap: 16px;

  padding: clamp(16px, 1.8vw, 24px);

  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 18px;

  background:
    radial-gradient(
      circle at top right,
      rgba(41, 106, 207, 0.17),
      transparent 45%
    ),
    rgba(255, 255, 255, 0.035);

  color: var(--home-text);
  text-decoration: none;

  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.22);

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.command-card:hover {
  transform: translateY(-5px);

  border-color: rgba(255, 227, 109, 0.58);

  box-shadow:
    0 20px 46px rgba(0, 0, 0, 0.36),
    0 0 26px rgba(212, 175, 55, 0.12);
}

.command-icon {
  flex: 0 0 auto;

  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}

.command-card h3 {
  margin: 0;

  color: var(--home-gold-light);

  font-size: clamp(1rem, 1.45vw, 1.3rem);
  line-height: 1.2;
}

.command-card p {
  margin: 7px 0 0;

  color: rgba(255, 255, 255, 0.7);

  font-size: clamp(0.76rem, 1vw, 0.94rem);
  line-height: 1.4;
}

/* =========================================================
   LAPTOPS AND TABLETS
========================================================= */

@media (max-width: 1050px) {

  .command-grid {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );
  }

}

@media (max-width: 820px) {

  :root {
    --home-header-height: 76px;
  }

  .home-header {
    gap: 14px;

    padding:
      10px
      18px;
  }

  .header-logo {
    width: 52px;
    height: 52px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-button {
    min-height: 40px;

    padding:
      9px
      13px;

    font-size: 0.84rem;
  }

  .home-main-logo {
    width: clamp(145px, 30vw, 220px);
  }

  .command-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

  :root {
    --home-header-height: auto;
  }

  html {
    scroll-padding-top: 0;
  }

  .home-header {
    position: sticky;

    min-height: 70px;
    height: auto;

    gap: 10px;

    padding:
      10px
      12px;
  }

  .header-logo {
    width: 46px;
    height: 46px;
  }

  .header-actions {
    justify-content: flex-end;
    gap: 7px;
  }

  .header-button {
    min-height: 38px;

    padding:
      8px
      11px;

    font-size: 0.76rem;
  }

  .home-hero {
    min-height:
      calc(
        100svh -
        70px
      );

    overflow: visible;

    background-position:
      center
      52%;
  }

  .home-hero-content {
    width: min(100%, 560px);

    padding:
      24px
      14px
      38px;
  }

  .daily-date-card {
    width: 100%;

    flex-wrap: wrap;
    gap: 6px 14px;

    border-radius: 18px;

    padding:
      10px
      14px;
  }

  .daily-date-card p,
  .daily-date-card strong,
  .daily-date-card span {
    font-size: 0.78rem;
  }

  .home-main-logo {
    width: clamp(135px, 46vw, 205px);
    max-height: 185px;
  }

  .home-hero .eyebrow {
    letter-spacing: 0.2em;
  }

  .home-hero h1 {
    font-size: clamp(2.2rem, 12vw, 3.5rem);
  }

  #dailyMotivation {
    font-size: clamp(1.1rem, 5.5vw, 1.55rem);
  }

  .daily-verse {
    border-radius: 15px;

    padding:
      14px
      16px;
  }

  .hero-enter-button {
    width: min(100%, 300px);
    min-width: 0;
  }

  .home-footer {
    flex-direction: column;
    align-items: flex-start;

    padding:
      22px
      18px;
  }

  .topbar {
    min-height: 0;

    flex-direction: column;
    align-items: stretch;

    gap: 8px;

    padding:
      10px
      14px;
  }

  .topbar nav {
    width: 100%;

    justify-content: flex-start;

    padding-bottom: 3px;
  }

  .command-center {
    padding:
      36px
      16px;
  }

  .command-grid {
    grid-template-columns: 1fr;
  }

  .command-card {
    min-height: 110px;
  }

}

/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 390px) {

  .home-header {
    align-items: center;
  }

  .header-logo {
    width: 42px;
    height: 42px;
  }

  .header-button {
    padding:
      8px
      9px;

    font-size: 0.72rem;
  }

  .home-hero-content {
    padding-left: 10px;
    padding-right: 10px;
  }

  .daily-date-card {
    flex-direction: column;
    gap: 3px;
  }

  .home-main-logo {
    width: 145px;
  }

  .home-hero h1 {
    font-size: clamp(2rem, 11vw, 2.8rem);
  }

}

/* =========================================================
   SHORT SCREENS
========================================================= */

@media (min-width: 601px) and (max-height: 760px) {

  .home-hero-content {
    padding-top: 18px;
    padding-bottom: 28px;
  }

  .daily-date-card {
    margin-bottom: 10px;
  }

  .home-main-logo {
    width: clamp(115px, 17vh, 170px);
    max-height: 150px;
  }

  .home-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
  }

  #dailyMotivation {
    margin-top: 10px;

    font-size: clamp(1.05rem, 1.8vw, 1.5rem);
  }

  #dailyMessage {
    margin-top: 7px;

    font-size: 0.92rem;
  }

  .daily-verse {
    margin-top: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .hero-enter-button {
    min-height: 44px;

    margin-top: 12px;
  }

}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

  .header-button,
  .hero-enter-button,
  .command-card {
    transition: none;
  }

}