/* Maison Vellor | shared styles */

:root {
  --cream: #F3EEE7;
  --ivory: #FAF7F3;
  --white: #FFFFFF;
  --backdrop: #D0CCC3;
  --sand: #D6CBBF;
  --taupe: #A89585;
  --mocha: #7B5844;
  --espresso: #3A2E27;
  --soft-black: #1F1A17;
  --rule: rgba(58, 46, 39, 0.18);

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --nav-h: 76px;
  --gutter: clamp(20px, 4vw, 56px);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }

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

.menu-toggle { position: absolute; opacity: 0; pointer-events: none; }

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  background: transparent;
  transition: background-color .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}

/* inner pages, and the homepage once scrolled */
.nav.nav-solid,
.nav.is-scrolled {
  background: var(--cream);
  border-bottom-color: var(--rule);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
}

.nav-mark img { width: 52px; height: auto; }

.burger {
  display: block;
  padding: 16px 0 16px 16px;
  cursor: pointer;
  line-height: 0;
}
.burger svg { width: 30px; height: 16px; }

/* ---------- Side menu (dark panel from the right) ---------- */

.menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100%);
  z-index: 100;
  background: var(--soft-black);
  color: #F1EBE2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 96px 28px 48px;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .5s cubic-bezier(.7, 0, .2, 1), visibility 0s linear .5s;
}

.menu-toggle:checked ~ .menu-panel {
  transform: translateX(0);
  visibility: visible;
  transition: transform .5s cubic-bezier(.7, 0, .2, 1), visibility 0s;
}

/* soft veil over the page while the menu is open; click it to close */
.menu-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(31, 26, 23, .32);
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transition: opacity .5s ease, visibility 0s linear .5s;
}
.menu-toggle:checked ~ .menu-scrim {
  opacity: 1;
  visibility: visible;
  transition: opacity .5s ease, visibility 0s;
}

.menu-close {
  position: absolute;
  top: 26px;
  right: var(--gutter);
  padding: 4px;
  cursor: pointer;
  line-height: 0;
}
.menu-close line { stroke: #F1EBE2; }

.menu-mark { width: 54px; margin-bottom: 44px; opacity: .9; }

.menu-links { text-align: center; }
.menu-links li + li { margin-top: 18px; }
.menu-links a {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.2;
  color: #F1EBE2;
  letter-spacing: .01em;
}
.menu-links a:hover,
.menu-links a:focus-visible { color: #D6CBBF; }

.menu-handle {
  margin: 48px 0 0;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: #A89585;
}

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

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--backdrop);
}

.hero-media,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* wide screens: the photo keeps its full size and the page scrolls to show all of it */
@media (orientation: landscape) {
  .hero {
    height: auto;
    aspect-ratio: 2400 / 2003;
    min-height: 100vh;
    min-height: 100svh;
  }
}
.hero-media img {
  object-fit: cover;
  object-position: 50% 100%;
}

.hero-brand {
  position: absolute;
  left: 0; right: 0;
  top: max(calc(var(--nav-h) + 36px), 15vh);
  display: flex;
  justify-content: center;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.hero-brand h1 { line-height: 0; }
.hero-brand img { width: clamp(300px, 42vw, 640px); }

/* ---------- Phone and tablet ---------- */

@media (max-width: 820px) {
  :root { --nav-h: 64px; }
  .nav-mark img { width: 42px; }
  .burger { padding: 14px 0 14px 14px; }
  .burger svg { width: 26px; height: 14px; }
}

@media (orientation: portrait) {
  .hero-media img { object-position: 50% 0; }
  .hero-brand { top: max(96px, 16.5svh); }
  .hero-brand img { width: min(82vw, 44svh); }
}

/* ---------- Inner pages ---------- */

html { scroll-behavior: smooth; }

.menu-links a[aria-current="page"] { color: #D6CBBF; }

.page {
  padding: calc(var(--nav-h) + clamp(64px, 10vw, 128px)) var(--gutter) clamp(80px, 10vw, 140px);
  max-width: 1120px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--mocha);
}

.page-head { text-align: center; }

.page-title {
  margin: 22px 0 18px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: .005em;
  color: var(--espresso);
}
.page-title em { font-style: italic; color: var(--mocha); }

.page-sub {
  margin: 0;
  font-size: 15px;
  letter-spacing: .04em;
  color: #5E4C40;
}

/* sections */

.terms { margin-top: clamp(72px, 10vw, 128px); }

.term {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 80px);
  padding: clamp(40px, 5vw, 60px) 0;
  border-top: 1px solid var(--rule);
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.term:last-child { border-bottom: 1px solid var(--rule); }

.term-head {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
  align-self: start;
}

.term-head h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.15;
  color: var(--espresso);
}
.term-note {
  margin: 12px 0 0;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--mocha);
}

.term-list li,
.term-body p {
  position: relative;
  font-size: 16.5px;
  line-height: 1.75;
  color: #3F332B;
}
.term-list li { padding-left: 30px; }
.term-list li + li { margin-top: 14px; }
.term-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .9em;
  width: 14px;
  height: 1px;
  background: var(--taupe);
}

.term-body p { margin: 0; }
.term-body p + p { margin-top: 16px; }
.term-contact { display: flex; flex-direction: column; gap: 6px; }
.term-contact a {
  align-self: flex-start;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--espresso);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: border-color .3s ease, color .3s ease;
}
.term-contact a:hover, .term-contact a:focus-visible { color: var(--mocha); border-color: var(--mocha); }

/* sign off */

.sign-off {
  text-align: center;
  padding-top: clamp(80px, 10vw, 128px);
}
.sign-off p { text-wrap: balance; }
.sign-off img { width: 46px; margin: 0 auto 28px; }
.sign-off-line {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.25;
  color: var(--espresso);
}

@media (max-width: 820px) {
  .term { grid-template-columns: 1fr; gap: 22px; }
  .term-head { position: static; }
  .term-list li, .term-body p { font-size: 16px; }
  .term-contact a { font-size: 20px; word-break: break-word; }
}

/* ---------- Shades ---------- */

.page-wide { max-width: 1320px; }

.shade-groups { margin-top: clamp(64px, 9vw, 112px); }

.shade-group + .shade-group { margin-top: clamp(80px, 10vw, 136px); }

.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  margin-bottom: clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.group-head h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  color: var(--espresso);
}
.group-head h2 em { font-style: italic; color: var(--mocha); }
.group-head .eyebrow { font-size: 11px; white-space: nowrap; }

.shade-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(36px, 4vw, 56px) clamp(16px, 2vw, 28px);
}

.shade { margin: 0; }
.shade img {
  width: 100%;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  object-position: 50% 0;
  background: #E7E3DE;
}
.shade figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 16px;
}
.shade-name {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.2;
  color: var(--espresso);
}
.shade-code {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mocha);
}

.colour-match {
  max-width: 560px;
  margin: clamp(96px, 12vw, 160px) auto 0;
  padding-top: clamp(56px, 7vw, 80px);
  border-top: 1px solid var(--rule);
  text-align: center;
}
.colour-match h2 {
  margin: 18px 0 18px;
  font-family: var(--serif);
  font-size: clamp(34px, 4.4vw, 50px);
  line-height: 1.1;
  color: var(--espresso);
}
.colour-match p:not(.eyebrow) {
  margin: 0;
  font-size: 16.5px;
  color: #3F332B;
  text-wrap: balance;
}
.btn {
  display: inline-block;
  margin-top: 34px;
  padding: 17px 34px;
  border: 1px solid var(--espresso);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--espresso);
  transition: background-color .35s ease, color .35s ease;
}
.btn:hover, .btn:focus-visible { background: var(--espresso); color: var(--cream); }
.colour-match .fine {
  margin-top: 26px !important;
  font-size: 13px !important;
  color: #6E5D51 !important;
}

@media (max-width: 1080px) {
  .shade-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .shade-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 12px; }
  .shade figcaption { padding-top: 12px; }
  .shade-name { font-size: 18px; }
  .shade-code { font-size: 10px; letter-spacing: .16em; }
  .btn { padding: 16px 26px; letter-spacing: .22em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
