:root {
  color-scheme: dark;
  --background: #191916;
  --text: #fcf6ea;
  --muted: #ddd5c7;
  --accent: #d4bc91;
  --rule: #fcf6ea38;
  --serif: Georgia, 'Times New Roman', serif;
  --gutter: clamp(1rem, 4.5vw, 4.5rem);
  font-family: system-ui, sans-serif;
  background: var(--background);
  color: var(--text);
}

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

body {
  display: grid;
  grid-template-rows: minmax(6rem, auto) 1fr minmax(6rem, auto);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding-inline: var(--gutter);
  background:
    linear-gradient(180deg, #141410e8, #14141082 43%, #141410ae 70%, #141410f5),
    url('assets/main.jpg') center / cover no-repeat;
}

a, button {
  color: inherit;
}

button {
  font: inherit;
  cursor: pointer;
}

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

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  padding-block: 0.75rem;
}

.brand {
  grid-column: 2;
}

.brand-image {
  display: block;
  width: auto;
  height: clamp(3.5rem, 9vw, 4.5rem);
}

.contact-button {
  grid-column: 3;
  justify-self: end;
  display: inline-grid;
  min-height: 2.75rem;
  padding-inline: clamp(0.65rem, 2vw, 1.3rem);
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 0.25rem;
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.contact-button:hover {
  border-color: #d4bc9180;
  background: #fcf6ea0d;
  color: var(--text);
}

.hero {
  display: grid;
  min-height: 18rem;
  padding: 2rem clamp(0.75rem, 3vw, 3rem);
  place-items: center;
  border-block: 1px solid var(--rule);
  text-align: center;
}

.hero-content {
  display: grid;
  justify-items: center;
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

.hero h1 {
  max-width: 22ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6.1vw, 6rem);
  font-weight: 400;
  letter-spacing: 0.035em;
  line-height: 1.06;
  text-wrap: balance;
  text-shadow: 0 2px 1.25rem #100f0c99;
}

.hero p {
  max-width: 44ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  line-height: 1.5;
  text-wrap: balance;
  text-shadow: 0 1px 0.75rem #100f0cb3;
}

.site-footer, .footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.site-footer {
  justify-content: space-between;
  padding-block: 0.6rem;
  color: var(--muted);
}

.site-footer small, .footer-links {
  font-size: 0.875rem;
}

.footer-links {
  justify-content: flex-end;
}

.footer-links button, .footer-links a, .dialog-close button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: none;
}

.footer-links button:hover, .footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

dialog {
  color-scheme: light;
  width: min(100% - 2rem, 30rem);
  max-height: calc(100% - 2rem);
  padding: 0;
  border: 0;
  border-radius: 1rem;
  background: #fff;
  color: #171717;
  box-shadow: 0 1.25rem 4rem #0003;
}

dialog::backdrop {
  background: #141410a8;
}

dialog :focus-visible {
  outline-color: #555;
}

.dialog-content {
  position: relative;
  padding: clamp(1.5rem, 5vw, 2.25rem);
}

.dialog-close {
  position: absolute;
  inset: 0.75rem 0.75rem auto auto;
}

.dialog-close button {
  justify-content: center;
  width: 2.75rem;
  border-radius: 50%;
  color: #555;
  font-size: 1.5rem;
}

.dialog-close button:hover {
  background: #f3f3f3;
  color: #171717;
}

.dialog-content h2 {
  margin: 0 2.5rem 0.875rem 0;
  font: 400 2rem / 1.15 var(--serif);
}

.dialog-content p {
  margin: 0.75rem 0 0;
  color: #555;
  line-height: 1.65;
}

.dialog-content a {
  color: #242424;
  overflow-wrap: anywhere;
  text-decoration-color: #888;
  text-underline-offset: 0.16em;
}

.dialog-content a:hover {
  text-decoration-color: currentColor;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes title-glint {
  0% { background-position: right center; }
  28%, 100% { background-position: left center; }
}

@keyframes subtitle-glow {
  0%, 12%, 42%, 100% {
    color: var(--muted);
    transform: translateY(0);
  }

  25% {
    color: var(--text);
    transform: translateY(-2px);
  }
}

@media screen and (prefers-reduced-motion: no-preference) {
  .brand-image {
    animation: reveal 520ms ease-out both;
  }

  .hero-content {
    --glint-cycle: 9s;
    --glint-delay: 5s;
    animation: reveal 720ms ease-out 80ms both;
  }

  @supports (background-clip: text) or (-webkit-background-clip: text) {
    .hero h1 {
      background: linear-gradient(105deg,
        var(--text) 42%, #efc88b 47%, #fffdf5 50%, #efc88b 53%, var(--text) 58%
      ) right center / 260% 100% no-repeat;
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      text-shadow: none;
      filter: drop-shadow(0 2px 1.25rem #100f0c99);
      animation: title-glint var(--glint-cycle) ease-in-out var(--glint-delay) infinite;
    }
  }

  .hero p {
    animation: subtitle-glow var(--glint-cycle) ease-in-out var(--glint-delay) infinite;
  }

  dialog[open] {
    animation: reveal 220ms ease-out;
  }

  dialog[open]::backdrop {
    animation: fade-in 220ms ease-out;
  }

  .contact-button {
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
  }
}

@media (forced-colors: active) {
  .hero h1 {
    background: none;
    color: CanvasText;
    filter: none;
    animation: none;
  }
}

@media (max-width: 42rem) {
  .hero h1 {
    font-size: clamp(2rem, 9.6vw, 2.4rem);
  }

  .site-footer {
    justify-content: center;
    gap: 0.15rem 1.25rem;
  }

  .footer-links {
    justify-content: center;
    column-gap: clamp(0.65rem, 4vw, 1.1rem);
  }
}
