/* Megali Luxuries — site styles */

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

:root {
  --navy: #082f49;
  --navy-light: #0c4a6e;
  --slate: #374151;
  --white: #fff;
  --ink: #082f49;
  --ink-soft: #334e63;
  --coral: #f87171;
  --coral-hover: #ef4444;
  --coral-active: #dc2626;
  --coral-ink: #020617;
  --link: #991b1b;
  --link-on-dark: #fecaca;
  --line: #d6dde3;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(56px, 8vw, 96px);
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; -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.6;
  color: var(--ink);
  background: var(--white);
}

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

h1, h2, h3 { font-weight: 600; line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

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

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

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 860px; }

.section { padding-block: var(--section-y); }
.section--dark { background: var(--navy); color: var(--white); }
.section--dark a { color: var(--link-on-dark); }
.section-title { text-align: center; margin-bottom: 1.4em; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--white); color: var(--navy); padding: 8px 14px;
}
.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 */
.btn {
  display: inline-block;
  padding: .7em 1.4em;
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid var(--coral);
  background: var(--coral);
  color: var(--coral-ink);
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--coral-hover); border-color: var(--coral-hover); }
.btn:active { background: var(--coral-active); border-color: var(--coral-active); }
.btn--lg { font-size: 1.125rem; padding: .75em 1.5em; }
.btn--outline { background: transparent; color: var(--coral); }
.btn--outline:hover { background: var(--coral); color: var(--coral-ink); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* Header */
.site-header { background: var(--navy); color: var(--white); position: relative; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; }
.brand img { width: 180px; height: auto; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { color: var(--white); text-decoration: none; font-weight: 500; }
.site-nav ul a:hover, .site-nav ul a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--coral); text-decoration-thickness: 2px; }

.social { display: inline-flex; color: inherit; }
.social svg { width: 22px; height: 22px; 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: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 20px;
    padding: 8px var(--gutter) 28px;
    background: var(--navy);
    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 { display: block; padding: 12px 0; font-size: 1.125rem; }
  .site-nav .btn { text-align: center; }
}

/* Hero */
.hero { padding-block: clamp(40px, 6vw, 72px); }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-image { aspect-ratio: 1; width: 100%; max-width: 560px; object-fit: cover; border-radius: 50%; }
.hero-text p { font-size: 1.125rem; color: var(--ink-soft); max-width: 34em; }
.hero-text .btn { margin-top: .5em; }

@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-image { max-width: 380px; margin-inline: auto; }
}

/* Facilities */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card img { aspect-ratio: 1; width: 100%; object-fit: cover; border: 1px solid #f9fafb; margin-bottom: 20px; }
.card h3 { margin-bottom: .4em; }
.card p { font-size: .95rem; opacity: .9; margin: 0; }

@media (max-width: 860px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } .card img { aspect-ratio: 4 / 3; } }

/* Call-to-action banner */
.cta { text-align: center; }
.cta h2 { max-width: 22em; margin-inline: auto; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.cta .lead { font-size: 1.125rem; max-width: 36em; margin-inline: auto; }
.cta .small { font-size: .95rem; margin-top: 1.5em; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 0; }
.gallery-grid > figure { grid-column: span 2; }
.gallery-grid.lead-2 > figure:nth-child(-n+2) { grid-column: span 3; }
.gallery-grid.lead-1 > figure:first-child { grid-column: span 6; }

.gallery-grid figure { position: relative; margin: 0; overflow: hidden; background: rgba(255, 255, 255, .06); }
.gallery-grid a { display: block; }
.gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s ease; }
.gallery-grid a:hover img { transform: scale(1.03); }
.gallery-grid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 14px 10px;
  font-weight: 500; color: var(--white);
  background: linear-gradient(transparent, rgba(0, 0, 0, .6));
  pointer-events: none;
}

@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid > figure { grid-column: span 1; }
  .gallery-grid.lead-2 > figure:nth-child(-n+2),
  .gallery-grid.lead-1 > figure:first-child { grid-column: span 2; }
}

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(2, 6, 23, .94); 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; }
.lightbox figcaption { text-align: center; min-height: 1.6em; }
.lightbox button {
  position: absolute; background: rgba(255, 255, 255, .08); border: 0; 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; }
}

/* Image banner */
.image-banner { position: relative; height: 368px; overflow: hidden; }
.image-banner img { width: 100%; height: 100%; object-fit: cover; }
.image-banner::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .2); }
@media (max-width: 560px) { .image-banner { height: 240px; } }

/* Contact */
.contact-head { text-align: center; max-width: 58em; margin: 0 auto 40px; }
.contact-email { font-size: 1.25rem; font-weight: 600; display: inline-block; margin-bottom: .8em; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; 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: 500; margin-bottom: 4px; }
.form-field input, .form-field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--navy-light); outline-offset: 0; border-color: var(--navy-light); }
.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; 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: var(--link); border-left: 4px solid var(--coral); }

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

/* Article (studios / maisonettes) */
.article-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 40px; }
.article h1 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
.article h2 { font-size: 1.125rem; margin: 1.6em 0 .5em; }
.article ul { margin: 0 0 1em; padding-left: 1.25em; }
.article li { margin-bottom: .2em; }
.feature-lists { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; }
@media (max-width: 560px) { .feature-lists { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--slate); color: var(--white); text-align: center; padding-block: 48px; }
.site-footer .brand img { margin-inline: auto; width: 150px; }
.site-footer .social { margin: 20px 0; }
.site-footer a { color: var(--white); }
.footer-links { list-style: none; margin: 0 0 12px; padding: 0; }
.footer-links a { text-decoration: none; font-weight: 500; }
.footer-links a:hover { text-decoration: underline; }
.copyright { font-size: .9rem; opacity: .85; margin: 0; }

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