/* tails.faith, version 1 (second pass: the words fill their doors,
   the marigold ring sits in its corner).  Is it allowed?  The seven rulings from
   I HATE SHARK's faith pages, given a house of their own.  Bone and
   ink like the shop, Newsreader for the voice, Inter Tight for the
   labels; each tradition keeps its own colours and type, on its door
   here and on its page (src/faith.css). */

:root {
  --bone: #efe8df;
  --bone-2: #e7ddd0;
  --ink: #21160f;
  --ink-2: #5a4a3e;
  --ink-3: #8b7a6c;
  --rust: #b8501d;
  --line: #d9cbbb;
  --gut: 18px;
  --max: 1240px;
  --grot: "Inter Tight", system-ui, -apple-system, "Helvetica Neue", Arial,
    sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bone); color: var(--ink);
  font: 400 17px/1.6 var(--grot); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
h1, h2, h3, p, li, dd, dt { text-wrap: pretty; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
@media (min-width: 760px) { :root { --gut: 40px; } }

.mark { font: italic 400 1em/1 var(--serif); letter-spacing: -.015em;
  text-decoration: none; white-space: nowrap; }
.label, .kicker { font: 600 12px/1.2 var(--grot); letter-spacing: .18em;
  text-transform: uppercase; }
.kicker { color: var(--rust); }
.quiet { font-family: var(--serif); font-style: italic; font-weight: 400; }

.btn { display: inline-flex; align-items: center; gap: 10px; height: 52px;
  padding: 0 26px; border-radius: 99px; background: var(--ink);
  color: var(--bone); text-decoration: none; font-weight: 600; margin-top: 22px; }
.btn:hover { background: var(--rust); }
.btn-ghost { background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-ghost:hover { background: var(--ink); color: var(--bone); }

/* The bar on top, and the foot */
.ftop { background: var(--bone); border-bottom: 1px solid var(--line); }
.ftop .wrap { display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 60px; }
.ftop .mark { font-size: 27px; }
.ftop-link { font-weight: 600; font-size: 15px; text-decoration: none;
  color: var(--ink-2); }
.ftop-link:hover { color: var(--rust); }

.foot { background: var(--ink); color: #b9a898; padding: 64px 0 36px;
  text-align: center; overflow: hidden; }
.foot .mark { display: block; color: var(--bone);
  font-size: clamp(52px, 13.5vw, 196px); }
.foot .motto { color: #e7a07a; margin-top: 14px;
  font-size: clamp(22px, 2.8vw, 38px); line-height: 1.1; }
.foot .fine { margin-top: 26px; font-size: 14px; }
.foot .fine a { color: inherit; }

/* ======================================================================
   The front page: the question, seven doors, the rest in a sentence
   each, and the seal.
   ====================================================================== */

.hero { padding: clamp(44px, 7vw, 110px) 0 clamp(36px, 5vw, 72px); }
.hero h1 { font: 400 clamp(62px, 12vw, 176px)/.92 var(--serif);
  letter-spacing: -.035em; margin-top: 18px; }
.hero h1 em { font-style: italic; color: var(--rust); }
.hero .lede { font-size: clamp(18px, 1.6vw, 22px); color: var(--ink-2);
  max-width: 34em; margin-top: 28px; }

/* Seven doors.  On phones and tablets they stack, one band each, the
   word on the left; from 1180px they stand side by side, the whole
   width of the page, and the one under the pointer opens. */
.doors { display: grid; border-top: 1px solid var(--line); }
.door { position: relative; isolation: isolate; overflow: hidden;
  container-type: inline-size; display: grid; grid-template-columns: minmax(132px, 40%) 1fr;
  gap: 10px 20px; align-items: center; min-height: 196px;
  padding: 26px var(--gut); text-decoration: none;
  background: var(--d-bg); color: var(--d-ink, var(--ink)); }
.door + .door { border-top: 1px solid rgb(0 0 0 / .08); }
.door::before { content: ""; position: absolute; inset: 0; z-index: -2;
  pointer-events: none; }
.door:focus-visible { outline: 3px solid var(--d-acc); outline-offset: -3px; }

.d-word { position: relative; container-type: inline-size; display: grid;
  justify-items: center; gap: 10px; text-align: center; min-width: 0; }
.d-glyph { position: relative; display: block;
  font: 400 clamp(52px, var(--d-size, 30cqw), 180px)/1 var(--d-font);
  color: var(--d-acc); }
.d-glyph .enso { position: absolute; left: 50%; top: 50%;
  width: 1.5em; height: 1.5em; transform: translate(-50%, -50%);
  z-index: -1; color: var(--d-ink); }
.d-word > small { font: 600 10px/1.3 var(--grot); letter-spacing: .14em;
  text-transform: uppercase; color: var(--d-ink-2, var(--ink-2)); }

.d-text { display: grid; gap: 6px; min-width: 0; }
.d-name { font: 800 clamp(20px, 2.2vw, 28px)/1.05 var(--grot);
  letter-spacing: -.03em; }
.d-line { font: italic 400 clamp(17px, 1.5vw, 21px)/1.3 var(--d-font);
  color: var(--d-ink-2, var(--ink-2)); }
.d-ruling { font: 400 14px/1.4 var(--grot); color: var(--d-ink-2, var(--ink-2));
  margin-top: 4px; }
.d-ruling small { display: block; font: 600 10px/1.3 var(--grot);
  letter-spacing: .16em; text-transform: uppercase; color: var(--d-acc);
  margin-bottom: 2px; }

@media (min-width: 1180px) {
  .doors { display: flex; height: clamp(560px, 82vh, 860px); }
  .door { flex: 1 1 0; min-width: 168px; display: grid;
    grid-template-columns: none; grid-template-rows: 1fr auto;
    align-items: stretch; min-height: 0; padding: 28px 16px 30px;
    transition: flex-grow .7s var(--ease); }
  .door + .door { border-top: 0; border-left: 1px solid rgb(0 0 0 / .08); }
  .door:hover, .door:focus-visible { flex-grow: 2.2; }
  .d-word { align-self: center; }
  .d-name { font-size: clamp(20px, 1.4vw, 26px); }
  .d-line { font-size: 17px; }
  .d-ruling { max-height: 0; opacity: 0; overflow: hidden; margin-top: 0;
    transition: max-height .6s var(--ease), opacity .4s,
      margin-top .6s var(--ease); }
  .door:hover .d-ruling, .door:focus-visible .d-ruling {
    max-height: 8em; opacity: 1; margin-top: 8px; }
}

/* Each door in its own colours, type and ornament, as on its page. */
.d-judaism { --d-bg: #f3ecdc; --d-acc: #1f4e79; --d-ink: #1f1a12;
  --d-ink-2: #5a4f3e; --d-font: "Frank Ruhl Libre", Georgia, serif;
  --d-size: 34cqw; }
.d-judaism::before {
  background: radial-gradient(ellipse at 85% 0%, #e8dcc0 0, transparent 60%); }

.d-catholic { --d-bg: #f6f0e4; --d-acc: #a3161a; --d-ink: #1c1410;
  --d-ink-2: #5b4a3f; --d-font: "Cormorant Garamond", Georgia, serif;
  --d-size: 30cqw; }
.d-catholic::before { background: linear-gradient(180deg, #efe4d0, transparent 70%); }
.d-catholic .d-glyph { font-style: italic; }

.d-orthodox { --d-bg: #1d2f5e; --d-acc: #e8c26a; --d-ink: #f5ecd6;
  --d-ink-2: #c9c3d8; --d-font: "GFS Didot", "Cormorant", Georgia, serif;
  --d-size: 30cqw; }
.d-orthodox::before { opacity: .16;
  background: radial-gradient(circle at 50% -20%, #b8892b 0, transparent 55%),
    repeating-conic-gradient(from 0deg at 50% 0%, #b8892b 0 2deg,
      transparent 2deg 12deg); }
.d-orthodox + .door, .d-protestant + .door { border-color: transparent; }

.d-islam { --d-bg: #f3efe6; --d-acc: #0f6b55; --d-ink: #10221d;
  --d-ink-2: #4a5a54; --d-font: "Amiri", Georgia, serif; --d-size: 32cqw; }
.d-islam::before { opacity: .13; background-size: 80px 80px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%230f6b55' stroke-width='1.4'%3E%3Cpath d='M40 6l9.9 24.1L74 40l-24.1 9.9L40 74l-9.9-24.1L6 40l24.1-9.9z'/%3E%3Crect x='18' y='18' width='44' height='44' transform='rotate(45 40 40)'/%3E%3Crect x='18' y='18' width='44' height='44'/%3E%3Ccircle cx='40' cy='40' r='9'/%3E%3Cpath d='M0 0l18 18M80 0L62 18M0 80l18-18M80 80L62 62'/%3E%3C/g%3E%3C/svg%3E"); }

.d-protestant { --d-bg: #141414; --d-acc: #f1ede4; --d-ink: #f1ede4;
  --d-ink-2: #b5b0a5; --d-font: "IM Fell English", Georgia, serif;
  --d-size: 32cqw; }
.d-protestant .d-glyph { font-style: italic; }

.d-hindu { --d-bg: #fbf1e1; --d-acc: #c8361b; --d-ink: #22140e;
  --d-ink-2: #5f4637; --d-font: "Tiro Devanagari Sanskrit", Georgia, serif;
  --d-size: 30cqw; }
.d-hindu::before { inset: auto; right: -46cqw; top: -40cqw; width: 92cqw;
  height: 92cqw; border-radius: 50%; opacity: .5;
  background: repeating-conic-gradient(#f0a202 0 7.5deg, #f6c453 7.5deg 15deg);
  -webkit-mask: radial-gradient(circle, transparent 0 34%, #000 35% 62%,
    transparent 63%);
  mask: radial-gradient(circle, transparent 0 34%, #000 35% 62%,
    transparent 63%); }

.d-buddhist { --d-bg: #f2efe8; --d-acc: #1b1b1a; --d-ink: #1b1b1a;
  --d-ink-2: #5a5852; --d-font: "Shippori Mincho", Georgia, serif;
  --d-size: 46cqw; }
.enso path { stroke-dasharray: 1000; stroke-dashoffset: 0;
  animation: enso 2.4s var(--ease) .2s backwards; }
@keyframes enso { from { stroke-dashoffset: 1000; } }
@media (prefers-reduced-motion: reduce) {
  .enso path { animation: none; }
  .door, .d-ruling { transition: none; }
}

/* Side by side, the doors are tall and narrow: the word fills the
   width it has, and grows with the door as it opens. */
@media (min-width: 1180px) {
  .d-judaism { --d-size: 56cqw; }
  .d-catholic { --d-size: 44cqw; }
  .d-orthodox { --d-size: 44cqw; }
  .d-islam { --d-size: 48cqw; }
  .d-protestant { --d-size: 46cqw; }
  .d-hindu { --d-size: 44cqw; }
  .d-buddhist { --d-size: 60cqw; }
  .d-hindu::before { right: -34cqw; top: -30cqw; }
}

/* The rest, in a sentence each */
.briefly { padding: clamp(56px, 8vw, 110px) 0; }
.briefly h2 { font: 400 clamp(36px, 5vw, 72px)/1 var(--serif);
  letter-spacing: -.025em; margin-top: 14px; }
.briefly dl { display: grid; gap: 22px 32px; margin-top: 36px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.briefly dl div { border-top: 1px solid var(--line); padding-top: 14px; }
.briefly dt { font-weight: 700; }
.briefly dd { margin: 4px 0 0; color: var(--ink-2); }
.briefly a { color: var(--rust); font-weight: 600; text-decoration: none; }
.briefly a:hover { text-decoration: underline; }

/* The seal, and who wrote this */
.end { background: var(--bone-2); padding: clamp(64px, 9vw, 130px) 0;
  text-align: center; }
.end .wrap { display: grid; justify-items: center; gap: 30px; }
.end .f-seal { width: 190px; height: 190px; color: var(--rust);
  transform: rotate(-8deg); }
.end .f-seal text { font: 600 11.5px var(--grot); letter-spacing: .2em;
  text-transform: uppercase; fill: currentColor; }
.end .f-seal .f-seal-mid { font: italic 400 24px var(--serif);
  letter-spacing: 0; text-transform: none; }
.end .big { font: 400 clamp(26px, 3vw, 44px)/1.15 var(--serif);
  letter-spacing: -.01em; max-width: 20em; }
.end .fine { font-size: 15px; color: var(--ink-2); max-width: 38em; }
.end .btn { margin-top: 0; }
