/* =============================================================
   ALTITUDE HOMES — styles.css
   Arquetipo: Editorial Light Cream
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #f4efe6;
  --bg-2:      #e8dfd0;
  --paper:     #ffffff;
  --ink:       #1a1a1a;
  --ink-soft:  #2a2a2a;
  --ink-mute:  #6b6b6b;
  --accent:    #b85c3a;
  --accent-2:  #4a5d3a;
  --cream:     #f4efe6;
  --line:      rgba(26,26,26,0.12);

  --serif: "Fraunces", "Georgia", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 14px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.01em; font-family: var(--serif); font-weight: 500; }
em, .italic { font-style: italic; }
::selection { background: var(--accent); color: var(--cream); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.container { max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--cream); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 500;
}
.skip-link:focus { top: 1rem; }
.kicker {
  font-family: var(--sans); font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); font-weight: 600;
}
.num-watermark {
  font-family: var(--serif); font-weight: 300; font-style: italic;
  font-size: clamp(6rem, 16vw, 13rem); color: var(--ink); opacity: .06;
  position: absolute; top: -1rem; left: -1rem; line-height: 1; pointer-events: none;
  user-select: none;
}

/* Defensive: reveals never hide content if JS doesn't run */
.reveal[data-split] { opacity: 1; transform: none; }
[data-reveal] {
  opacity: 0; transform: translateY(40px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }
noscript [data-reveal] { opacity: 1 !important; transform: none !important; }

/* =============================================================
   4. Typography
   ============================================================= */
.eyebrow { font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--ink-soft); max-width: 60ch; }
.mute { color: var(--ink-mute); }

/* =============================================================
   5. Components
   ============================================================= */

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 1.6rem; border-radius: 100px;
  font-size: .92rem; font-weight: 600; letter-spacing: .01em;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .35s var(--ease-out);
}
.btn-primary {
  background: var(--accent); color: var(--cream);
  box-shadow: 0 8px 24px -8px rgba(184,92,58,0.55);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -8px rgba(184,92,58,0.65); }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--paper); transform: translateY(-2px); }
.btn-arrow { transition: transform .3s var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* --- Cards --- */
.card {
  background: var(--paper); border-radius: var(--radius);
  overflow: hidden; position: relative;
  box-shadow: 0 1px 2px rgba(26,26,26,0.05);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.card:hover {
  transform: translateY(-6px) rotate(-0.3deg);
  box-shadow: 0 30px 50px -20px rgba(184,92,58,0.35);
}
.card img { width: 100%; height: 62%; object-fit: cover; transition: transform .6s var(--ease-out); }
.card:hover img { transform: scale(1.06); }
.card-body { padding: 1.1rem 1.3rem 1.3rem; }
.card-ref { font-family: var(--sans); font-size: .72rem; letter-spacing: .08em; color: var(--accent); font-weight: 700; text-transform: uppercase; }
.card-title { font-family: var(--serif); font-size: 1.3rem; margin-top: .2rem; }
.card-meta { font-size: .85rem; color: var(--ink-mute); margin-top: .3rem; }
.card-price { font-family: var(--serif); font-size: 1.15rem; margin-top: .6rem; color: var(--ink); }
.card-status { display: inline-block; margin-top: .5rem; font-size: .74rem; padding: .3rem .7rem; border-radius: 100px; background: var(--bg-2); color: var(--ink-soft); }
.card-cta { display: block; margin-top: .9rem; font-size: .82rem; font-weight: 600; color: var(--accent); }

/* --- Nav --- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  padding: 1.1rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  background: transparent; transition: background .4s var(--ease-out), box-shadow .4s var(--ease-out), padding .3s var(--ease-out);
}
.nav.is-solid { background: rgba(244,239,230,0.92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); padding-block: .7rem; }
.nav-logo { font-family: var(--serif); font-style: italic; font-size: 1.25rem; }
.nav-links { display: none; gap: 1.8rem; align-items: center; }
@media (min-width: 960px) { .nav-links { display: flex; } }
.nav-link { font-size: .88rem; position: relative; }
.nav-link .n { color: var(--accent); font-weight: 700; margin-right: .35rem; font-size: .74rem; }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0;
  background: var(--ink); transition: width .35s var(--ease-out);
}
.nav-link:hover::after { width: 100%; }
.nav-cta { background: var(--accent); color: var(--cream); padding: .6rem 1.2rem; border-radius: 100px; font-size: .82rem; font-weight: 700; }
.nav-lang { display: none; gap: .4rem; font-size: .75rem; color: var(--ink-mute); }
@media (min-width: 960px) { .nav-lang { display: flex; } }
.nav-lang button.active { color: var(--accent); font-weight: 700; }

.burger { display: flex; flex-direction: column; gap: 5px; width: 26px; }
@media (min-width: 960px) { .burger { display: none; } }
.burger span { height: 2px; background: var(--ink); transition: transform .3s var(--ease-out), opacity .3s var(--ease-out); }
.mobile-menu {
  position: fixed; inset: 0; background: var(--bg); z-index: 490;
  display: flex; flex-direction: column; justify-content: center; gap: 1.4rem;
  padding: var(--gutter);
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out);
}
.mobile-menu.is-open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-menu a { font-family: var(--serif); font-size: 2rem; }

/* --- Marquee --- */
.marquee { overflow: hidden; position: relative; padding-block: 1.1rem; background: var(--bg-2); border-block: 1px solid var(--line); }
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg-2), transparent); }
.marquee::after  { right: 0; background: linear-gradient(270deg, var(--bg-2), transparent); }
.marquee-track { display: inline-flex; gap: 2.4rem; white-space: nowrap; will-change: transform; font-size: .95rem; letter-spacing: .02em; }
.marquee-track span.dot { color: var(--accent); }

/* --- Aside labels --- */
.aside-label {
  border: 1px solid var(--line); border-radius: 100px; padding: .4rem 1rem;
  font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; display: inline-block;
}

/* --- Form --- */
.form-field { position: relative; margin-bottom: 1.3rem; }
.form-field .fnum { position: absolute; left: 0; top: .1rem; font-size: .72rem; color: var(--accent); font-weight: 700; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; border: none; border-bottom: 1px solid var(--line);
  background: transparent; padding: .6rem 0 .6rem 2rem; font-family: var(--sans); font-size: 1.02rem;
  transition: border-color .3s var(--ease-out);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--accent); outline: none; }
.form-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }

/* =============================================================
   6. Sections
   ============================================================= */

/* --- Splash --- */
.splash {
  position: fixed; inset: 0; z-index: 10000; background: var(--bg);
  display: grid; place-items: center; pointer-events: auto;
  transition: opacity .9s, clip-path 1.1s;
  animation: splashSafety .01s 4.5s forwards;
}
.splash.is-out { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); }
@keyframes splashSafety { to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); } }
.splash-inner { text-align: center; }
.splash-word { font-family: var(--serif); font-style: italic; font-size: clamp(2rem, 6vw, 3.4rem); }
.splash-bar { width: 180px; height: 2px; background: var(--line); margin: 1.2rem auto 0; overflow: hidden; border-radius: 2px; }
.splash-bar span { display: block; height: 100%; width: 0%; background: var(--accent); animation: splashLoad 1.8s var(--ease-soft) forwards .2s; }
@keyframes splashLoad { to { width: 100%; } }

/* --- Hero --- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(244,239,230,0.15) 0%, rgba(26,26,26,0.15) 55%, rgba(26,26,26,0.55) 100%);
}
.hero-content { position: relative; z-index: 2; padding: var(--gutter); padding-bottom: clamp(3rem, 6vw, 5rem); width: 100%; color: var(--cream); }
.hero-kicker { color: var(--cream); opacity: .9; }
.hero-title { font-size: clamp(3.2rem, 10vw, 7.5rem); color: var(--cream); margin-top: .6rem; }
.hero-title .line2 { display: block; margin-left: clamp(1rem, 6vw, 4rem); font-style: italic; font-weight: 300; }
.hero-sub { margin-top: 1.3rem; max-width: 46ch; font-size: clamp(1rem, 1.4vw, 1.25rem); color: var(--cream); opacity: .92; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* --- Section 01 About --- */
.sec-about { padding-block: clamp(5rem, 10vw, 9rem); position: relative; }
.about-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) { .about-grid { grid-template-columns: 1fr 1fr; align-items: center; } }
.about-collage { position: relative; height: clamp(320px, 40vw, 520px); }
.about-collage img { position: absolute; border-radius: var(--radius); object-fit: cover; box-shadow: 0 30px 60px -20px rgba(26,26,26,.25); }
.about-collage .img-1 { width: 62%; height: 78%; top: 0; left: 0; z-index: 2; }
.about-collage .img-2 { width: 48%; height: 55%; bottom: 0; right: 0; z-index: 1; }
.about-body { position: relative; }
.about-aside { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.def-list { margin-top: 1.6rem; display: grid; gap: .9rem; }
.def-row { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--line); padding-bottom: .7rem; font-size: .95rem; }
.def-row dt { color: var(--ink-mute); }
.def-row dd { font-weight: 600; text-align: right; }

/* --- Section 02 Properties (bento) --- */
.sec-properties { padding-block: clamp(4rem, 8vw, 7rem); position: relative; background: var(--paper); }
.bento { display: grid; grid-template-columns: 1fr; gap: 1.1rem; margin-top: 3rem; }
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .bento {
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 280px;
  }
  .bento .card:nth-child(1) { grid-column: span 7; grid-row: span 2; }
  .bento .card:nth-child(2) { grid-column: span 5; grid-row: span 1; }
  .bento .card:nth-child(3) { grid-column: span 5; grid-row: span 1; }
  .bento .card:nth-child(4) { grid-column: span 4; grid-row: span 1; }
  .bento .card:nth-child(5) { grid-column: span 4; grid-row: span 1; }
  .bento .card:nth-child(6) { grid-column: span 4; grid-row: span 1; }
}
.bento .card { display: flex; flex-direction: column; }
.bento .card img { flex: 1; }

/* --- Section 03 Zones --- */
.sec-zones { padding-block: clamp(5rem, 10vw, 9rem); position: relative; }
.zone-list { margin-top: 3rem; border-top: 1px solid var(--line); }
.zone-row {
  display: grid; grid-template-columns: 2.4rem 1fr auto; gap: 1.2rem; align-items: center;
  padding: 1.6rem 0; border-bottom: 1px solid var(--line);
  transition: padding-left .35s var(--ease-out), background .35s var(--ease-out);
}
.zone-row:hover { padding-left: .8rem; background: var(--bg-2); }
.zone-icon { width: 2.2rem; height: 2.2rem; }
.zone-name { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem); }
.zone-sub { font-size: .85rem; color: var(--ink-mute); margin-top: .2rem; }
.zone-line { font-size: .95rem; color: var(--ink-soft); text-align: right; max-width: 22ch; margin-left: auto; }

/* --- Section 04 Gallery --- */
.sec-gallery { padding-block: clamp(3rem, 6vw, 5rem); overflow: hidden; background: var(--bg-2); }
.gallery-lane { overflow: hidden; margin-bottom: 1rem; }
.gallery-track { display: inline-flex; gap: 1rem; will-change: transform; }
.gallery-track img { width: 260px; height: 320px; object-fit: cover; border-radius: 10px; filter: saturate(1.1); }
.gallery-lane.wide .gallery-track img { width: 360px; height: 220px; }

/* --- Section 05 International buyers --- */
.sec-intl { padding-block: clamp(4rem, 8vw, 7rem); }
.intl-card {
  position: relative; border-radius: 22px; overflow: hidden;
  min-height: 460px; display: flex; align-items: flex-end;
  box-shadow: 0 30px 60px -25px rgba(26,26,26,.35);
}
.intl-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 8s var(--ease-out); }
.intl-card:hover img { transform: scale(1.1) rotate(0.4deg); }
.intl-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26,26,26,0.05), rgba(26,26,26,0.78)); }
.intl-body { position: relative; z-index: 2; padding: clamp(1.6rem, 4vw, 3rem); color: var(--cream); max-width: 62ch; }
.intl-title { color: var(--cream); font-size: clamp(1.8rem, 4vw, 2.8rem); }
.intl-copy { margin-top: 1rem; color: var(--cream); opacity: .92; font-size: 1rem; }
.intl-legal { margin-top: 1rem; font-size: .82rem; opacity: .78; font-style: italic; }
.intl-body .btn { margin-top: 1.6rem; }

/* --- Section 06 Contact --- */
.sec-contact { padding-block: clamp(5rem, 10vw, 9rem); background: var(--paper); }
.contact-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1.2fr .8fr; } }
.contact-alt { margin-top: 1.2rem; font-size: .9rem; color: var(--accent); font-weight: 600; }
.contact-panel { background: var(--bg); border-radius: var(--radius); padding: 2rem; }
.contact-panel dl { display: grid; gap: 1.1rem; margin-top: 1.2rem; }
.contact-panel dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }
.contact-panel dd { font-family: var(--serif); font-size: 1.1rem; margin-top: .2rem; }

/* --- Footer --- */
.footer { background: var(--ink); color: var(--cream); padding-top: clamp(3rem, 8vw, 6rem); }
.footer-wordmark {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(2.4rem, 9vw, 7rem); white-space: nowrap; overflow: hidden;
  opacity: .9; padding-inline: var(--gutter);
}
.footer-grid { display: grid; gap: 2.4rem; padding: clamp(2.5rem, 6vw, 4rem) var(--gutter); border-top: 1px solid rgba(244,239,230,0.14); margin-top: 2rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-col h4 { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 700; margin-bottom: 1rem; }
.footer-col a, .footer-col p { display: block; margin-bottom: .5rem; font-size: .92rem; opacity: .85; }
.footer-map { width: 100%; height: 220px; border: 0; border-radius: 10px; filter: grayscale(0.3) sepia(0.15); }
.footer-legal {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
  padding: 1.4rem var(--gutter); border-top: 1px solid rgba(244,239,230,0.14);
  font-size: .78rem; opacity: .7;
}
.footer-legal a { text-decoration: underline; }
.back-top { display: inline-flex; align-items: center; gap: .4rem; }

/* --- Side brand mark --- */
.side-mark {
  position: fixed; right: 1.2rem; top: 50%; transform: translateY(-50%) rotate(90deg);
  transform-origin: right center; display: none; align-items: center; gap: .6rem;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; z-index: 300; color: var(--ink-soft);
  mix-blend-mode: difference;
}
@media (min-width: 1280px) { .side-mark { display: flex; } }
.side-mark .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(0.7); } }

/* =============================================================
   7. Effects
   ============================================================= */
.cursor {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  display: none; mix-blend-mode: difference; opacity: 0;
  transition: opacity .25s var(--ease-out);
}
.cursor.is-ready { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; will-change: transform; }
.cursor-dot { width: 5px; height: 5px; margin: -2.5px; background: var(--cream); border-radius: 50%; }
.cursor-ring {
  width: 32px; height: 32px; margin: -16px; border: 1px solid var(--cream); border-radius: 50%;
  transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out);
  display: flex; align-items: center; justify-content: center;
}
.cursor.is-interactive .cursor-ring { width: 76px; height: 76px; margin: -38px; }
.cursor-label {
  font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cream);
  opacity: 0; transition: opacity .2s var(--ease-out); white-space: nowrap;
}
.cursor.is-interactive .cursor-label { opacity: 1; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }

.grain-overlay {
  position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: .035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) { }
@media (min-width: 720px) { }
@media (min-width: 960px) { }
@media (min-width: 1280px) { .hero-content { padding-bottom: 6rem; } }
@media (min-width: 1600px) { .container { max-width: 1500px; } }

/* =============================================================
   9. Reduced-motion — ONLY truly intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .side-mark .dot { animation: none; }
}
