/* Wells Hamilton: shared styles (every page).
   Page-only styles live in their own file, e.g. css/index.css. */

/* =========================================================
   BASE & RESET
   ========================================================= */

:root {
  --cream: #f7f7f7;
  --dark: #111111;
  --brown: #333333;
  --gold: #e2e2e2;
  --muted: #999999;
  --color-background-gray: #e2e2e2;
  --nav-h: 76px;
}

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

html {
  scroll-behavior: auto;
}

body {
  background: var(--ink);
  color: var(--cream);
  font-family: "DM Sans", sans-serif;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
  font-weight: 400;
}

h2 {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 1.05;
  margin-bottom: 40px;
}

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

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: 0.8rem;
  color: #8fa09b;
  background: var(--dark);
  padding: 100px 8% 36px;
}

@media (max-width: 600px) {
  :root {
    --nav-h: 64px;
  }
}

/* =========================================================
   LAYOUT & TYPOGRAPHY
   ========================================================= */

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
}

/* =========================================================
   CURSOR
   ========================================================= */

.cur,
.dot {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 3000;
  pointer-events: none;
  display: none;
  mix-blend-mode: difference;
}

body.cc .cur,
body.cc .dot {
  display: block;
}

body.cc,
body.cc a,
body.cc button {
  cursor: none;
}

.rg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  transition:
    width 0.35s,
    height 0.35s,
    background 0.35s,
    border-color 0.35s;
  /* Automatically inverts against background */
  mix-blend-mode: difference;
}

.rg i {
  font: normal 500 0.7rem "DM Sans";
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  transition: opacity 0.25s;
  mix-blend-mode: difference;
}

.cur.h .rg {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.14);
}

.cur.v .rg {
  width: 96px;
  height: 96px;
  background: #fff;
}

.cur.v .rg i {
  opacity: 1;
}

.dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
}

.cur.v ~ .dot {
  opacity: 0;
}

/* =========================================================
   NAVIGATION
   ========================================================= */

.nav.solid {
  padding-top: 12px;
  padding-bottom: 12px;
  background: #e2e2e2;
  border-color: rgba(244, 239, 230, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.logo em {
  color: var(--gold);
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo-img {
  width: 180px;
  height: auto;
  display: block;
}

.links {
  display: flex;
  gap: clamp(18px, 3vw, 36px);
  font-size: 0.9rem;
}

.links a {
  position: relative;
  padding: 4px 0;
}

.links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s;
  filter: invert(1);
}

.links a:hover::after,
.links a.active::after {
  transform: scaleX(1);
  filter: invert(1);
}

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1101;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 5%;
  border-bottom: 1px solid transparent;
  transition:
    background 0.4s,
    padding 0.4s,
    border-color 0.4s,
    backdrop-filter 0.4s;
}

.logo img {
  display: block;
  height: 68px;
  width: auto;
  transition: height 0.4s;
  filter: brightness(0) invert(1);
}

.nav.solid .logo img {
  height: 68px;
  filter: none;
}

.nav.solid a {
  color: #111111;
  font-weight: 500;
}

.nav nav {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  font-size: 0.9rem;
}

.nav nav a {
  position: relative;
  padding: 4px 0;
}

.nav nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
filter: invert();
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.35s ease;
}

.nav nav a:hover::after {
  transform: scaleX(1);
}

.nav nav a:hover::after,
.nav nav a:focus-visible::after {
  transform: scaleX(1);
}

.bg-home {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 10001;
}

.bg-home span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: #fff;
  mix-blend-mode: difference;
  transition: transform 0.35s;
}

.bg-home span:nth-child(1) {
  top: 18px;
}

.bg-home span:nth-child(2) {
  top: 25px;
}

.bg-home.x span:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}

.bg-home.x span:nth-child(2) {
  transform: translateY(-3.5px) rotate(-45deg);
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: #e2e2e291;
  backdrop-filter: blur(14px);
  visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 0 8%;
}

.menu a {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.4rem, 11vw, 4rem);
  line-height: 1.2;
}

.menu a:hover {
  color: var(--gold);
  font-style: italic;
}

.menu p {
  margin-top: 28px;
  color: var(--cream);
  font-size: 0.9rem;
}

@media (max-width: 800px) {
  .links {
    display: none;
  }

  .bg-home {
    display: block;
  }

  .nav.solid .bg-home {
    filter: invert(1);
  }

  .nav nav {
    display: none;
  }
}

@media (max-width: 600px) {
  .logo img {
    height: 50px;
  }

  .nav.solid .logo img {
    height: 58px;
  }

  .nav nav {
    gap: 14px;
    font-size: 0.8rem;
  }
}

@media (max-width: 380px) {
  .nav nav a:nth-child(3) {
    display: none;
  }
}

/* =========================================================
   FOOTER
   ========================================================= */

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  margin-bottom: 14px;
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--gold);
  font-size: 1rem;
}

.contact-text {
  min-width: 0;
}

.contact-text a {
  color: inherit;
  text-decoration: none;
}

.site-foot {
  background: var(--dark);
  padding: 80px 8% 36px;
  color: #ffffff;
}

.fgrid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
}

.flogo {
  filter: brightness(0) invert(1);
  display: block;
  height: 68px;
  width: auto;
  margin-bottom: 20px;
}

.fgrid p {
  max-width: 26rem;
  line-height: 1.8;
  font-size: 0.95rem;
}

.fgrid h4 {
  margin-bottom: 18px;
  font-family: "Playfair Display", serif;
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--cream);
}

.fgrid ul {
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
}

.fgrid a,
.fbottom a {
  transition: color 0.3s;
}

.fgrid a:hover,
.fbottom a:hover {
  color: var(--gold);
}

.fbottom {
  width: calc(100% - 60px);
  max-width: 1800px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
  gap: 10px 28px;
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid rgba(244, 239, 230, 0.1);
  font-size: 0.8rem;
}

@media (max-width: 860px) {
  .fgrid {
    grid-template-columns: 1fr 1fr;
  }

  .fgrid > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .site-foot {
    padding: 60px 6% 30px;
  }

  .fgrid {
    grid-template-columns: 1fr;
    gap: 34px;
  }
}

/* =========================================================
   BACK TO TOP
   ========================================================= */

.totop {
  position: fixed;
  right: 10px;
  bottom: 22px;
  z-index: 1000;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: rgba(23, 23, 20, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: 0.35s;
}

.totop.show {
  opacity: 1;
  visibility: visible;
}

.totop:hover {
  background: var(--gold);
  color: var(--ink);
}

.totop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1500;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: rgba(23, 23, 20, 0.85);
  color: var(--cream);
  backdrop-filter: blur(6px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.35s,
    transform 0.35s,
    visibility 0.35s,
    background 0.3s,
    color 0.3s;
}

.totop.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.totop:hover,
.totop:focus-visible {
  background: var(--gold);
  color: var(--ink);
}

@media (max-width: 600px) {
  .totop {
    right: 14px;
    bottom: 14px;
  }
}

/* =========================================================
   BOOK COVERS & PORTRAITS
   ========================================================= */

.bk {
  aspect-ratio: var(--ar, 2/3);
  container-type: inline-size;
  padding: 9%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  text-align: left;
  border-radius: 3px 8px 8px 3px;
  border-left: 4px solid rgba(0, 0, 0, 0.25);
  background: var(--m), linear-gradient(160deg, var(--c1), var(--c2));
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45);
}

.bk::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.16),
    transparent 42%
  );
}

.bk h3 {
  font-size: max(0.7rem, 11cqw);
  line-height: 1.08;
}

.bk span {
  font-size: max(0.5rem, 6.5cqw);
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.m0 {
  --m: radial-gradient(
    circle at 72% 24%,
    rgba(255, 255, 255, 0.24) 0 16%,
    transparent 17%
  );
}

.m1 {
  --m: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0 10px,
    transparent 10px 22px
  );
}

.m2 {
  --m: linear-gradient(to top, rgba(0, 0, 0, 0.32) 0 26%, transparent 26%);
}

.m3 {
  --m: repeating-radial-gradient(
    circle at 28% 72%,
    rgba(255, 255, 255, 0.1) 0 6px,
    transparent 6px 14px
  );
}

.pt {
  aspect-ratio: 4/5;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(255, 255, 255, 0.22),
      transparent 55%
    ),
    linear-gradient(160deg, var(--c1), var(--c2));
}

.pt b {
  font:
    400 clamp(3rem, 7vw, 5.5rem) "Playfair Display",
    serif;
  opacity: 0.9;
  transition: transform 0.6s;
}

.pt::after {
  content: "Read profile \2192";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  font-size: 0.85rem;
  transform: translateY(100%);
  transition: transform 0.4s;
}

.bk {
  width: 100%;
}

.bk.kids {
  --ar: 1 / 1;
}

.bk.slim {
  --ar: 3 / 5;
  width: 82%;
}

.bk.img {
  padding: 0;
}

.bk .bi {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

.cta,
.cta-home,
.ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: 0.3s;
}

.cta,
.cta-home {
  background: var(--dark);
  color: var(--ink);
}

.cta:hover,
.cta-home:hover {
  background: var(--gold);
  transform: translateY(-2px);
  color: var(--dark);
}

.ghost {
  border: 1px solid rgb(0 0 0 / 35%);
}

.ghost:hover {
  color: var(--gold);
  transform: translateY(-2px);
  background: var(--dark);
}

@media (max-width: 600px) {
  .cta {
    margin-top: 12px;
    padding: 11px 20px;
    font-size: 0.8rem;
  }
}

/* =========================================================
   MODAL
   ========================================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.mb {
  position: absolute;
  inset: 0;
  background: rgba(8, 7, 6, 0.82);
  backdrop-filter: blur(8px);
}

.mc {
  position: relative;
  width: min(920px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: var(--dark);
  border: 1px solid rgba(199, 164, 107, 0.3);
  border-radius: 18px;
  padding: clamp(22px, 4vw, 48px);
}

.mx {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(244, 239, 230, 0.3);
  border-radius: 50%;
  font-size: 1.4rem;
  text-align: center;
  line-height: 40px;
  transition: 0.3s;
}

.mx:hover {
  background: var(--gold);
  color: var(--ink);
}

.mg {
  display: grid;
  grid-template-columns: minmax(150px, 280px) 1fr;
  gap: clamp(22px, 4vw, 48px);
  align-items: center;
}

.mg h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 10px 0 6px;
}

.mg p {
  line-height: 1.75;
  color: #cfc6b6;
  margin-top: 12px;
}

.mg .by {
  color: var(--gold);
  margin-top: 0;
}

.mini {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.mini button {
  width: 84px;
}

.mc iframe,
.mc video {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  border-radius: 10px;
  margin-top: 22px;
}

@media (max-width: 600px) {
  .mg {
    grid-template-columns: 1fr;
  }

  .mg .bk {
    max-width: 170px;
    margin: 0 auto;
  }

  .mc {
    padding-top: 64px;
  }
}

.vsoon {
  margin-top: 22px;
  padding: 60px 20px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  text-align: center;
  color: #cfc6b6;
}
