/* Ostria Apartments — site styles */

@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-tight-600-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/open-sans-latin.woff2") format("woff2");
}

:root {
  --deep: #003446;
  --forest: #00453d;
  --mist: #f7f7f7;
  --white: #fff;
  --ink: #0a0a0a;
  --ink-soft: #404040;
  --teal: #2dd4bf;
  --teal-hover: #14b8a6;
  --teal-active: #0d9488;
  --link: #0f766e;
  --link-on-dark: #99f6e4;
  --line: #d6d4cf;
  --radius: 8px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 24px);
  --section-y: clamp(56px, 7vw, 64px);
  --header-h: 80px;
  --font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Inter Tight", "Open Sans", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
}

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

h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.625rem, 3vw, 2rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }

a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }

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

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: calc(768px + 2 * var(--gutter)); }

.section { padding-block: var(--section-y); }
.section--mist { background: var(--mist); }
.section--deep { background: var(--deep); color: var(--white); }
.section--forest { background: var(--forest); color: var(--white); }
.section--deep a:not(.btn), .section--forest a:not(.btn) { color: var(--link-on-dark); }
.section-title { text-align: center; margin-bottom: 1.25em; }
.center { text-align: center; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--white); color: var(--deep); padding: 8px 14px; border-radius: var(--radius);
}
.skip-link:focus { top: 8px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Buttons: outlined by default, as on the original site */
.btn {
  display: inline-block;
  padding: .55em 1.2em;
  font: inherit;
  line-height: 1.5;
  text-decoration: none;
  border: 2px solid var(--link);
  border-radius: var(--radius);
  background: transparent;
  color: var(--link);
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--teal); border-color: var(--teal); color: var(--ink); }
.btn:active { background: var(--teal-active); border-color: var(--teal-active); }
.btn--light { border-color: var(--teal); color: var(--teal); }
.btn--lg { font-size: 1.125rem; padding: .6em 1.3em; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--deep); color: var(--white); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; }
.brand img { width: 108px; height: auto; }

.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { display: block; padding: 6px 12px; border-radius: 5px; color: var(--white); text-decoration: none; }
.site-nav ul a:hover { background: rgba(255, 255, 255, .1); }
.site-nav ul a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--teal); text-decoration-thickness: 2px; }

.social { display: inline-flex; color: inherit; }
.social svg { width: 24px; height: 24px; fill: currentColor; }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: 8px; margin-right: -8px;
  color: var(--white); cursor: pointer;
}
.nav-toggle svg { width: 28px; height: 28px; stroke: currentColor; }

@media (max-width: 1000px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 16px;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    padding: 8px var(--gutter) 28px;
    background: var(--deep);
    border-top: 1px solid rgba(255, 255, 255, .12);
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { padding: 12px 0; font-size: 1.125rem; border-radius: 0; }
  .site-nav ul a:hover { background: none; text-decoration: underline; }
  .site-nav .social { align-self: flex-start; }
  .site-nav .btn { text-align: center; }
}

/* Hero (home) */
.hero { position: relative; color: var(--white); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0, 52, 70, .58); }
.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 4vw, 48px); align-items: center;
  padding-block: clamp(40px, 6vw, 72px);
}
.hero-text { text-align: center; }
.hero-text h1 { text-shadow: 0 1px 12px rgba(0, 0, 0, .25); }
.hero-text p { font-size: 1.25rem; max-width: 30em; margin-inline: auto; }
.hero-text .btn { margin-top: .5em; }
.hero-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-text p { font-size: 1.125rem; }
}

/* Intro / quote text blocks */
.prose { max-width: 768px; margin-inline: auto; }
.prose.center h2 { max-width: 20em; margin-inline: auto; }
.lead { font-size: 1.25rem; }

/* Services (home) */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; text-align: center; }
.service img { width: 100%; max-width: 360px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin: 0 auto 24px; }
.service h3 { margin-bottom: .5em; }
.service p { line-height: 1.75; }
@media (max-width: 860px) {
  .services { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .service img { max-width: 280px; }
}

/* Full-width image banners */
.image-banner { position: relative; height: clamp(260px, 42vw, 540px); overflow: hidden; }
.image-banner img { width: 100%; height: 100%; object-fit: cover; }
.image-banner--haze::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .2); }
.image-banner--shade::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .2); }

/* Articles */
.article-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin-bottom: 48px; }
.article h1, .article h2 { font-size: clamp(1.625rem, 3vw, 2rem); margin-bottom: 1em; }
.article ul { margin: 0; padding-left: 1.5em; }
.article li { margin-bottom: .5em; }
.article li:last-child { margin-bottom: 0; }
.article p:last-child { margin-bottom: 0; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 0; }
.gallery-grid > figure { grid-column: span 2; }
.gallery-grid.lead-2 > figure:nth-child(-n+2) { grid-column: span 3; }
.gallery-grid figure { margin: 0; overflow: hidden; border-radius: var(--radius); background: rgba(255, 255, 255, .06); }
.gallery-grid a { display: block; }
.gallery-grid img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s ease; }
.gallery-grid a:hover img { transform: scale(1.03); }
@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid > figure, .gallery-grid.lead-2 > figure:nth-child(-n+2) { grid-column: span 1; }
  .gallery-grid > figure:first-child:nth-last-child(odd) { grid-column: span 2; }
}

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(0, 20, 28, .95); color: var(--white);
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 56px 64px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: var(--radius); }
.lightbox figcaption { text-align: center; min-height: 1.5em; }
.lightbox button {
  position: absolute; background: rgba(255, 255, 255, .08); border: 0; border-radius: var(--radius); color: var(--white);
  width: 48px; height: 48px; font-size: 28px; line-height: 1; cursor: pointer;
}
.lightbox button:hover { background: rgba(255, 255, 255, .2); }
.lightbox .lb-close { top: 12px; right: 12px; }
.lightbox .lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 560px) {
  .lightbox figure { padding: 64px 8px; }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 12px; transform: none; }
}

/* Call to action */
.cta { text-align: center; }
.cta p { font-size: 1.25rem; max-width: 768px; margin: 0 auto 2em; }

/* Reviews */
.reviews { position: relative; max-width: 960px; margin-inline: auto; text-align: center; }
.review { margin: 0; padding: 0 64px; }
.review p { font-size: 1rem; line-height: 1.75; max-width: 46em; margin: 0 auto 1em; }
.review footer { font-weight: 700; }
.reviews .review + .review { margin-top: 40px; }
.reviews.is-slider .review + .review { margin-top: 0; }
.reviews.is-slider .review[hidden] { display: none; }
.reviews-nav { display: none; }
.reviews.is-slider .reviews-nav { display: block; }
.reviews-nav button {
  position: absolute; top: 50%; transform: translateY(-70%);
  width: 48px; height: 48px; padding: 0; border: 0; border-radius: var(--radius);
  background: none; color: var(--white); cursor: pointer;
}
.reviews-nav button:hover { background: rgba(255, 255, 255, .1); }
.reviews-nav svg { width: 32px; height: 32px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.reviews-nav .prev { left: 0; }
.reviews-nav .next { right: 0; }
.reviews-count { margin: 48px 0 0; }
@media (max-width: 560px) {
  .review { padding: 0; }
  .reviews.is-slider .review { padding-bottom: 72px; }
  .reviews-nav button { top: auto; bottom: 0; transform: none; }
  .reviews.is-slider .reviews-count { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; line-height: 48px; }
}

/* Contact */
.contact-head { text-align: center; max-width: 58em; margin: 0 auto 40px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 4px; }
.form-field input, .form-field textarea {
  width: 100%;
  padding: 14px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--link); outline-offset: 0; border-color: var(--link); }
.req { color: var(--link); }

.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin: 14px 0 0; padding: 12px 14px; border-radius: 4px; display: none; }
.form-status.is-success { display: block; background: #ecfdf5; color: #065f46; border-left: 4px solid #10b981; }
.form-status.is-error { display: block; background: #fef2f2; color: #991b1b; border-left: 4px solid #f87171; }

.map { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.map iframe { display: block; width: 100%; height: 420px; border: 0; }
.map-link { display: inline-block; margin-top: 8px; font-size: .9rem; }

/* Footer */
.site-footer { background: var(--deep); color: var(--white); text-align: center; padding-block: 56px; }
.site-footer .brand img { width: 214px; margin-inline: auto; }
.site-footer .social { margin: 24px 0; }
.copyright { margin: 0; }

/* 404 */
.not-found { text-align: center; min-height: 50vh; display: grid; place-content: center; }
