/* VerseTick — one stylesheet for clock.html and index.html.
   E-paper aesthetic: warm off-white "paper", near-black ink, serif verse. */

:root {
  --paper: #f2efe6;
  --ink: #211f1a;
  --ink-soft: #57534a;
  --line: #d8d3c4;
  --fade: 380ms;
}
:root[data-theme="bedside"] {
  --paper: #0c0c0b;
  --ink: #b7b1a1;
  --ink-soft: #6e695d;
  --line: #262521;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", "Palatino Linotype", serif;
  -webkit-font-smoothing: antialiased;
  transition: background 300ms ease, color 300ms ease;
}

/* ------------------------------------------------------------- clock page */

body.clock-page {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.clock {
  width: 100%;
  height: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4vmin 6vmin;
}

#content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  justify-content: center;
  opacity: 1;
  transition: opacity var(--fade) ease;
}
#content.fading { opacity: 0; }

.time {
  font-size: clamp(56px, 16vmin, 170px);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

#verse-area {
  flex: 1;
  min-height: 0;
  max-height: 44vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 3vmin 0 2vmin;
}

.verse {
  max-width: 34em;
  text-align: center;
  line-height: 1.42;
  quotes: none;
}

.ref {
  text-align: center;
  font-size: clamp(14px, 2.6vmin, 22px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.ref::before { content: "— "; }

#theme-toggle {
  position: fixed;
  right: 14px;
  bottom: 12px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 5px 11px;
  cursor: pointer;
  opacity: 0.65;
}
#theme-toggle:hover { opacity: 1; }

#trans-toggle {
  position: fixed;
  left: 14px;
  bottom: 12px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.12em;
  padding: 5px 11px;
  cursor: pointer;
  opacity: 0.65;
}
#trans-toggle:hover { opacity: 1; }

body.forced #theme-toggle,
body.forced #trans-toggle { opacity: 0.25; } /* stay subtle in recordings */

/* mini mode (?mini=1) for the landing-page embed */
body.mini .clock { padding: 12px 18px; }
body.mini .time { font-size: clamp(30px, 11vmin, 64px); }
body.mini #verse-area { margin: 8px 0 6px; }
body.mini .ref { font-size: 11px; letter-spacing: 0.18em; }
body.mini #theme-toggle { display: none; }
body.mini #trans-toggle { display: none; }

/* clickable verse affordance (full clock only) */
body.clock-page:not(.mini) .verse { cursor: pointer; }
body.clock-page:not(.mini) .verse:hover { opacity: 0.85; }
body.clock-page:not(.mini) .verse:focus-visible {
  outline: 1px dashed var(--ink-soft);
  outline-offset: 8px;
}

/* ---------------------------------------------------------- context panel */

#panel-wrap {
  position: fixed;
  inset: 0;
  background: rgba(20, 19, 15, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
  z-index: 10;
}
#panel-wrap[hidden] { display: none; }
:root[data-theme="bedside"] #panel-wrap { background: rgba(0, 0, 0, 0.65); }

#panel {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 18px 44px rgba(20, 19, 15, 0.35);
  max-width: 620px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 30px 32px 26px;
}

#panel-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: 0;
  color: var(--ink-soft);
  font-size: 26px;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
}
#panel-close:hover { color: var(--ink); }

.panel-note {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.5;
  max-width: 32em;
  padding-right: 30px;
}

.panel-ref {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.panel-passage {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.ctx-verse {
  font-size: 17px;
  line-height: 1.55;
  margin: 8px 0;
  color: var(--ink-soft);
}
.ctx-verse.ctx-current {
  color: var(--ink);
  border-left: 2px solid var(--ink);
  padding-left: 12px;
  margin-left: -14px;
}
.ctx-num {
  font-size: 11px;
  vertical-align: super;
  color: var(--ink-soft);
  letter-spacing: 0;
}

.panel-keep {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: 15px;
}
.panel-keep a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink-soft);
  padding-bottom: 1px;
}
.panel-keep a:hover { border-bottom-color: var(--ink); }

@media (max-width: 560px) {
  #panel { padding: 24px 20px 20px; }
}

/* ----------------------------------------------------------- landing page */

body.landing {
  overflow-x: hidden;
  line-height: 1.6;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 22px;
}

.landing header {
  padding: 26px 0 10px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 20px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.brand small {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: none;
  color: var(--ink-soft);
  margin-top: 4px;
}

.hero { padding: 54px 0 26px; text-align: center; }
.hero h1 {
  font-size: clamp(30px, 6vw, 46px);
  font-weight: 400;
  line-height: 1.18;
}
.hero p.sub {
  margin: 18px auto 0;
  max-width: 34em;
  color: var(--ink-soft);
  font-size: 18px;
}

/* framed demo, styled like a small e-ink bedside device */
.device {
  margin: 40px auto 8px;
  max-width: 560px;
  background: #14130f;
  border-radius: 14px;
  padding: 16px 16px 26px;
  box-shadow: 0 14px 34px rgba(20, 19, 15, 0.28);
}
:root[data-theme="bedside"] .device {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65);
}
.device iframe {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: 4px;
  background: var(--paper);
}
.device-caption {
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  margin: 14px 0 0;
}
.device-caption a { color: inherit; }

section { padding: 34px 0; border-top: 1px solid var(--line); }
section h2 {
  font-weight: 400;
  font-size: 24px;
  margin-bottom: 14px;
}
section p { margin: 10px 0; max-width: 38em; }
section p.muted, li.muted { color: var(--ink-soft); }

ul.points { list-style: none; margin-top: 8px; }
ul.points li {
  padding: 9px 0 9px 26px;
  position: relative;
}
ul.points li::before {
  content: "✦";
  position: absolute;
  left: 2px;
  color: var(--ink-soft);
  font-size: 13px;
  top: 13px;
}

/* signup placeholder -- intentionally disabled until Corey wires a service */
.signup form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin-top: 16px;
}
.signup input[type="email"] {
  flex: 1;
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
}
.signup button {
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.06em;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: 3px;
}
.signup form[aria-disabled="true"] { opacity: 0.55; }
.signup .note { font-size: 14px; color: var(--ink-soft); margin-top: 10px; }

footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 44px;
  font-size: 13px;
  color: var(--ink-soft);
}

@media (max-width: 560px) {
  .signup form { flex-direction: column; }
  .hero { padding-top: 36px; }
}
