/* Endgegner Studios — brand palette and type per the Brand Guidelines */

@font-face {
  font-family: "Clear Sans";
  src: url("../fonts/clear-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Clear Sans";
  src: url("../fonts/clear-sans-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Clear Sans";
  src: url("../fonts/clear-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #040404;
  --steel: #787878;
  --silver: #d9d9d9;
  --white: #ffffff;
  --ink-soft: #3b3b3b; /* secondary text on light backgrounds (steel fails contrast there) */
  --rule-dark: rgba(217, 217, 217, 0.14);
  --rule-light: rgba(4, 4, 4, 0.16);

  --font: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1180px;
}

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

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

body {
  margin: 0;
  background: var(--black);
  color: var(--silver);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
  border-radius: 2px;
}

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--white);
  color: var(--black);
  padding: 8px 14px;
}

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
}
.site-header .brand img {
  width: 168px;
}
.site-header nav a {
  font-size: 1rem;
  text-decoration: none;
  color: var(--silver);
  border-bottom: 1px solid var(--steel);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.site-header nav a:hover {
  color: var(--white);
  border-color: var(--white);
}

/* ---------- Hero: the dictionary entry ---------- */

.hero {
  position: relative;
  /* fills the screen on laptops, but never leaves a void on tall windows */
  min-height: min(100vh, 740px);
  min-height: min(100svh, 740px);
  display: flex;
  align-items: center;
  overflow: hidden;
  /* a single spotlight on the cube */
  background:
    radial-gradient(ellipse 55% 60% at 30% 52%, rgba(120, 120, 120, 0.28), transparent 70%),
    var(--black);
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding-top: 120px;
  padding-bottom: 48px;
}

/* the section right after the hero needs less lead-in */
.hero + .section {
  padding-top: clamp(32px, 4vw, 56px);
}

.cube {
  perspective: 1200px;
  justify-self: center;
  width: min(100%, 520px);
}
.cube img {
  width: 100%;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.8));
  animation: light-on 1.8s cubic-bezier(0.3, 0, 0.2, 1) both;
}
@keyframes light-on {
  from {
    opacity: 0;
    filter: brightness(0.15) drop-shadow(0 40px 60px rgba(0, 0, 0, 0.8));
  }
  to {
    opacity: 1;
    filter: brightness(1) drop-shadow(0 40px 60px rgba(0, 0, 0, 0.8));
  }
}

.entry h1 {
  margin: 0;
  font-size: clamp(3rem, 7.2vw, 7rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--white);
}
.entry h1 .syl {
  color: var(--steel);
  font-weight: 400;
}
.entry .pron {
  margin: 20px 0 36px;
  font-size: 1.25rem;
  color: var(--steel);
}
.entry .pron em {
  color: var(--silver);
}
.senses {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: sense;
  max-width: 34em;
}
.senses li {
  counter-increment: sense;
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 18px;
}
.senses li::before {
  content: counter(sense) ".";
  position: absolute;
  left: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--steel);
}

/* ---------- Services ---------- */

.section {
  padding: clamp(64px, 8vw, 112px) 0;
}

.section-head {
  margin: 0 0 40px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
  max-width: 18em;
}

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 56px);
  margin: 0;
}
.services div {
  border-top: 1px solid var(--rule-dark);
  padding-top: 24px;
}
.services dt {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}
.services dd {
  margin: 0;
  color: var(--silver);
  max-width: 30em;
}

/* ---------- Founder: the brushed-metal band ---------- */

.founder {
  color: var(--black);
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0) 0 2px,
      rgba(255, 255, 255, 0.18) 2px 3px,
      rgba(0, 0, 0, 0.025) 3px 5px
    ),
    linear-gradient(100deg, #c9c9c9 0%, #ececec 38%, var(--silver) 62%, #b9b9b9 100%);
}
.founder .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.founder .section-head {
  color: var(--black);
  margin-bottom: 0;
}
.founder .portrait {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin-top: 36px;
  background: var(--black);
}
.founder p {
  margin: 0 0 20px;
  max-width: 36em;
  color: var(--ink-soft);
}
.founder p.big {
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  line-height: 1.45;
  color: var(--black);
}
.quote {
  margin: 28px 0 0;
  max-width: 36em;
}
.quote + .quote {
  margin-top: 24px;
}
.quote blockquote {
  margin: 0;
}
/* One body size and one caption size for quotes and press,
   so the lead paragraph is the only step up. */
.founder .quote p {
  margin: 0 0 4px;
  font-style: italic;
  color: var(--black);
  text-indent: -0.4em; /* hang the opening quote mark */
}
.quote figcaption,
.press .outlet {
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.quote figcaption a {
  text-underline-offset: 2px;
}
.press {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  max-width: 36em;
}
.press li {
  border-top: 1px solid var(--rule-light);
  padding: 14px 0;
}
.press li:last-child {
  border-bottom: 1px solid var(--rule-light);
}
.press .outlet {
  display: block;
  margin-top: 4px;
}
.press a {
  color: var(--black);
  text-decoration-color: var(--rule-light);
  text-underline-offset: 3px;
}
.press a:hover {
  text-decoration-color: currentColor;
}

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

.contact .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 40px clamp(32px, 6vw, 96px);
  align-items: start;
}
.contact .section-head {
  margin-bottom: 20px;
}
.contact-intro p {
  margin: 0 0 20px;
  max-width: 30em;
}
.contact-intro .alt {
  font-size: 1rem;
  color: var(--steel);
}
.contact-intro .alt a,
.contact-form .note a,
.result a {
  color: var(--silver);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.contact-intro .alt a:hover,
.contact-form .note a:hover,
.result a:hover {
  color: var(--white);
}

.contact-form .field {
  margin-bottom: 28px;
}
.contact-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}
.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  padding: 12px 0;
  font: inherit;
  color: var(--white);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--steel);
  border-radius: 0;
  transition: border-color 0.2s;
}
.contact-form textarea {
  resize: vertical;
  min-height: 9em;
  line-height: 1.5;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom: 2px solid var(--white);
  margin-bottom: -1px;
}
.contact-form .note {
  margin: 0 0 24px;
  font-size: 0.9375rem;
  color: var(--steel);
}
.contact-form button {
  font: inherit;
  font-weight: 700;
  color: var(--black);
  background: var(--silver);
  border: 0;
  border-radius: 2px;
  padding: 14px 32px;
  cursor: pointer;
  transition: background 0.2s;
}
.contact-form button:hover:not(:disabled) {
  background: var(--white);
}
.contact-form button:disabled {
  cursor: default;
  opacity: 0.6;
}
.status {
  margin: 16px 0 0;
  min-height: 1.6em;
}
.status.ok {
  color: var(--white);
}
.status.error,
.result-error {
  color: #ff9b8f; /* readable on black, used only for errors */
}

/* honeypot: out of sight for people, still in the form for bots */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* no-JavaScript results, shown after the redirect back to /#sent */
.result {
  display: none;
  grid-column: 1 / -1;
  margin: 0;
  font-weight: 700;
}
.result:target {
  display: block;
}

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

.site-footer {
  border-top: 1px solid var(--rule-dark);
  font-size: 0.9375rem;
  color: var(--steel);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
  padding-top: 32px;
  padding-bottom: 40px;
}
.site-footer nav {
  display: flex;
  gap: 24px;
}
.site-footer a {
  color: var(--silver);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

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

.legal {
  padding: 140px 0 100px;
}
.legal .wrap {
  max-width: 820px;
}
.legal h1 {
  margin: 0 0 48px;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--white);
}
.legal h2 {
  margin: 44px 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
}
.legal h3 {
  margin: 28px 0 8px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--silver);
}
.legal p,
.legal ul {
  margin: 0 0 16px;
  font-size: 1rem;
  line-height: 1.7;
}
.legal ul {
  padding-left: 1.2em;
}
.legal a {
  color: var(--white);
  text-decoration-color: var(--steel);
  text-underline-offset: 3px;
}

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

@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    padding-top: 110px;
    padding-bottom: 32px;
  }
  .cube {
    width: min(72%, 340px);
  }
  .services {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .founder .wrap,
  .contact .wrap {
    grid-template-columns: 1fr;
  }
  .site-header .brand img {
    width: 140px;
  }
  .founder .portrait {
    max-width: 280px;
    margin-top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .cube img {
    animation: none;
    transition: none;
    transform: none;
  }
}
