/*
Theme Name: Lilac Hour
Author: 1on1jerkoff.com
Description: A quiet daylight theme with two soft screens and one long read.
License: GNU General Public License v2 or later
Text Domain: lilac-hour
*/

@font-face {
  font-family: 'Rethink Sans';
  src: url('fonts/rethink-latin.woff2') format('woff2-variations'), url('fonts/rethink-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Rethink Sans';
  src: url('fonts/rethink-latin-ext.woff2') format('woff2-variations'), url('fonts/rethink-latin-ext.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --lh-ground: #fdfcff;
  --lh-mist: #f6f2fc;
  --lh-lilac: #e3d3fa;
  --lh-hair: #e7e0f4;
  --lh-ink: #2a2140;
  --lh-soft: #665c7d;
  --lh-violet: #6d3fd4;
  --lh-violet-deep: #5a30b8;
  --lh-column: 43rem;
  --lh-wide: 70rem;
  --lh-gutter: clamp(1rem, 3.5vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--lh-ground);
  color: var(--lh-ink);
  font: 400 1.0625rem/1.68 'Rethink Sans', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--lh-violet-deep); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--lh-violet); }
:focus-visible { outline: 2px solid var(--lh-violet); outline-offset: 3px; border-radius: 0.25rem; }
main:focus { outline: none; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 30;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.5rem 0.9rem;
  clip: auto;
  overflow: visible;
  background: #fff;
  border-radius: 0.5rem;
}

#page { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1 0 auto; }
.lh-wrap { width: min(100%, var(--lh-wide)); margin-inline: auto; padding-inline: var(--lh-gutter); }

/* Top line: small wordmark, language list */
.site-header { padding-block: clamp(0.45rem, 1.4vh, 0.9rem); }
.lh-topline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-title { margin: 0; font-size: 1.02rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }
.site-title a { color: var(--lh-ink); text-decoration: none; }
.site-title b { font-weight: 800; color: var(--lh-violet); }

.lh-lang { position: relative; flex: none; font-size: 0.94rem; }
.lh-lang summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  color: var(--lh-ink);
  cursor: pointer;
  list-style: none;
}
.lh-lang summary::-webkit-details-marker { display: none; }
.lh-lang summary:hover, .lh-lang[open] summary { background: var(--lh-mist); }
.lh-lang summary::after {
  content: '';
  width: 0.42rem;
  height: 0.42rem;
  margin-top: -0.2rem;
  border-right: 1.5px solid var(--lh-soft);
  border-bottom: 1.5px solid var(--lh-soft);
  transform: rotate(45deg);
}
.lh-lang ul {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 20;
  min-width: 10.5rem;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: #fff;
  border: 1px solid var(--lh-hair);
  border-radius: 0.9rem;
  box-shadow: 0 18px 40px -22px rgba(64, 36, 130, 0.45);
}
.lh-lang li a { display: block; padding: 0.38rem 0.7rem; border-radius: 0.55rem; color: var(--lh-ink); text-decoration: none; }
.lh-lang li a:hover { background: var(--lh-mist); }
.lh-lang li a[aria-current='page'] { color: var(--lh-violet-deep); font-weight: 700; }

/* First screen */
.lh-opening { padding-block: clamp(0.15rem, 1.4vh, 1.4rem) clamp(2.5rem, 6vh, 4rem); }
.lh-opening .entry-header { display: grid; gap: 0.5rem; margin-bottom: clamp(0.8rem, 2.2vh, 1.7rem); }
.entry-title {
  margin: 0;
  font-size: clamp(1.95rem, 1.25rem + 2.9vw, 3.3rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.lh-lede { margin: 0; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.17rem); line-height: 1.45; color: var(--lh-soft); }

.lh-frame {
  padding: clamp(0.45rem, 1vw, 0.7rem);
  background: #fff;
  border: 1px solid var(--lh-hair);
  border-radius: 1.6rem;
  box-shadow: 0 30px 70px -44px rgba(82, 44, 170, 0.5);
}
.lh-tiles { display: grid; grid-template-columns: 1fr; gap: clamp(0.45rem, 1vw, 0.7rem); }
.lh-tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: clamp(4.1rem, 12vh, 6.5rem);
  padding: 0.5rem;
  border-radius: 1.15rem;
  overflow: hidden;
}
.lh-tile--you {
  background:
    radial-gradient(58% 80% at 24% 30%, #fbe2d4 0, rgba(251, 226, 212, 0) 72%),
    radial-gradient(60% 85% at 80% 72%, #dfcdf9 0, rgba(223, 205, 249, 0) 74%),
    radial-gradient(45% 60% at 58% 12%, #f8dbeb 0, rgba(248, 219, 235, 0) 72%),
    #f3edfb;
}
.lh-tile--them {
  background:
    radial-gradient(60% 85% at 72% 26%, #cdb0f4 0, rgba(205, 176, 244, 0) 72%),
    radial-gradient(58% 85% at 22% 76%, #efb1d0 0, rgba(239, 177, 208, 0) 74%),
    radial-gradient(44% 62% at 88% 88%, #ab8fec 0, rgba(171, 143, 236, 0) 72%),
    #e8ddf8;
}
.lh-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(48% 70% at 42% 56%, rgba(255, 255, 255, 0.62) 0, rgba(255, 255, 255, 0) 74%);
  animation: lh-breathe 11s ease-in-out infinite alternate;
}
.lh-tile--them::before { animation-delay: -5s; }
@keyframes lh-breathe { from { opacity: 0.25; } to { opacity: 1; } }
.lh-tile span {
  position: relative;
  padding: 0.16rem 0.68rem;
  font-size: 0.86rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
}
.lh-controls { display: grid; justify-items: center; gap: clamp(0.55rem, 1.2vh, 0.85rem); padding: clamp(0.55rem, 1.5vh, 1.3rem) clamp(0.45rem, 2vw, 1.25rem) clamp(0.5rem, 1.2vh, 1rem); text-align: center; }

/* 18+ switch, part of the frame from the first load */
.lh-age { display: grid; justify-items: center; gap: 0.3rem; width: min(100%, 36rem); }
.lh-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  min-height: 2.6rem;
  padding: 0.2rem 0.4rem;
  font: inherit;
  font-size: 1.07rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--lh-ink);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.lh-switch__track {
  position: relative;
  flex: none;
  width: 3.1rem;
  height: 1.8rem;
  background: var(--lh-lilac);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(90, 48, 184, 0.28);
  transition: background-color 0.1s linear;
}
.lh-switch__track::after {
  content: '';
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.4rem;
  height: 1.4rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(42, 33, 64, 0.35);
  transition: transform 0.1s ease-out;
}
.lh-switch[aria-checked='true'] .lh-switch__track { background: var(--lh-violet); }
.lh-switch[aria-checked='true'] .lh-switch__track::after { transform: translateX(1.3rem); }
.lh-age.lh-asked .lh-switch { color: var(--lh-violet-deep); }
.lh-age.lh-asked .lh-switch__track { box-shadow: inset 0 0 0 2px var(--lh-violet); animation: lh-nudge 0.5s ease-out 1; }
@keyframes lh-nudge { 25% { transform: translateX(-3px); } 60% { transform: translateX(3px); } }
.lh-age__note { margin: 0; font-size: clamp(0.8rem, 0.78rem + 0.15vw, 0.86rem); line-height: 1.4; color: var(--lh-soft); }
.lh-age__note a { color: var(--lh-soft); white-space: nowrap; }
.lh-age-plain { display: none; margin: 0; font-size: 0.92rem; font-weight: 600; }
html:not(.lh-age-open) .lh-age { display: none; }
.no-js .lh-age { display: none; }
.no-js .lh-age-plain { display: block; }

/* Start */
.wp-element-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.5rem;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  background: var(--lh-violet);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}
.wp-element-button:hover { color: #fff; background: var(--lh-violet-deep); }
.lh-start--main {
  width: min(100%, 25rem);
  min-height: clamp(3.2rem, 7vh, 3.6rem);
  font-size: 1.2rem;
  box-shadow: 0 16px 30px -16px rgba(109, 63, 212, 0.85);
}
.js.lh-age-open a[data-lh-start], .js.lh-age-open a[data-lh-start]:hover { color: var(--lh-violet-deep); background: var(--lh-lilac); box-shadow: none; cursor: not-allowed; }
.lh-small { margin: 0; max-width: 40rem; font-size: clamp(0.76rem, 0.74rem + 0.12vw, 0.82rem); line-height: 1.4; color: var(--lh-soft); }
.lh-strict { display: none; margin: 0; max-width: 40rem; font-size: 0.86rem; line-height: 1.45; font-weight: 600; color: var(--lh-violet-deep); }
[data-dk-hand='link'] .lh-strict { display: block; }

/* The long read: one quiet column */
.entry-content, .lh-column { width: min(100%, var(--lh-column)); margin-inline: auto; padding-inline: var(--lh-gutter); }
.entry-content { padding-bottom: clamp(2.5rem, 7vh, 4.5rem); }
.entry-content h2, .lh-column h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.42rem, 1.2rem + 1vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.entry-content p, .lh-column p { margin: 0 0 1rem; }
.entry-content ul, .lh-column ul, .lh-column ol { margin: 0 0 1.15rem; padding-left: 1.2rem; }
.entry-content li, .lh-column li { margin-bottom: 0.4rem; }
.entry-content li::marker { color: var(--lh-violet); }
.lh-part { margin-top: clamp(2.4rem, 6vh, 3.5rem); }
.lh-when { margin: 0 0 0.3rem !important; font-size: 0.9rem; font-weight: 600; color: var(--lh-violet-deep); }
.lh-tip { padding-left: 1rem; color: var(--lh-soft); border-left: 2px solid var(--lh-lilac); }
.lh-tip b { color: var(--lh-ink); font-weight: 700; }

.wp-block-table { margin: 1.3rem 0 1.5rem; }
.wp-block-table table { width: 100%; border-collapse: collapse; font-size: 0.98rem; line-height: 1.45; }
.wp-block-table th, .wp-block-table td { padding: 0.7rem 0.9rem 0.7rem 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--lh-hair); }
.wp-block-table thead th { padding-block: 0 0.45rem; font-size: 0.86rem; font-weight: 600; color: var(--lh-soft); }
.wp-block-table tbody th { font-weight: 600; }
.lh-again { margin-top: 1.4rem; }

.lh-q { display: block; margin: 0; padding: 0.85rem 0; font-size: 1em; font-weight: 600; line-height: 1.35; }
.entry-content .lh-a { margin: 0; padding-bottom: 1rem; color: var(--lh-soft); border-bottom: 1px solid var(--lh-hair); }
.lh-outro { margin-top: 2rem !important; font-size: 1.14rem; line-height: 1.55; }

/* Legal pages, 404, contact */
.lh-column { padding-block: clamp(1rem, 4vh, 2.5rem) clamp(2.5rem, 7vh, 4.5rem); }
.lh-column h1 { margin-bottom: 0.5rem; font-size: clamp(1.8rem, 1.4rem + 1.7vw, 2.5rem); }
.lh-column h2 { margin-top: 2rem; font-size: 1.28rem; }
.lh-dated { color: var(--lh-soft); font-size: 0.92rem; }
.lh-column code { padding: 0.05rem 0.34rem; font-size: 0.92em; background: var(--lh-mist); border-radius: 0.3rem; }
.lh-strictline { display: none; width: min(100%, var(--lh-column)); margin: 0.5rem auto 0; padding-inline: var(--lh-gutter); font-size: 0.92rem; font-weight: 600; color: var(--lh-violet-deep); }
[data-dk-hand='link'] .lh-strictline { display: block; }
.lh-form { display: grid; gap: 0.35rem; margin-top: 1.4rem; }
.lh-form label { margin-top: 0.85rem; font-weight: 600; }
.lh-form-hint { display: block; font-size: 0.86rem; font-weight: 400; color: var(--lh-soft); }
.lh-form input, .lh-form select, .lh-form textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid #cdc2e6;
  border-radius: 0.7rem;
}
.lh-form-trap { position: absolute; left: -200vw; width: 1px; height: 1px; }
.lh-form-privacy { margin: 0.9rem 0 0.4rem !important; font-size: 0.9rem; color: var(--lh-soft); }
.lh-form .wp-element-button { justify-self: start; min-height: 3rem; }

/* Footer */
.site-footer { padding-block: 2.2rem 1.6rem; font-size: 0.9rem; line-height: 1.55; color: var(--lh-soft); background: var(--lh-mist); }
.site-footer p { margin: 0 0 0.9rem; max-width: 46rem; }
.site-footer .menu { display: flex; flex-wrap: wrap; gap: 0.35rem 1.15rem; margin: 0 0 0.9rem; padding: 0; list-style: none; }
.site-footer a { color: var(--lh-ink); }
.lh-legalhead { margin-bottom: 0.35rem !important; font-weight: 600; color: var(--lh-ink); }
.site-info { margin: 0; }

/* Two screens side by side from tablet width */
@media (min-width: 40rem) {
  .lh-tiles { grid-template-columns: 1fr 1fr; }
  .lh-tile { height: clamp(11rem, 33vh, 21rem); padding: 0.85rem; }
}
@media (min-width: 62rem) {
  .lh-opening .entry-header { grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: end; }
  .lh-lede { padding-bottom: 0.3rem; }
}
/* Very short windows keep Start in view */
@media (max-height: 46rem) and (max-width: 39.99rem) {
  .lh-tile { height: 4.1rem; }
}
@media (max-height: 44rem) and (min-width: 40rem) {
  .lh-tile { height: 9.5rem; }
}
/* Table turns into stacked rows on phones */
@media (max-width: 39.99rem) {
  .wp-block-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .wp-block-table table, .wp-block-table tbody, .wp-block-table tr, .wp-block-table th, .wp-block-table td { display: block; }
  .wp-block-table tr { padding-block: 0.75rem; border-bottom: 1px solid var(--lh-hair); }
  .wp-block-table tbody th, .wp-block-table td { padding: 0 0 0.35rem; border: 0; }
  .wp-block-table td::before { content: attr(data-label); display: block; font-size: 0.82rem; font-weight: 600; color: var(--lh-soft); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lh-tile::before { animation: none; opacity: 0.7; }
  .lh-age.lh-asked .lh-switch__track { animation: none; }
  .lh-switch__track, .lh-switch__track::after, .wp-element-button { transition: none; }
}
