/* The Summit Collection — single-page site.
   Fonts are self-hosted (SIL Open Font License; notices in assets/fonts/). */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-garamond-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("assets/fonts/dm-sans-latin-opsz-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --white: #ffffff;
  --ink: #111111;
  --ink-soft: #3b3b3b;
  --muted: #666666;
  --gold: #c19435;
  --hairline: #e6e2d9;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 0.6rem + 3.2vw, 4rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
p,
dl,
dd,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--white);
  font-size: 0.875rem;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Page frame ---------- */

.page {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Masthead ---------- */

.masthead {
  display: flex;
  justify-content: center;
  padding-top: clamp(2rem, 1rem + 4vh, 3.75rem);
}

.brand {
  width: min(100%, 34rem);
  font-size: 1rem;
  line-height: 0;
}

.logo {
  width: 100%;
}

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

.main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(3.5rem, 2rem + 7vh, 6.5rem) clamp(2.5rem, 1.5rem + 4vh, 4.5rem);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-heading {
  width: 100%;
  max-width: 58rem;
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
}

.hero-lead {
  display: block;
  font-size: clamp(2.5rem, 1.35rem + 4.6vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.012em;
}

.hero-sub {
  display: block;
  max-width: 30ch;
  margin: clamp(0.85rem, 0.6rem + 0.8vw, 1.35rem) auto 0;
  font-size: clamp(1.3rem, 1.05rem + 1vw, 1.95rem);
  line-height: 1.3;
  color: var(--ink-soft);
}

.rule {
  display: block;
  width: 3.5rem;
  height: 1px;
  margin: clamp(2rem, 1.5rem + 1.6vw, 2.75rem) auto;
  background: var(--gold);
}

.invitation {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1.8;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 3.25rem;
  margin-top: 1.75rem;
  padding: 0.9rem 2.1rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 240ms var(--ease), border-color 240ms var(--ease), color 240ms var(--ease);
}

.cta-arrow {
  display: inline-block;
  font-size: 1rem;
  letter-spacing: 0;
  transition: transform 240ms var(--ease);
}

.cta:hover {
  background: var(--white);
  color: var(--ink);
  border-color: var(--gold);
}

.cta:hover .cta-arrow {
  transform: translateX(4px);
}

.cta:focus-visible {
  outline-color: var(--gold);
}

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

.contact {
  width: min(100%, 46rem);
  margin: clamp(3.5rem, 2rem + 5vh, 5.5rem) auto 0;
  border-top: 1px solid var(--hairline);
}

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

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.75rem 1rem 0;
  text-align: center;
}

.contact-item + .contact-item {
  border-left: 1px solid var(--hairline);
}

.contact-item dt {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--gold), var(--gold));
  background-repeat: no-repeat;
  background-position: 0 calc(100% - 0.55rem);
  background-size: 0 1px;
  transition: background-size 320ms var(--ease);
  overflow-wrap: anywhere;
}

.contact-link:hover,
.contact-link:focus-visible {
  background-size: 100% 1px;
}

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

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
}

.footer-button {
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.35em;
  transition: color 200ms var(--ease), text-decoration-color 200ms var(--ease);
}

.footer-button:hover,
.footer-button:focus-visible {
  color: var(--ink);
  text-decoration-color: var(--gold);
}

/* ---------- Dialogs ---------- */

.dialog {
  width: min(calc(100% - 2rem), 32rem);
  max-height: calc(100% - 2rem);
  padding: 0;
  border: 0;
  border-top: 2px solid var(--gold);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 30px 80px -30px rgba(17, 17, 17, 0.35);
}

.dialog::backdrop {
  background: rgba(17, 17, 17, 0.42);
}

.dialog[open] {
  animation: dialog-in 260ms var(--ease);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dialog-inner {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dialog-title {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.15;
}

.dialog-close {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: -0.5rem -0.75rem 0 0;
  padding: 0;
  border: 1px solid transparent;
  background: none;
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 200ms var(--ease);
}

.dialog-close:hover {
  border-color: var(--gold);
}

.rule--dialog {
  margin: 1.25rem 0 1.5rem;
}

.dialog-list {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.dialog-list dt {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.dialog-list dd {
  font-size: 0.975rem;
}

.dialog-text {
  font-size: 0.975rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.dialog-text + .dialog-text {
  margin-top: 0.9rem;
}

.text-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  overflow-wrap: anywhere;
}

/* Text stays dark for contrast; only the gold underline strengthens. */
.text-link:hover,
.text-link:focus-visible {
  color: var(--ink);
  text-decoration-thickness: 2px;
}

/* ---------- Small screens ---------- */

@media (max-width: 599px) {
  .main {
    justify-content: flex-start;
  }

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

  .contact-item {
    padding: 1.5rem 0 0;
  }

  .contact-item + .contact-item {
    border-left: 0;
  }

  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 1rem;
  }

  .footer-links {
    justify-content: center;
  }
}

/* ---------- Short desktop windows ---------- */

@media (min-width: 900px) and (max-height: 760px) {
  .main {
    padding-block: 2.5rem 2rem;
  }

  .contact {
    margin-top: 2.5rem;
  }

  .rule {
    margin-block: 1.6rem;
  }
}

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