/* Clarendon — clarendonestate.co.uk
   Brand palette: cream #F2EBDD, ink #1A1A1A
   Typography: Hoefler Text serif on macOS/iOS, Georgia on Windows, system serif elsewhere
*/

/* ─── Reset & base ─────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

:root {
  --cream: #F2EBDD;
  --ink: #1A1A1A;
  --muted: #555555;
  --rule: rgba(26, 26, 26, 0.15);
  --serif: "Hoefler Text", "Big Caslon", "Garamond", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --measure: 36rem;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-ligatures: common-ligatures;
}

@media (min-width: 720px) {
  html, body { font-size: 18px; }
}

body { min-height: 100vh; }

p { margin: 0 0 1.2em; }
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 3px;
  transition: opacity 0.15s ease;
}
a:hover { opacity: 0.6; }
abbr { text-decoration: none; }

/* ─── Accessibility ────────────────────────────────────────────── */

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 100;
}
.skip-link:focus { top: 0; }

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

/* ─── Layout ───────────────────────────────────────────────────── */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section, header.hero, figure {
  margin: 0;
  padding: 5rem 0;
}

@media (min-width: 720px) {
  section, header.hero, figure { padding: 7rem 0; }
}

/* Section dividers — single thin rule */
section + section,
section + figure,
figure + section,
header.hero + section {
  border-top: 0.5px solid var(--rule);
}

/* ─── Hero ─────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding-top: 8rem;
  padding-bottom: 6rem;
}

@media (min-width: 720px) {
  .hero { padding-top: 12rem; padding-bottom: 8rem; }
}

.wordmark {
  display: block;
  width: 80%;
  max-width: 420px;
  height: auto;
  margin: 0 auto 1.5rem;
}

.tagline {
  font-style: italic;
  font-size: 1.1em;
  color: var(--ink);
  margin: 0;
}

/* ─── Story ────────────────────────────────────────────────────── */

.story p {
  font-size: 1.05em;
  line-height: 1.75;
}

.story p:last-child {
  margin-bottom: 0;
  margin-top: 2rem;
  text-align: center;
  font-style: italic;
}

/* ─── Archival image ───────────────────────────────────────────── */

.archival {
  text-align: center;
}

.archival picture {
  display: block;
}

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

.archival figcaption {
  font-size: 0.9em;
  color: var(--ink);
  margin-top: 1rem;
}

/* ─── Facts ────────────────────────────────────────────────────── */

.facts dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.facts dl > div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1.5rem;
  padding: 0.65rem 0;
  border-bottom: 0.5px solid var(--rule);
}

.facts dl > div:last-child { border-bottom: none; }

.facts dt {
  font-family: var(--sans);
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0;
  align-self: center;
}

.facts dd {
  margin: 0;
  font-size: 1em;
  color: var(--ink);
}

/* ─── Contact ──────────────────────────────────────────────────── */

.contact-line {
  margin: 0 0 0.6em;
}

.contact-line:last-child { margin-bottom: 0; }

.contact a {
  word-break: break-word;
}

/* ─── Lettings (tenant form) ───────────────────────────────────── */

.lettings h2 {
  font-family: var(--serif);
  font-weight: normal;
  font-style: italic;
  font-size: 1.6em;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

.lettings-intro {
  margin-bottom: 2.5rem;
}

.lettings-form {
  display: grid;
  gap: 1.25rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

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

label {
  font-family: var(--sans);
  font-size: 0.85em;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.optional {
  color: var(--muted);
  font-weight: normal;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
select,
textarea {
  font-family: var(--serif);
  font-size: 1em;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 0.5px solid var(--ink);
  padding: 0.5rem 0;
  margin: 0;
  width: 100%;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-bottom-width: 1.5px;
  border-bottom-color: var(--ink);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1 L5 5 L9 1' fill='none' stroke='%231A1A1A' stroke-width='0.7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.25rem center;
  background-size: 10px;
  padding-right: 1.5rem;
}

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

button[type="submit"] {
  font-family: var(--serif);
  font-size: 1em;
  color: var(--cream);
  background: var(--ink);
  border: 0.5px solid var(--ink);
  padding: 0.9rem 2rem;
  margin-top: 0.5rem;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s ease, color 0.15s ease;
  width: 100%;
}

@media (min-width: 560px) {
  button[type="submit"] { width: auto; justify-self: start; }
}

button[type="submit"]:hover {
  background: var(--cream);
  color: var(--ink);
}

/* Honeypot — hidden from users, present for bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ─── Footer ───────────────────────────────────────────────────── */

footer {
  border-top: 0.5px solid var(--rule);
  margin: 0 auto;
  max-width: var(--measure);
  padding: 3rem 1.5rem 4rem;
  text-align: center;
}

.footer-line {
  font-size: 0.9em;
  margin-bottom: 0.4em;
}

.footer-fineprint {
  font-family: var(--sans);
  font-size: 0.7em;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
}

/* ─── Print ────────────────────────────────────────────────────── */

@media print {
  body { background: var(--cream); color: var(--ink); }
  .lettings-form, .skip-link { display: none; }
  section, header.hero, figure { padding: 2rem 0; }
}
