/* ==========================================================================
   Trogir Property Guide — Main Stylesheet
   Brand direction: see PROJECT_BRIEF.md
   ========================================================================== */

:root {
  /* Brand colors */
  --color-navy: #0d2b45;
  --color-navy-dark: #081b2c;
  --color-blue: #1e4f6e;
  --color-gold: #c8a26b;
  --color-gold-dark: #b3894f;
  --color-sand: #f2e9db;
  --color-offwhite: #f7f7f7;
  --color-white: #ffffff;

  /* Text */
  --color-text: #202b35;
  --color-text-muted: #5c6670;
  --color-text-inverse: #f7f7f7;

  /* Borders */
  --color-border: #e3ddd0;

  /* Typography */
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Montserrat", "Segoe UI", Arial, sans-serif;

  /* Layout */
  --container-width: 1200px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-card: 0 1px 3px rgba(13, 43, 69, 0.08), 0 1px 2px rgba(13, 43, 69, 0.06);

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--color-gold-dark);
  outline-offset: 2px;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
}

h1 { font-size: clamp(2.25rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.4rem; }

p {
  margin: 0 0 var(--space-sm);
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-navy);
  color: var(--color-white);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-navy-dark);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-gold-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(247, 247, 247, 0.6);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(247, 247, 247, 0.12);
  border-color: var(--color-white);
}

.btn-outline {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--color-navy);
  color: var(--color-white);
}

/* ---------- Header ---------- */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-mark {
  flex-shrink: 0;
  color: var(--color-navy);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-text .logo-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-navy);
  letter-spacing: 0.02em;
}

.logo-text .logo-sub {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-gold-dark);
  letter-spacing: 0.14em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.main-nav ul {
  display: flex;
  gap: var(--space-md);
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"] {
  color: var(--color-navy);
  border-bottom-color: var(--color-gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--color-navy) url("../images/placeholder-hero.svg") center / cover no-repeat;
  color: var(--color-white);
  padding: var(--space-2xl) 0;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero-inner {
  max-width: 640px;
}

.hero .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.hero h1 {
  color: var(--color-white);
}

.hero p.lead {
  font-size: 1.15rem;
  color: rgba(247, 247, 247, 0.9);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-2xl) 0;
}

.section-sand {
  background: var(--color-sand);
}

.section-offwhite {
  background: var(--color-offwhite);
}

.section-navy {
  background: var(--color-navy);
  color: var(--color-text-inverse);
}

.section-navy h2 {
  color: var(--color-white);
}

.section-header {
  max-width: 640px;
  margin: 0 auto var(--space-lg);
  text-align: center;
}

.section-header.align-left {
  margin-left: 0;
  text-align: left;
}

.section-header p {
  color: var(--color-text-muted);
}

.eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
  margin-bottom: 0.5rem;
}

.section-navy .eyebrow {
  color: var(--color-gold);
}

.section-footer {
  text-align: center;
  margin-top: var(--space-lg);
}

/* ---------- Intro ---------- */
.intro {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.intro p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* ---------- Property cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.property-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.property-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.property-card .card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--color-sand);
  overflow: hidden;
}

.property-card .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sample-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--color-gold);
  color: var(--color-navy-dark);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
}

.property-card .card-body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.property-card .price {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-navy);
  margin-bottom: 0.2rem;
}

.price-note {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.property-card .location {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-xs);
}

.property-card .meta {
  display: flex;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.disclaimer-banner {
  background: var(--color-sand);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.disclaimer-banner strong {
  color: var(--color-navy);
}

/* ---------- Areas ---------- */
.area-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  color: var(--color-white);
  background-size: cover;
  background-position: center;
}

.area-card--trogir {
  background-image: url("../images/placeholder-area-trogir.svg");
}

.area-card--ciovo {
  background-image: url("../images/placeholder-area-ciovo.svg");
}

.area-card--seget {
  background-image: url("../images/placeholder-area-seget.svg");
}

.area-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 43, 69, 0) 40%, rgba(13, 43, 69, 0.85));
}

.area-card .area-card-body {
  position: relative;
  z-index: 1;
  padding: var(--space-md);
}

.area-card h3 {
  color: var(--color-white);
  margin-bottom: 0.3rem;
}

.area-card p {
  font-size: 0.9rem;
  color: rgba(247, 247, 247, 0.9);
  margin-bottom: var(--space-sm);
}

.area-card a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-gold);
  border-bottom: 1px solid var(--color-gold);
  padding-bottom: 2px;
}

/* ---------- Services teaser ---------- */
.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

.service-item {
  padding: var(--space-md);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.service-item .icon {
  color: var(--color-gold-dark);
  margin-bottom: var(--space-xs);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--color-navy);
  color: var(--color-white);
  padding: var(--space-xl) 0;
  text-align: center;
}

.cta-band h2 {
  color: var(--color-white);
}

.cta-band p {
  color: rgba(247, 247, 247, 0.85);
  max-width: 560px;
  margin: 0 auto var(--space-md);
}

/* ---------- Placeholder page (skeleton subpages) ---------- */
.page-hero {
  background: var(--color-sand);
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
}

.placeholder-note {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  color: var(--color-text-muted);
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.placeholder-note a,
.note-box a,
.prose a,
.faq-body a,
.section-header a {
  color: var(--color-navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--color-gold);
  text-underline-offset: 3px;
}

.placeholder-note a:hover,
.note-box a:hover,
.prose a:hover,
.faq-body a:hover,
.section-header a:hover {
  color: var(--color-blue);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy-dark);
  color: rgba(247, 247, 247, 0.85);
  padding: var(--space-xl) 0 var(--space-md);
}

.site-footer .logo-name {
  color: var(--color-white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-grid h4 {
  color: var(--color-white);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.footer-grid ul li {
  margin-bottom: 0.5rem;
}

.footer-grid a {
  color: rgba(247, 247, 247, 0.75);
  font-size: 0.9rem;
}

.footer-grid a:hover {
  color: var(--color-gold);
}

.footer-brand p {
  color: rgba(247, 247, 247, 0.7);
  font-size: 0.9rem;
  max-width: 32ch;
}

.footer-legal {
  border-top: 1px solid rgba(247, 247, 247, 0.15);
  padding-top: var(--space-md);
  font-size: 0.8rem;
  color: rgba(247, 247, 247, 0.55);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-legal .disclaimer {
  max-width: 720px;
}

/* ---------- Responsive ---------- */
/* Nav collapses early: 8 menu items need room on desktop */
@media (max-width: 1100px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-sm) var(--space-md) var(--space-md);
    display: none;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav li {
    border-bottom: 1px solid var(--color-border);
  }

  .main-nav a {
    display: block;
    padding: 0.75rem 0.1rem;
  }
}

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

@media (max-width: 800px) {
  .hero {
    min-height: auto;
    padding: var(--space-xl) 0;
  }

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

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

/* ==========================================================================
   Subpage components
   ========================================================================== */

.page-hero p {
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- Article / prose ---------- */
.prose {
  max-width: 760px;
  margin: 0 auto;
}

.prose h2 {
  margin-top: var(--space-lg);
}

.prose ul {
  list-style: disc;
  padding-left: 1.4rem;
  margin: 0 0 var(--space-sm);
}

.prose ul li {
  margin-bottom: 0.4rem;
}

/* ---------- Numbered process steps ---------- */
.steps {
  counter-reset: step;
  display: grid;
  gap: var(--space-md);
  max-width: 760px;
  margin: 0 auto;
}

.step {
  position: relative;
  padding-left: 4rem;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--color-sand);
  color: var(--color-navy);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step h3 {
  margin-bottom: 0.3rem;
}

.step p {
  color: var(--color-text-muted);
  margin: 0;
}

/* ---------- Cost table ---------- */
.cost-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.cost-table th,
.cost-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.cost-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-navy);
  background: var(--color-sand);
}

.cost-table td:last-child {
  color: var(--color-text-muted);
}

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  background: var(--color-white);
}

.faq-item summary {
  cursor: pointer;
  padding: var(--space-sm) var(--space-md);
  padding-right: 3rem;
  font-weight: 600;
  color: var(--color-navy);
  list-style: none;
  position: relative;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--color-gold-dark);
}

.faq-item[open] summary::after {
  content: "\2013";
}

.faq-item .faq-body {
  padding: 0 var(--space-md) var(--space-md);
  color: var(--color-text-muted);
}

/* ---------- Note box ---------- */
.note-box {
  background: var(--color-offwhite);
  border-left: 3px solid var(--color-gold);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ---------- Area feature rows ---------- */
.area-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.area-feature + .area-feature {
  margin-top: var(--space-2xl);
}

.area-feature .area-media {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.area-feature .area-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 7 / 5;
}

.area-feature.reverse .area-media {
  order: 2;
}

.check-list li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.5rem;
  color: var(--color-text-muted);
}

.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-gold-dark);
  font-weight: 700;
}

/* ---------- Property filter bar ---------- */
.filter-bar {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: var(--space-lg);
}

.filter-bar .filter-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-navy);
  margin-bottom: 0.35rem;
}

.filter-bar select {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  min-width: 180px;
}

.filter-empty {
  display: none;
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--space-lg) 0;
}

.filter-empty.is-visible {
  display: block;
}

/* ---------- Property detail ---------- */
.property-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.property-gallery .main-image {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.property-gallery .main-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.gallery-thumbs img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.fact-box {
  background: var(--color-offwhite);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  position: sticky;
  top: 90px;
}

.fact-box .price {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--color-navy);
  margin-bottom: 0.2rem;
}

.fact-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  margin: var(--space-sm) 0 0;
  font-size: 0.92rem;
}

.fact-list dt {
  font-weight: 600;
  color: var(--color-navy);
}

.fact-list dd {
  margin: 0;
  color: var(--color-text-muted);
}

.fact-box .btn {
  width: 100%;
  text-align: center;
  margin-top: var(--space-md);
}

/* ---------- Contact form ---------- */
.contact-form {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  gap: var(--space-sm);
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 0.35rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-white);
}

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  outline: 2px solid var(--color-gold-dark);
  outline-offset: 1px;
}

.form-field textarea {
  min-height: 160px;
  resize: vertical;
}

.form-consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.form-consent input {
  width: auto;
  margin-top: 0.25rem;
}

.contact-form .btn {
  justify-self: start;
}

.note-box--centered {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

/* ---------- Utilities ---------- */
.u-mt-sm {
  margin-top: 0.75rem;
}

.u-mt-lg {
  display: inline-block;
  margin-top: var(--space-lg);
}

.property-card h3 a:hover,
.property-card h3 a:focus-visible {
  color: var(--color-blue);
}

/* ---------- Subpage responsive ---------- */
@media (max-width: 800px) {
  .area-feature {
    grid-template-columns: 1fr;
  }

  .area-feature.reverse .area-media {
    order: 0;
  }

  .property-layout {
    grid-template-columns: 1fr;
  }

  .fact-box {
    position: static;
  }
}
