/* =========================================================
   KOINONIA ART & DESIGN
   Contact page stylesheet
   ========================================================= */

:root {
  --teal: #168b8c;
  --teal-bright: #36b7b4;
  --sage: #8fa8a0;
  --paper: #f0eadb;
  --ink: #171717;
  --white: #ffffff;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", Arial, sans-serif;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--sage);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 1rem;
  left: 1rem;
  padding: .7rem 1rem;
  background: var(--white);
  color: var(--ink);
  transform: translateY(-180%);
  transition: transform .2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.site-header {
  position: absolute;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
}

.nav-shell {
  width: min(100% - 3rem, 1180px);
  min-height: 118px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.brand {
  flex: 0 0 auto;
}

.brand img {
  width: 245px;
  height: auto;
}

.primary-menu {
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  list-style: none;
}

.primary-menu a,
.site-footer a {
  position: relative;
  color: var(--white);
  text-decoration: none;
  text-transform: uppercase;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.primary-menu a::after,
.site-footer a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -.35rem;
  left: 0;
  height: 1px;
  background: var(--teal-bright);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s var(--ease);
}

.primary-menu a:hover::after,
.primary-menu a:focus-visible::after,
.primary-menu a[aria-current="page"]::after,
.site-footer a:hover::after,
.site-footer a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-toggle {
  display: none;
}

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

.contact-hero {
  position: relative;
  min-height: 300px;
  background:
    linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .62)),
    url("assets/contact-hero.jpg") center 42% / cover fixed no-repeat;
}

.contact-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .04), rgba(0, 0, 0, .16));
  pointer-events: none;
}

.title-arch {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -1px;
  width: min(380px, 48vw);
  aspect-ratio: 2 / 1;
  display: grid;
  place-items: end center;
  padding-bottom: 1.1rem;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: var(--sage);
  transform: translateX(-50%);
}

.title-arch h1 {
  margin: 0;
  color: var(--white);
  font-family: var(--serif);
  font-size: clamp(4rem, 8vw, 6rem);
  font-weight: 400;
  line-height: .9;
  letter-spacing: -.035em;
}

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

.contact-section {
  min-height: 560px;
  padding: 3rem 1.5rem 4.5rem;
  background: var(--sage);
}

.contact-shell {
  width: min(100%, 760px);
  margin: 0 auto;
}

.contact-copy {
  margin-bottom: 1.2rem;
}

.contact-copy h2 {
  max-width: 620px;
  margin: 0 0 1rem;
  color: var(--white);
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 4.8rem);
  font-weight: 400;
  line-height: .88;
  letter-spacing: -.035em;
  text-transform: uppercase;
}

.contact-copy p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, .9);
  font-size: 1.05rem;
  line-height: 1.45;
}

.contact-form {
  display: grid;
  gap: .9rem;
  max-width: 560px;
}

.form-field {
  position: relative;
}

.form-field label {
  position: absolute;
  z-index: 2;
  top: .75rem;
  left: 1rem;
  color: var(--ink);
  text-transform: uppercase;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .02em;
  pointer-events: none;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 0;
  background: rgba(250, 247, 239, .97);
  color: var(--ink);
  outline: none;
  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    transform .2s ease;
}

.form-field input {
  min-height: 50px;
  padding: 1.8rem 1rem .45rem;
}

.form-field textarea {
  min-height: 96px;
  padding: 2rem 1rem .75rem;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--teal-bright);
  box-shadow: 0 0 0 3px rgba(54, 183, 180, .18);
  transform: translateY(-1px);
}

.button {
  display: inline-flex;
  width: fit-content;
  min-width: 92px;
  min-height: 38px;
  padding: .55rem 1.1rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  color: var(--white);
  background: var(--teal-bright);
  text-transform: uppercase;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(16, 101, 101, .75);
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    background-color .2s ease;
}

.button:hover,
.button:focus-visible {
  background: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 rgba(16, 101, 101, .75);
}

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

.site-footer {
  padding: 1rem 1rem 0;
  background: var(--white);
  text-align: center;
}

.site-footer ul {
  margin: 0 auto 1rem;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
}

.site-footer a {
  color: var(--teal);
  font-size: .58rem;
}

.site-footer p {
  margin: 0 -1rem;
  padding: .4rem 1rem;
  background: #070707;
  color: rgba(255, 255, 255, .85);
  text-transform: uppercase;
  font-size: .48rem;
  letter-spacing: .04em;
}

/* ---------- Reveals ---------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity .8s var(--ease),
    transform .8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 900px) {
  .site-header {
    position: fixed;
    background: rgba(10, 10, 10, .95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .nav-shell {
    width: min(100% - 2rem, 860px);
    min-height: 72px;
    justify-content: space-between;
  }

  .brand img {
    width: 150px;
  }

  .menu-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    padding: 10px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle span:not(.sr-only) {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--white);
    transition: transform .25s ease, opacity .25s ease;
  }

  .menu-toggle[aria-expanded="true"] span:nth-of-type(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-of-type(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-of-type(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .primary-menu {
    position: absolute;
    top: 72px;
    right: 0;
    left: 0;
    width: 100%;
    margin: 0;
    padding: 1rem;
    display: grid;
    gap: .25rem;
    background: rgba(10, 10, 10, .98);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    pointer-events: none;
    transition:
      opacity .25s ease,
      transform .3s var(--ease),
      visibility .25s ease;
  }

  .primary-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .primary-menu a {
    display: block;
    padding: .9rem;
    text-align: center;
  }

  .contact-hero {
    min-height: 285px;
    background-attachment: scroll;
  }

  .title-arch {
    width: min(360px, 65vw);
  }
}

@media (max-width: 620px) {
  .contact-hero {
    min-height: 250px;
  }

  .title-arch {
    width: min(300px, 78vw);
  }

  .title-arch h1 {
    font-size: 3.7rem;
  }

  .contact-section {
    padding: 2.5rem 1.25rem 4rem;
  }

  .contact-copy h2 {
    font-size: clamp(2.65rem, 14vw, 4rem);
  }

  .contact-copy p {
    font-size: .95rem;
  }

  .contact-form {
    max-width: none;
  }

  .site-footer ul {
    gap: .8rem;
  }
}

/* Respect visitors who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
