/* Cocobolo: a temple kept in good repair */

:root {
  --ink: #2a1810;
  --ink-soft: #52362a;
  --cocobolo: #7a2a18;
  --cocobolo-deep: #5c1d0f;
  --marble: #f5efe6;
  --marble-soft: #dcc9b8;
    --marble-ground: #f2f0ec;
  --dark-ground: #221612;
  --rule: rgb(42 24 16 / 0.28);
  --rule-dark: rgb(245 239 230 / 0.26);

  --display: "Tenor Sans", "Gill Sans", "Optima", sans-serif;
  --text: "Gentium Book Plus", "Iowan Old Style", Georgia, serif;

  --gutter: clamp(16px, 5vw, 72px);
  --section: clamp(4.5rem, 10vw, 8.5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --meander-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M0 9H10M9 9V1H1V7H7V3H3V5H5' fill='none' stroke='%232a1810' stroke-width='1.05' stroke-linecap='square'/%3E%3C/svg%3E");
  --meander-marble: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M0 9H10M9 9V1H1V7H7V3H3V5H5' fill='none' stroke='%23dcc9b8' stroke-width='1.05' stroke-linecap='square'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; scrollbar-color: var(--cocobolo) var(--marble-ground); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--marble-ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: clamp(1.0625rem, 0.35vw + 0.98rem, 1.1875rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--cocobolo);
}

::selection { background: var(--cocobolo); color: var(--marble); }

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

:focus-visible {
  outline: 2px solid var(--cocobolo);
  outline-offset: 4px;
}
.dark :focus-visible { outline-color: var(--marble); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--ink); color: var(--marble);
  padding: 0.6rem 1rem; text-decoration: none;
}
.skip:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Grounds ---------- */

.dark { background: var(--dark-ground); color: var(--marble); }

/* ---------- Greek key ---------- */

.meander {
  height: 22px;
  background: var(--meander-ink) left center / 22px 22px repeat-x;
}
.meander--dark {
  height: 46px;
  background: var(--dark-ground) var(--meander-marble) left center / 26px 26px repeat-x;
  border-block: 4px double var(--marble-soft);
}

/* ---------- Navigation ---------- */

.head {
  position: absolute; inset: 0 0 auto; z-index: 5;
}
.nav {
  display: flex; align-items: center; gap: 2rem;
  padding-block: 1.25rem;
}
.nav__brand {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.15rem; letter-spacing: 0.22em; text-transform: uppercase;
}
.nav__brand img { width: 52px; }
.nav__links {
  display: flex; gap: 2rem;
  margin: 0 0 0 auto; padding: 0; list-style: none;
}
.nav__links a,
.directory a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size 0.45s var(--ease);
  padding-bottom: 2px;
}
.nav__links a:hover,
.directory a:hover { background-size: 100% 1px; }
.nav__links a {
  font-family: var(--display);
  font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.nav__phone {
  font-family: var(--display);
  font-size: 0.9rem; letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  border: 1px solid var(--ink);
  padding: 0.5rem 0.9rem;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.nav__phone:hover { background: var(--ink); color: var(--marble); }

/* ---------- Hero ---------- */

.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  overflow-x: clip;
  padding-block: 6.5rem;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
}

.inscription {
  display: block;
  white-space: nowrap;
  margin: 0 0 2.4rem -0.04em;
  font-family: var(--display);
  font-weight: 400;
  font-size: min(5.6rem, 13.6cqi);
  letter-spacing: 0.12em;
  line-height: 1;
  color: var(--ink);
}
.inscription span {
  display: inline-block;
}

.hero__text { container-type: inline-size; min-width: 0; align-self: center; }

.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.2rem;
  padding: 0.8rem 1.5rem;
  font-family: var(--display);
  font-size: 0.95rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.35s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--solid {
  background: var(--cocobolo); color: var(--marble);
  border: 1px solid var(--cocobolo-deep);
  box-shadow: inset 0 0 0 3px var(--cocobolo), inset 0 0 0 4px rgb(245 239 230 / 0.35);
}
.btn--solid:hover { background: var(--cocobolo-deep); }
.btn--line { border: 1px solid var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--marble); }

/* temple front */
.temple {
  margin: 0;
  width: 100%;
  max-width: 440px;
  justify-self: end;
}
.temple__pediment {
  position: relative;
  aspect-ratio: 400 / 96;
  margin-inline: -4%;
}
.temple__pediment svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ped-outer { fill: rgb(250 243 235 / 0.5); stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ped-inner { fill: none; stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0.55; }
.temple__pediment img {
  position: absolute;
  left: 50%; bottom: 10%;
  width: 26%;
  transform: translateX(-50%);
}
.temple__frieze {
  margin-inline: -4%;
  height: 26px;
  background-color: rgb(250 243 235 / 0.55);
  background-size: 18px 18px;
  background-position: left 4px;
  border: 1px solid var(--ink);
  border-top: 0;
}
.temple__photo {
  width: 100%;
  height: clamp(300px, calc(100svh - 21rem), 550px);
  object-fit: cover;
  object-position: 50% 55%;
  border-inline: 1px solid var(--ink);
}
.temple__steps { display: grid; }
.temple__steps i {
  display: block; height: 9px;
  border: 1px solid var(--ink); border-top: 0;
  background: rgb(250 243 235 / 0.5);
}
.temple__steps i:nth-child(1) { margin-inline: -3%; }
.temple__steps i:nth-child(2) { margin-inline: -6%; }
.temple__steps i:nth-child(3) { margin-inline: -9%; }
.temple__steps i:first-child { border-top: 1px solid var(--ink); }

/* ---------- Shared headings ---------- */

/* ---------- Contact ---------- */

.contact { padding-block: var(--section); }
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
}
.close {
  margin: 0 0 1.2rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 2.8vw + 1rem, 4rem);
  line-height: 1.05;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-wrap: balance;
  max-width: 16ch;
}
.contact__body > p { margin: 0; max-width: 44ch; color: var(--marble-soft); }
.directory {
  margin: 2.5rem 0 0; padding: 0; list-style: none;
  border-top: 1px solid var(--rule-dark);
}
.directory li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  align-items: baseline;
  gap: 1rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--rule-dark);
}
.directory__label {
  font-family: var(--display);
  font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--marble-soft);
}
.directory a,
.directory address {
  font-family: var(--display);
  font-style: normal;
  font-size: clamp(1.2rem, 0.9vw + 1rem, 1.65rem);
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.contact__photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 38%;
  border: 1px solid var(--marble-soft);
  padding: 8px;
}

/* ---------- Footer ---------- */

.foot {
  border-top: 1px solid var(--rule-dark);
  padding-block: 1.75rem;
  font-size: 0.95rem;
  color: var(--marble-soft);
}
.foot__inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
}
.foot__brand {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: var(--display);
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--marble);
}
.foot__brand img { width: 40px; }
.foot__links {
  display: flex; gap: 1.75rem;
  margin: 0 0 0 auto; padding: 0; list-style: none;
  font-family: var(--display);
  font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
}
.foot__links a {
  color: var(--marble);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size 0.45s var(--ease);
  padding-bottom: 2px;
}
.foot__links a:hover,
.foot__links a[aria-current="page"] { background-size: 100% 1px; }

/* ---------- Legal pages ---------- */

.legal { padding-block: 8.5rem var(--section); }
.legal__inner { max-width: 72ch; }
.legal__title {
  margin: 0 0 0.9rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 2.4vw + 1rem, 3.4rem);
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.legal__updated { margin: 0 0 1.6rem; font-style: italic; color: var(--ink-soft); }
.legal .meander { margin-bottom: 2.4rem; }
.legal h2 {
  margin: 2.6rem 0 0.7rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.2rem, 0.5vw + 1.05rem, 1.45rem);
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.legal p, .legal li { max-width: 68ch; }
.legal p { margin: 0 0 1rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.legal li { margin-bottom: 0.4rem; }
.legal li::marker { color: var(--cocobolo); }
.legal a { color: var(--cocobolo); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal a:hover { color: var(--cocobolo-deep); }
.legal address { font-style: normal; }

/* ---------- Motion: the name is chiselled in ---------- */

@media (prefers-reduced-motion: no-preference) {
  .inscription span {
    animation: chisel 0.9s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 95ms + 150ms);
  }
  .inscription span:nth-child(1) { --i: 0; }
  .inscription span:nth-child(2) { --i: 1; }
  .inscription span:nth-child(3) { --i: 2; }
  .inscription span:nth-child(4) { --i: 3; }
  .inscription span:nth-child(5) { --i: 4; }
  .inscription span:nth-child(6) { --i: 5; }
  .inscription span:nth-child(7) { --i: 6; }
  .inscription span:nth-child(8) { --i: 7; }

  .temple__photo { animation: rise 1.4s var(--ease) 0.2s both; }
}
@keyframes chisel {
  from { clip-path: inset(0 0 100% 0); filter: blur(3px); opacity: 0.4; }
  to { clip-path: inset(0 0 0 0); filter: blur(0); opacity: 1; }
}
@keyframes rise {
  from { clip-path: inset(100% 0 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav__phone { margin-left: auto; }
  .hero { min-height: auto; padding-block: 7rem 4rem; }
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
  .temple { justify-self: center; max-width: min(360px, 84%); margin-top: 1rem; }
  .contact__grid { grid-template-columns: 1fr; }
  .contact__photo { max-width: 360px; }
}

@media (max-width: 560px) {
  .nav { gap: 1rem; }
  .nav__brand span { display: none; }
  .nav__brand img { width: 46px; }
  .actions .btn { flex: 1 1 100%; }
  .directory li { grid-template-columns: 1fr; gap: 0.25rem; }
  .foot__inner { flex-direction: column; align-items: flex-start; }
  .foot__links { margin-left: 0; }
  .legal { padding-top: 7rem; }
}
