/* =====================================================
   JACK WORRILL
   CONTACT PAGE STYLES
===================================================== */

/* =====================================================
   ROOT VARIABLES
===================================================== */

:root {
  --cream: #eadcc5;
  --black: #080808;
  --dark: #151311;
  --gold: #c6a15c;

  --text: #171513;
  --muted: #5b554d;
  --border: #9d9589;

  --serif: "Cormorant Garamond", serif;
  --display: "Playfair Display", serif;
  --sans: "Inter", sans-serif;
}

/* =====================================================
   RESET
===================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);

  color: var(--text);

  font-family: var(--sans);

  line-height: 1.5;

  overflow-x: hidden;
}

a {
  text-decoration: none;

  color: inherit;
}

img {
  display: block;

  max-width: 100%;

  height: auto;
}

button,
input,
textarea {
  font: inherit;
}

/* =====================================================
   ACCESSIBILITY
===================================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);

  outline-offset: 4px;
}

::selection {
  background: var(--gold);

  color: var(--black);
}

/* =====================================================
   NAVIGATION
===================================================== */

.site-nav {
  position: fixed;

  top: 0;
  left: 0;

  width: 100%;

  height: 85px;

  padding: 0 7%;

  display: flex;

  align-items: center;

  justify-content: space-between;

  background: rgba(0, 0, 0, 0.7);

  color: white;

  z-index: 1000;

  backdrop-filter: blur(10px);

  -webkit-backdrop-filter: blur(10px);

  transition:
    height 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}

/* Navigation when page is scrolled */

.site-nav.scrolled {
  height: 72px;

  background: rgba(8, 8, 8, 0.95);

  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
}

.brand {
  font-family: var(--display);

  font-size: 1.2rem;

  font-weight: 600;

  letter-spacing: 4px;

  white-space: nowrap;
}

nav {
  display: flex;

  align-items: center;

  gap: 35px;
}

nav a {
  position: relative;

  font-family: var(--serif);

  font-size: 1.1rem;

  transition: color 0.3s ease;
}

nav a::after {
  content: "";

  position: absolute;

  left: 0;

  bottom: -7px;

  width: 0;

  height: 1px;

  background: var(--gold);

  transition: width 0.3s ease;
}

nav a:hover {
  color: var(--gold);
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

nav a.active {
  color: var(--gold);
}

/* =====================================================
   MOBILE MENU
===================================================== */

.menu-toggle {
  display: none;

  width: 42px;

  height: 42px;

  padding: 5px;

  border: 0;

  background: transparent;

  cursor: pointer;

  z-index: 1001;
}

.menu-toggle span {
  display: block;

  width: 27px;

  height: 1px;

  background: white;

  margin: 6px auto;

  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

/* =====================================================
   HERO
===================================================== */

.contact-hero {
  min-height: 70vh;

  display: flex;

  align-items: flex-end;

  padding: 100px 8%;

  color: white;

  background:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.9)),
    url("../assets/hero.jpg") center center / cover no-repeat;
}

.contact-hero > div {
  width: 100%;

  max-width: 1100px;
}

.contact-hero p {
  color: var(--gold);

  letter-spacing: 5px;

  font-size: 0.7rem;

  font-weight: 500;

  margin-bottom: 25px;
}

.contact-hero h1 {
  font-family: var(--serif);

  font-size: clamp(4rem, 9vw, 8rem);

  font-weight: 300;

  line-height: 0.85;

  letter-spacing: -1px;
}

.contact-hero em {
  color: var(--cream);

  display: block;

  font-style: italic;
}

/* =====================================================
   CONTACT SECTION
===================================================== */

.contact-section {
  width: 100%;

  max-width: 1200px;

  margin: auto;

  padding: 140px 7%;

  display: grid;

  grid-template-columns:
    minmax(0, 0.8fr)
    minmax(0, 1.2fr);

  gap: 100px;

  align-items: start;
}

.contact-intro {
  min-width: 0;
}

.contact-intro span {
  display: inline-block;

  color: #92733f;

  font-size: 0.7rem;

  font-weight: 500;

  letter-spacing: 4px;
}

.contact-intro h2 {
  font-family: var(--serif);

  font-size: clamp(3rem, 6vw, 5rem);

  line-height: 0.9;

  font-weight: 400;

  margin: 25px 0;
}

.contact-intro p {
  font-family: var(--serif);

  color: var(--muted);

  font-size: 1.25rem;

  line-height: 1.8;

  max-width: 500px;
}

/* =====================================================
   CONTACT FORM
===================================================== */

.contact-form {
  display: flex;

  flex-direction: column;

  width: 100%;
}

.contact-form label {
  display: block;

  font-size: 0.7rem;

  font-weight: 500;

  letter-spacing: 2px;

  margin-bottom: 8px;

  margin-top: 20px;
}

.contact-form label:first-of-type {
  margin-top: 0;
}

.contact-form input,
.contact-form textarea {
  width: 100%;

  padding: 15px 0;

  border: 0;

  border-bottom: 1px solid var(--border);

  background: transparent;

  outline: none;

  color: var(--text);

  font-family: var(--sans);

  font-size: 0.95rem;

  border-radius: 0;

  transition: border-color 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #81796d;

  opacity: 0.8;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-bottom-color: var(--gold);
}

.contact-form textarea {
  min-height: 160px;

  resize: vertical;

  line-height: 1.6;
}

/* =====================================================
   SUBMIT BUTTON
===================================================== */

.contact-form button {
  align-self: flex-start;

  margin-top: 35px;

  padding: 17px 30px;

  border: 1px solid #171513;

  background: #171513;

  color: white;

  cursor: pointer;

  letter-spacing: 2px;

  font-size: 0.7rem;

  font-weight: 500;

  transition:
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease;
}

.contact-form button:hover {
  background: var(--gold);

  border-color: var(--gold);

  color: #111;

  transform: translateY(-3px);
}

.contact-form button:active {
  transform: translateY(0);
}

/* =====================================================
   FOOTER
===================================================== */

footer {
  background: var(--black);

  color: white;

  text-align: center;

  padding: 70px 20px;
}

.footer-brand {
  font-family: var(--display);

  font-size: 1.4rem;

  font-weight: 600;

  letter-spacing: 5px;
}

footer p {
  color: #888;

  margin-top: 15px;
}

.footer-links {
  display: flex;

  justify-content: center;

  align-items: center;

  flex-wrap: wrap;

  gap: 25px;

  margin-top: 30px;
}

.footer-links a {
  color: #aaa;

  font-family: var(--serif);

  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--gold);
}

.copyright {
  font-size: 0.7rem;

  margin-top: 40px;
}

/* =====================================================
   SCROLL REVEAL
===================================================== */

.scroll-reveal {
  opacity: 0;

  transform: translateY(30px);

  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.scroll-reveal.visible {
  opacity: 1;

  transform: translateY(0);
}

/* =====================================================
   TABLET / MOBILE NAVIGATION
===================================================== */

@media (max-width: 900px) {
  .site-nav {
    height: 75px;

    padding: 0 6%;
  }

  .site-nav.scrolled {
    height: 68px;
  }

  nav {
    position: fixed;

    top: 0;

    right: -100%;

    width: min(80%, 400px);

    height: 100vh;

    padding: 100px 30px;

    background: #080808;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    gap: 30px;

    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.35);

    transition: right 0.4s ease;
  }

  nav.open {
    right: 0;
  }

  nav a {
    font-size: 1.4rem;
  }

  .menu-toggle {
    display: block;
  }

  /* Hamburger animation */

  nav.open ~ .menu-toggle span:first-child {
    transform: translateY(7px) rotate(45deg);
  }

  nav.open ~ .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  nav.open ~ .menu-toggle span:last-child {
    transform: translateY(-7px) rotate(-45deg);
  }

  .contact-section {
    grid-template-columns: 1fr;

    gap: 60px;

    padding: 110px 7%;
  }

  .contact-intro p {
    max-width: 700px;
  }
}

/* =====================================================
   TABLET
===================================================== */

@media (max-width: 700px) {
  .contact-hero {
    min-height: 65vh;

    padding: 90px 7%;
  }

  .contact-hero h1 {
    font-size: clamp(4rem, 12vw, 6rem);
  }

  .contact-section {
    padding: 90px 7%;
  }

  .contact-intro h2 {
    font-size: clamp(3rem, 12vw, 4.5rem);
  }

  .contact-intro p {
    font-size: 1.15rem;
  }
}

/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 480px) {
  .site-nav {
    padding: 0 5%;
  }

  .brand {
    font-size: 0.95rem;

    letter-spacing: 3px;
  }

  nav {
    width: 100%;
  }

  .contact-hero {
    min-height: 62vh;

    padding: 90px 6% 70px;
  }

  .contact-hero p {
    font-size: 0.6rem;

    letter-spacing: 3px;
  }

  .contact-hero h1 {
    font-size: clamp(3.5rem, 16vw, 5rem);
  }

  .contact-section {
    padding: 75px 6%;

    gap: 50px;
  }

  .contact-intro span {
    font-size: 0.62rem;

    letter-spacing: 3px;
  }

  .contact-intro h2 {
    font-size: clamp(2.8rem, 14vw, 4rem);
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 0.9rem;
  }

  .contact-form button {
    width: 100%;

    padding: 17px 20px;
  }

  .footer-links {
    gap: 15px;
  }
}

/* =====================================================
   REDUCED MOTION
===================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;

    scroll-behavior: auto !important;
  }

  .scroll-reveal {
    opacity: 1;

    transform: none;
  }
}
