/* Tyre Homes — one-page site
   Palette from the brand mark: charcoal #4B4B4B, cream #FDFEF6, deep charcoal grounds.
*/

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-400.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-italic-400.woff2") format("woff2");
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/outfit-300.woff2") format("woff2");
}

:root {
  --bg: #141414;
  --bg-raised: #1c1c1c;
  --charcoal: #4b4b4b;
  --cream: #fdfef6;
  --cream-soft: #e8e6da;
  --muted: #a7a59b;
  --line: rgba(253, 254, 246, 0.16);
  --line-strong: rgba(253, 254, 246, 0.32);
  --serif: "Cormorant Garamond", "Times New Roman", Times, serif;
  --sans: "Outfit", "Segoe UI", system-ui, sans-serif;
  --content: 72rem;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --header-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.5rem);
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--cream-soft);
}

body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
  min-height: 100vh;
}

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

a {
  color: var(--cream);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: #fff;
}

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

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  background: var(--cream);
  color: var(--bg);
  padding: 0.5rem 0.85rem;
  z-index: 200;
}

.skip:focus {
  top: 0.75rem;
}

/* Header
   ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--pad);
  background: rgba(20, 20, 20, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--cream);
  flex: 0 0 auto;
}

.brand img {
  width: 3.15rem;
  height: 3.15rem;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--cream);
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  cursor: pointer;
  position: relative;
  z-index: 60;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 1.2rem;
  height: 1px;
  background: currentColor;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
}

.nav-toggle span::before {
  transform: translate(-50%, calc(-50% - 5px));
}

.nav-toggle span::after {
  transform: translate(-50%, calc(-50% + 5px));
}

#nav-toggle:checked + .nav-toggle span {
  background: transparent;
}

#nav-toggle:checked + .nav-toggle span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

#nav-toggle:checked + .nav-toggle span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.6rem;
}

.nav a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream-soft);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--cream);
}

.header-cta {
  flex: 0 0 auto;
}

.nav .btn {
  display: none;
}

/* Buttons
   ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--cream);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-solid {
  background: var(--cream);
  color: #161616;
}

.btn-solid:hover,
.btn-solid:focus-visible {
  background: #fff;
  color: #111;
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--cream);
  color: #161616;
}

.btn svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

/* Hero
   ---------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 6vw, 5rem) var(--pad);
  max-width: 40rem;
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--cream);
  text-wrap: balance;
}

.hero-location {
  margin: 1.15rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 400;
  color: var(--cream-soft);
}

.hero-lede {
  margin: 1.6rem 0 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.hero-media {
  position: relative;
  min-height: 28rem;
  border-left: 1px solid var(--line);
  overflow: hidden;
  background: #0d0d0d;
}

.hero-media picture,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}

.hero-media figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.7rem 1rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(253, 254, 246, 0.7);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
}

/* Shared section chrome
   ---------------------------------------------------------------- */
.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--pad);
}

.section-inner {
  max-width: var(--content);
  margin: 0 auto;
}

.section-label {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.section h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  line-height: 1.08;
  color: var(--cream);
  letter-spacing: -0.015em;
}

.lede {
  margin: 1.15rem 0 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.split p {
  margin: 1.15rem 0 0;
  color: var(--cream-soft);
}

.split p:first-of-type {
  margin-top: 1.5rem;
}

.framed {
  position: relative;
  border: 1px solid var(--line-strong);
  padding: 0.65rem;
  background: var(--bg-raised);
}

.framed img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

.framed figcaption {
  margin: 0.65rem 0.15rem 0.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Audience cards
   ---------------------------------------------------------------- */
.audience {
  background: var(--bg-raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 2.75rem;
  border: 1px solid var(--line);
}

.card {
  padding: 1.5rem 1.25rem 1.7rem;
  border-right: 1px solid var(--line);
}

.card:last-child {
  border-right: 0;
}

.card-index {
  display: block;
  margin-bottom: 1.1rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.card h3 {
  margin: 0 0 0.7rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.55rem;
  line-height: 1.15;
  color: var(--cream);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Features
   ---------------------------------------------------------------- */
.features-list {
  list-style: none;
  margin: 2.75rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.features-list li {
  display: grid;
  grid-template-columns: minmax(10rem, 16rem) 1fr;
  gap: 1.5rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.features-list h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.45rem;
  color: var(--cream);
}

.features-list p {
  margin: 0;
  color: var(--muted);
}

.note {
  margin: 1.75rem 0 0;
  max-width: 40rem;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Gallery
   ---------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
}

.tile {
  position: relative;
  overflow: hidden;
  background: #0d0d0d;
  border: 1px solid var(--line);
  min-height: 0;
}

.tile picture {
  display: block;
}

.tile img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.tile-wide {
  grid-row: 1 / 3;
}

.tile-wide img {
  aspect-ratio: 3 / 4;
}

.tile:not(.tile-wide) picture,
.tile:not(.tile-wide) img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 1.1rem 0.9rem 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
}

.gallery-note {
  margin: 1.1rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Contact
   ---------------------------------------------------------------- */
.contact {
  text-align: center;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(var(--line), var(--line)) center top / 1px 3.5rem no-repeat,
    var(--bg);
}

.contact .section-inner {
  max-width: 36rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-logo {
  width: 8.5rem;
  height: 8.5rem;
  margin-bottom: 1.5rem;
}

.contact h2 {
  text-wrap: balance;
}

.contact .lede {
  margin-left: auto;
  margin-right: auto;
}

.contact .btn {
  margin-top: 2rem;
}

/* Footer
   ---------------------------------------------------------------- */
.site-footer {
  padding: 2rem var(--pad) 2.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.85rem 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-brand {
  color: var(--cream-soft);
}

.footer-brand strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--cream);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  align-items: center;
}

.footer-meta a {
  color: var(--muted);
  text-decoration: none;
}

.footer-meta a:hover {
  color: var(--cream);
}

/* 404
   ---------------------------------------------------------------- */
.page-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-404 main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem var(--pad);
  max-width: 36rem;
}

.page-404 h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin: 0;
  color: var(--cream);
}

/* Responsive
   ---------------------------------------------------------------- */
@media (max-width: 960px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .card:nth-child(2n) {
    border-right: 0;
  }

  .card:nth-child(1),
  .card:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .card:nth-child(5) {
    grid-column: 1 / -1;
    border-right: 0;
    border-top: 0;
  }

  .features-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .tile-wide {
    grid-row: auto;
    grid-column: 1 / -1;
  }

  .tile-wide img,
  .tile:not(.tile-wide) img {
    aspect-ratio: 16 / 10;
  }

  .tile:not(.tile-wide) picture,
  .tile:not(.tile-wide) img {
    position: static;
    inset: auto;
    width: 100%;
    height: auto;
  }
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-copy {
    padding-top: 3rem;
    padding-bottom: 2.5rem;
    max-width: none;
  }

  .hero-media {
    min-height: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .hero-media img {
    aspect-ratio: 16 / 10;
    height: auto;
    object-position: center 70%;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .split .framed {
    order: -1;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .header-cta {
    display: none;
  }

  .nav .btn {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(16, 16, 16, 0.97);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 1.25rem var(--pad) 2rem;
    gap: 0;
  }

  #nav-toggle:checked ~ .nav {
    display: flex;
  }

  .nav a {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
  }

  .nav .btn {
    margin-top: 1.25rem;
    align-self: flex-start;
  }
}

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

  .card,
  .card:nth-child(2n),
  .card:nth-child(5) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .card:last-child {
    border-bottom: 0;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

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

  .site-footer {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
