@font-face {
  font-family: Cinzel;
  src: url("../fonts/Cinzel-variable.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: Montserrat;
  src: url("../fonts/Montserrat-variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #0b1a2e;
  --panel: #0e2037;
  --field: #0a182b;
  --gold: #ffd25d;
  --gold-line: #8b733e;
  --ink: #f7f8fb;
  --muted: #c7d3e4;
  --line: #586880;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(ellipse at 15% 4%, #203451 0, var(--background) 60%);
  font: 400 1rem/1.6 Montserrat, Arial, sans-serif;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--gold);
}

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

.site-width {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.contact-header, .contact-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 24px;
}

.contact-header {
  min-height: 92px;
  padding-block: 14px;
  border-bottom: 1px solid var(--gold-line);
}

.contact-brand, .contact-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-brand {
  color: var(--ink);
  font: 700 clamp(1rem, 2.3vw, 1.36rem)/1.25 Cinzel, Georgia, serif;
  text-decoration: none;
}

.contact-brand img, .contact-logos img {
  flex: 0 0 auto;
  object-fit: contain;
}

.contact-nav a {
  font-size: 0.9rem;
  font-weight: 650;
}

.contact-nav select {
  appearance: none;
  min-height: 44px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(45deg, transparent 50%, var(--gold) 50%) right 16px top 19px / 6px 6px no-repeat,
    linear-gradient(135deg, var(--gold) 50%, transparent 50%) right 10px top 19px / 6px 6px no-repeat,
    var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
}

.contact-main {
  padding-block: clamp(32px, 7vw, 82px);
}

h1, h2 {
  margin: 0;
  color: var(--gold);
  font-family: Cinzel, Georgia, serif;
}

h1 {
  font-size: clamp(2rem, 6vw, 4.15rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

h2 {
  font-size: clamp(1.25rem, 2.45vw, 1.63rem);
  line-height: 1.28;
}

.contact-intro {
  max-width: 62ch;
  margin: 16px 0 32px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.25fr);
  grid-template-areas:
    "team message"
    "newsletter message";
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 24px;
}

.contact-card {
  min-width: 0;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--gold-line);
  border-radius: 16px;
  background-color: var(--panel);
}

.contact-channel {
  grid-area: team;
  background-image: radial-gradient(ellipse at 0 0, #432337 0, transparent 74%);
}

.contact-logos {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.contact-channel p {
  margin: 12px 0 2px;
  color: var(--muted);
}

.contact-channel a {
  display: inline-block;
  min-height: 38px;
  color: var(--gold);
  font-size: 1.05rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.contact-channel .order-tip {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--gold-line);
}

.contact-newsletter {
  grid-area: newsletter;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(72px, 33%);
  gap: 16px;
  align-items: center;
  padding: clamp(16px, 2.4vw, 24px);
  background-image: radial-gradient(ellipse at 100% 100%, #432337, transparent 75%);
}

.contact-newsletter h2 {
  font-size: clamp(1.12rem, 1.8vw, 1.48rem);
}

.contact-newsletter p {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-newsletter img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--gold-line);
  border-radius: 9px;
}

.newsletter-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid var(--gold-line);
  border-radius: 8px;
  color: var(--gold);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.newsletter-link:hover {
  border-color: var(--gold);
  background-color: var(--field);
}

.contact-form {
  grid-area: message;
}

.contact-form, .contact-fields {
  display: grid;
  gap: 16px;
}

.contact-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-form label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.92rem;
  font-weight: 650;
}

.contact-form input, .contact-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
}

.contact-form textarea {
  display: block;
  min-height: 128px;
  resize: vertical;
}

.character-count {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: right;
}

.contact-form button {
  justify-self: start;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: var(--gold);
  color: var(--field);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.contact-form button:hover:enabled {
  background: #ffe18e;
}

.contact-form button:disabled {
  border-color: var(--line);
  background: var(--field);
  color: var(--muted);
  cursor: default;
}

.contact-note, .contact-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-status:not(:empty) {
  padding: 8px 0 0;
  border-top: 1px solid var(--line);
}

.contact-footer {
  min-height: 76px;
  padding-block: 14px;
  border-top: 1px solid var(--gold-line);
  color: var(--muted);
  font-size: 0.9rem;
}

.screen-reader {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "team"
      "message"
      "newsletter";
    grid-template-rows: auto;
  }

  .contact-header {
    flex-wrap: wrap;
  }
}

@media (max-width: 500px) {
  .site-width {
    width: calc(100% - 32px);
  }

  .contact-brand img {
    width: 48px;
    height: 48px;
  }

  .contact-nav, .contact-footer {
    flex-wrap: wrap;
  }

  .contact-fields {
    grid-template-columns: 1fr;
  }
}
