/* Thought API, thought.bz */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Cinzel";
  src: url("/fonts/cinzel.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #07090f;
  --gold: #c9a24b;
  --gold-hi: #e8c877;
  --cream: #f4ede0;
  --muted: #d9d0b8;
  --header-h: 4.35rem;
  --pad: clamp(1.25rem, 5vw, 5rem);
  --font-display: "Cormorant Garamond", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-caps: "Cinzel", "Palatino Linotype", Palatino, serif;
  --max: 40rem;
}

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

html {
  color-scheme: dark;
  background: var(--ink);
  scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--cream);
  background: var(--ink);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.055;
  background: url("/images/grain.webp") repeat;
  mix-blend-mode: overlay;
}

img { display: block; max-width: 100%; height: auto; }

a {
  color: var(--gold-hi);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover { color: var(--cream); }

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

::selection {
  background: var(--gold);
  color: var(--ink);
}

.skip {
  position: absolute;
  inset: 0.75rem auto auto 0.75rem;
  z-index: 60;
  padding: 0.6rem 0.9rem;
  background: var(--cream);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  transform: translateY(-220%);
}
.skip:focus { transform: none; }

.shell {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
  min-width: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--header-h);
  background: linear-gradient(to bottom, var(--ink) 70%, transparent);
  padding-top: env(safe-area-inset-top);
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 72rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  color: var(--cream);
  text-decoration: none;
}

.brand img {
  width: 2.4rem;
  height: auto;
  aspect-ratio: 320 / 307;
}

.brand-name {
  font-family: var(--font-caps);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.house-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.15rem;
  color: var(--gold);
  text-decoration: none;
  font-size: 1rem;
}

.house-link:hover,
.house-link:focus-visible { color: var(--gold-hi); }

.leaf {
  position: relative;
  min-height: calc(100svh - var(--header-h) - 9rem);
  display: grid;
  align-items: center;
  padding: clamp(2.2rem, 6vh, 4.5rem) 0;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  background-color: #0b1426;
  background-image:
    linear-gradient(180deg, rgba(7, 9, 15, 0.62), rgba(7, 9, 15, 0.74) 50%, rgba(7, 9, 15, 0.66)),
    url("/images/tex-sapphire-sky.webp");
  background-size: cover;
  background-position: center;
}

.leaf .shell { position: relative; z-index: 1; }

h1 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2.4rem, 1.3rem + 3.6vw, 4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--cream);
  text-wrap: balance;
}

.stand {
  margin: 0 0 1.2rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.55rem);
  line-height: 1.4;
  color: var(--gold-hi);
  text-wrap: pretty;
  max-width: 32rem;
}

.prose {
  margin: 0 0 1rem;
  max-width: 36rem;
  color: var(--muted);
  text-wrap: pretty;
}

.prose .mail,
.footer-contact a {
  overflow-wrap: anywhere;
}

.leaf .mail {
  color: var(--gold);
  font-style: italic;
}

.leaf .mail:hover,
.leaf .mail:focus-visible { color: var(--gold-hi); }

.paths {
  margin: 1.6rem 0 0;
}

.paths h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.45rem, 1.15rem + 0.8vw, 1.9rem);
  line-height: 1.2;
  color: var(--cream);
}

.path-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(201, 162, 75, 0.45);
  max-width: 36rem;
}

.path-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1.2rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(201, 162, 75, 0.45);
  min-width: 0;
}

.path-list code {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--gold-hi);
  background: none;
}

.path-list span {
  font-style: italic;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
}

.actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.15rem 0;
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
}

.actions a:hover,
.actions a:focus-visible {
  color: var(--gold-hi);
  border-bottom-color: var(--gold-hi);
}

@media (max-width: 480px) {
  .actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }
  body { padding-bottom: env(safe-area-inset-bottom); }
}

.site-footer {
  position: relative;
  z-index: 2;
  padding: 1.4rem 0 2rem;
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.95rem;
  background: linear-gradient(to bottom, transparent, var(--ink) 42%);
}

.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.5rem;
  align-items: center;
  max-width: 72rem;
}

.site-footer a {
  color: var(--gold);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--gold-hi);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.footer-motto {
  flex: 1 0 100%;
  margin: 0 0 0.15rem;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.footer-copy {
  flex: 1 0 100%;
  margin: 0;
  text-align: center;
  overflow-wrap: break-word;
}

.footer-reg { white-space: nowrap; }

.footer-contact {
  flex: 1 0 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0.1rem 0 0;
  font-style: normal;
  text-align: center;
  color: var(--muted);
}

.footer-contact a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 0.5rem;
  color: var(--gold);
}

.footer-place {
  display: block;
  margin: 0;
  max-width: 36rem;
  text-wrap: pretty;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
