/* =========================================================
   AICE TECH WEBSITE
   Responsive recreation of the supplied Squarespace layout
   ========================================================= */

:root {
  --ink: #05070b;
  --paper: #efeff3;
  --aice-blue: #8eb7dc;
  --deep-blue: #07345a;
  --bright-blue: #5aa9ff;
  --white: #ffffff;

  --page-padding: clamp(1rem, 3vw, 2.5rem);
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Arial, Helvetica, sans-serif;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.45;
}

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

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

section {
  scroll-margin-top: 5rem;
}

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

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

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0.85rem var(--page-padding);
  color: var(--white);
}

.brand,
.footer-brand {
  font-family: var(--serif);
  text-decoration: none;
}

.brand {
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.5vw, 2rem);
}

.nav-link {
  padding: 0.15rem 0;
  border-bottom: 1px solid transparent;
  font-size: 1rem;
  text-decoration: none;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  border-bottom-color: currentColor;
}

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

.hero {
  position: relative;
  min-height: clamp(38rem, 100svh, 52rem);
  isolation: isolate;

  display: flex;
  align-items: center;

  padding: clamp(8rem, 17vh, 11rem) var(--page-padding) 4rem;

  background:
    linear-gradient(
      90deg,
      rgba(1, 35, 66, 0.78) 0%,
      rgba(20, 76, 124, 0.52) 48%,
      rgba(3, 42, 73, 0.65) 100%
    ),
    url("assets/aice-hero.png") center / cover no-repeat;
}

/* Keeps text readable over any replacement image. */
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;

  background:
    linear-gradient(
      90deg,
      rgba(0, 26, 50, 0.36) 0%,
      rgba(0, 26, 50, 0.08) 54%,
      rgba(0, 26, 50, 0.20) 100%
    );
}

.hero-content {
  width: min(43rem, 100%);
  color: var(--white);
}

.hero h1 {
  margin: 0 0 1.8rem;
  font-family: var(--serif);
  font-size: clamp(3.6rem, 6.3vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.93;
}

.hero p {
  width: min(29rem, 100%);
  margin: 0;

  font-size: clamp(1.1rem, 1.65vw, 1.45rem);
  font-weight: 600;
  line-height: 1.55;
}

/* ---------- About ---------- */

.about-section {
  min-height: 31rem;

  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4.5rem);

  padding: clamp(4rem, 8vw, 7.5rem) var(--page-padding);
  background: var(--paper);
}

.about-copy h2 {
  margin: 0 0 0.8rem;
  font-family: var(--serif);
  font-size: clamp(2.85rem, 4.1vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.about-copy p {
  max-width: 35rem;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.25vw, 2.25rem);
  line-height: 1.08;
}

.about-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-visual img {
  width: 100%;
  max-height: 33rem;
  object-fit: contain;
}

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

.contact-section {
  min-height: 36rem;

  display: grid;
  grid-template-columns: minmax(15rem, 0.98fr) minmax(22rem, 0.92fr);
  align-items: start;
  gap: clamp(2rem, 7vw, 8rem);

  padding: clamp(1.6rem, 3vw, 2.5rem) var(--page-padding)
    clamp(4rem, 8vw, 7rem);

  background: var(--aice-blue);
}

.contact-intro h2 {
  margin: 0 0 2.2rem;
  font-family: var(--serif);
  font-size: clamp(4rem, 6.2vw, 6.8rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.9;
}

.contact-intro p {
  max-width: 31rem;
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.3rem);
  line-height: 1.55;
}

.contact-form {
  width: 100%;
  max-width: 41rem;
  justify-self: end;
}

.contact-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.contact-form legend,
.contact-form label > span {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1rem;
}

.contact-form small {
  font-size: 0.86em;
  font-weight: 400;
}

.name-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.full-width-field {
  display: block;
  margin-top: 1.15rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  border: 1.5px solid var(--ink);
  outline: 0;
  background: transparent;
  color: var(--ink);
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.contact-form input[type="text"],
.contact-form input[type="email"] {
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
}

.contact-form textarea {
  min-height: 6.25rem;
  padding: 0.9rem 1rem;
  border-radius: 1.4rem;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.newsletter-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.55rem 0 1.6rem;
  cursor: pointer;
}

.newsletter-option input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--ink);
}

.newsletter-option span {
  margin: 0 !important;
}

.contact-form button {
  margin-top: 1.2rem;
  padding: 0.9rem 2rem;

  border: 1px solid var(--ink);
  border-radius: 999px;

  background: var(--ink);
  color: var(--bright-blue);

  cursor: pointer;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.contact-form button:hover,
.contact-form button:focus-visible {
  transform: translateY(-2px);
  background: var(--deep-blue);
  color: var(--white);
}

.hidden-field {
  position: absolute;
  left: -9999px;
}

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

.site-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;

  min-height: 7.8rem;
  padding: 2.4rem var(--page-padding) 1.35rem;
  background: var(--paper);
}

.footer-brand {
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1;
}

.footer-email {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.3vw, 2rem);
  text-decoration: none;
}

.footer-email:hover,
.footer-email:focus-visible {
  text-decoration: underline;
}

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

@media (max-width: 900px) {
  .about-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .about-section {
    align-items: start;
  }

  .about-copy p {
    max-width: 42rem;
  }

  .about-visual {
    margin-top: 1rem;
  }

  .contact-form {
    max-width: none;
    justify-self: stretch;
  }
}

@media (max-width: 650px) {
  .site-header {
    align-items: flex-start;
  }

  .site-nav {
    gap: 1rem;
  }

  .hero {
    min-height: 42rem;
    align-items: flex-end;
    padding-bottom: 5rem;
    background-position: center center;
  }

  .hero h1 {
    font-size: clamp(3.1rem, 14vw, 4.8rem);
  }

  .hero p {
    max-width: 23rem;
    font-size: 1.05rem;
  }

  .about-copy h2 {
    font-size: clamp(2.6rem, 12vw, 4rem);
  }

  .about-copy p {
    font-size: clamp(1.35rem, 6vw, 1.85rem);
  }

  .contact-intro h2 {
    font-size: clamp(3.9rem, 18vw, 5.8rem);
  }

  .name-fields {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
