/* Shore Edit holding page. Brand values taken from the WordPress site's
   Elementor kit (linen #F4EDE1, charcoal #231F20, Playfair Display 400). */

@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfair-display-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Average Sans";
  src: url("fonts/average-sans-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --linen: #F4EDE1;
  --linen-deep: #E9DFCE;
  --charcoal: #231F20;
  --stone: #6E6461;
  --paper: #FFFEFE;
  --error: #8E2A22;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Average Sans", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1rem, 4vw, 3.5rem);
}

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

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

body {
  margin: 0;
  background: var(--linen);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--charcoal);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  padding: 0.5rem 1rem;
  background: var(--charcoal);
  color: var(--linen);
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

/* ---- Layout -------------------------------------------------------------- */

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "header"
    "arch"
    "intro"
    "form"
    "footer";
  padding: 1.5rem var(--gutter) 0;
  max-width: 78rem;
  margin: 0 auto;
}

.site-header { grid-area: header; }
.arch        { grid-area: arch; }
.intro       { grid-area: intro; }
.enquiry     { grid-area: form; }
.site-footer { grid-area: footer; }

@media (min-width: 900px) {
  .page {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
      "header header"
      "intro  arch"
      "form   arch"
      "footer footer";
    column-gap: clamp(3rem, 7vw, 7rem);
    padding-top: 2.25rem;
  }
}

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

.site-header {
  padding-bottom: 2rem;
}

.logo {
  width: clamp(150px, 16vw, 200px);
  height: auto;
}

/* ---- The arch ------------------------------------------------------------ */

.arch {
  margin: 0 0 2.5rem;
}

.arch-frame {
  position: relative;
  border-radius: 999px 999px 0 0;
  overflow: hidden;
  aspect-ratio: 5 / 6;
  max-height: 62svh;
  width: 100%;
  margin-inline: auto;
  background: var(--linen-deep);
  animation: arch-rise 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.arch-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 48% 50%;
}

@media (min-width: 900px) {
  .arch {
    margin: 0;
    align-self: start;
    position: sticky;
    top: 2.25rem;
  }

  .arch-frame {
    aspect-ratio: 4 / 5.4;
    max-height: calc(100vh - 8rem);
  }
}

@keyframes arch-rise {
  from { clip-path: inset(100% 0 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* ---- Intro --------------------------------------------------------------- */

.intro {
  max-width: 34rem;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

.intro p {
  margin: 0 0 1rem;
  max-width: 32rem;
}

.intro .lede {
  font-size: 1.25rem;
}

/* ---- Form ---------------------------------------------------------------- */

.enquiry {
  max-width: 34rem;
  padding: 2.5rem 0 3.5rem;
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 0 0 1.5rem;
}

.field {
  margin: 0 0 1.5rem;
}

.field-row {
  display: grid;
  gap: 0 1.5rem;
}

@media (min-width: 560px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.optional {
  color: var(--stone);
}

input,
textarea {
  width: 100%;
  font: inherit;
  color: var(--charcoal);
  background: var(--paper);
  border: 1px solid var(--charcoal);
  border-radius: 2px;
  padding: 0.7rem 0.85rem;
  appearance: none;
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible {
  outline-offset: 0;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--error);
  border-width: 2px;
}

.field-error {
  color: var(--error);
  font-size: 0.95rem;
  margin: 0.35rem 0 0;
}

.field-error:empty {
  display: none;
}

/* Netlify's honeypot: hidden from people, visible to naive bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.button {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1;
  color: var(--charcoal);
  background: transparent;
  border: 1px solid var(--charcoal);
  border-radius: 999px;
  padding: 0.95rem 2.25rem 1.05rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.button:hover {
  background: var(--charcoal);
  color: var(--linen);
}

.button[disabled] {
  cursor: progress;
  opacity: 0.6;
}

.form-status {
  margin: 1.25rem 0 0;
}

.form-status.is-error {
  color: var(--error);
}

.sent h2 {
  margin-bottom: 0.75rem;
}

.sent p {
  margin: 0;
}

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid rgba(35, 31, 32, 0.2);
  font-size: 1rem;
}

.site-footer p {
  margin: 0;
}

.site-footer .copyright {
  margin-left: auto;
  color: var(--stone);
}

@media (max-width: 559px) {
  .site-footer .copyright {
    margin-left: 0;
    width: 100%;
  }
}

@media (min-width: 900px) {
  .site-footer {
    margin-top: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .arch-frame { animation: none; }
  .button { transition: none; }
}
