/* Enterprise Magazine: foundations
   Register: quiet luxury, five star hotel reading room. */

:root {
  /* ink + paper */
  --ink:      #12100d;
  --ink-2:    #1c1915;
  --ink-3:    #2a2620;
  --paper:    #f5f1e9;
  --paper-2:  #efe9de;
  --bone:     #e2dace;
  --rule:     rgba(18,16,13,.14);
  --rule-2:   rgba(18,16,13,.08);

  /* metal + accent */
  --brass:    #a98b5d;
  --brass-lo: #8d7148;
  --oxblood:  #6d2b2b;
  --olive:    #4a4b3c;

  /* on dark */
  --d-paper:  #f2ece1;
  --d-mute:   rgba(242,236,225,.62);
  --d-rule:   rgba(242,236,225,.16);

  /* type */
  --display: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --sans:    "Jost", "Futura", "Helvetica Neue", Arial, sans-serif;

  /* measure */
  --shell:   1320px;
  --narrow:  760px;
  --gut:     clamp(20px, 4.2vw, 56px);
  --band:    clamp(72px, 9vw, 148px);

  --ease:    cubic-bezier(.22, 1, .36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.72;
  letter-spacing: .002em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

::selection { background: var(--brass); color: var(--paper); }

/* ---------- type scale ---------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  margin: 0;
  line-height: 1.06;
  letter-spacing: -.012em;
  text-wrap: balance;
}

.d1 { font-size: clamp(3rem, 8.2vw, 7.2rem); }
.d2 { font-size: clamp(2.2rem, 5vw, 4rem); }
.d3 { font-size: clamp(1.6rem, 2.8vw, 2.4rem); }
.d4 { font-size: clamp(1.24rem, 1.8vw, 1.6rem); line-height: 1.18; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

/* eyebrow: letterspaced caps with a brass tick */
.eyebrow {
  font-family: var(--sans);
  font-size: .688rem;
  font-weight: 400;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--brass-lo);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
}
.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: currentColor;
  opacity: .7;
  flex: none;
}
.eyebrow.is-plain::before { display: none; }
.on-dark .eyebrow { color: var(--brass); }

/* standfirst: the serif italic voice */
.standfirst {
  font-family: var(--display);
  font-size: clamp(1.18rem, 2.05vw, 1.6rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.46;
  letter-spacing: -.008em;
  color: var(--ink-3);
  max-width: 30ch;
}
.on-dark .standfirst { color: var(--d-paper); }

.lede { font-size: 1.075rem; line-height: 1.78; }

.small {
  font-size: .75rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  font-weight: 400;
}

.mute { color: rgba(18,16,13,.58); }
.on-dark .mute { color: var(--d-mute); }

/* ---------- layout ---------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gut);
}
.shell.is-narrow { max-width: var(--narrow); }

.band { padding-block: var(--band); }
.band.is-tight { padding-block: clamp(52px, 6vw, 92px); }

.on-dark { background: var(--ink); color: var(--d-paper); }
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--d-paper); }

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.on-dark .rule { background: var(--d-rule); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

/* ---------- links + buttons ---------- */

/* hairline underline that grows from the left */
.ul {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}
.ul::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .55s var(--ease);
}
.ul:hover::after, .ul:focus-visible::after { transform: scaleX(1); }
.ul.is-on::after { transform: scaleX(1); }

/* rising fill button */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 17px 34px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .26em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color .5s var(--ease), border-color .5s var(--ease);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform .62s var(--ease);
  z-index: -1;
}
.btn:hover, .btn:focus-visible { color: var(--paper); }
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }

.btn.is-solid { background: var(--ink); color: var(--paper); }
.btn.is-solid::before { background: var(--brass); }
.btn.is-solid:hover, .btn.is-solid:focus-visible { color: var(--ink); border-color: var(--brass); }

.on-dark .btn { border-color: rgba(242,236,225,.4); color: var(--d-paper); }
.on-dark .btn::before { background: var(--d-paper); }
.on-dark .btn:hover, .on-dark .btn:focus-visible { color: var(--ink); border-color: var(--d-paper); }

/* text link with arrow */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: .7rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink);
}
.tlink .arw { transition: transform .5s var(--ease); }
.tlink:hover .arw { transform: translateX(6px); }
.on-dark .tlink { color: var(--d-paper); }

/* ---------- forms ---------- */

.field { display: block; margin-bottom: 22px; }
.field > span {
  display: block;
  font-size: .672rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(18,16,13,.55);
  margin-bottom: 9px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 14px 2px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  border-radius: 0;
  transition: border-color .4s var(--ease);
}
.field textarea { min-height: 128px; resize: vertical; line-height: 1.68; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-bottom-color: var(--brass);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(18,16,13,.3); }

.on-dark .field > span { color: var(--d-mute); }
.on-dark .field input,
.on-dark .field textarea,
.on-dark .field select {
  border-bottom-color: var(--d-rule);
  color: var(--d-paper);
}
.on-dark .field input:focus,
.on-dark .field textarea:focus { border-bottom-color: var(--brass); }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 26px;
}

.form-note {
  font-size: .78rem;
  line-height: 1.6;
  color: rgba(18,16,13,.5);
}
.on-dark .form-note { color: var(--d-mute); }

/* accessible focus */
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* skip link */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--ink);
  color: var(--paper);
  padding: 14px 22px;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.skip:focus { left: 12px; top: 12px; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .split { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
}
