/* Canarias Property Solutions. Mobile first, no framework. */
@font-face { font-family: 'Playfair Display'; src: url(/assets/fonts/playfair-600.woff2) format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url(/assets/fonts/playfair-600i.woff2) format('woff2'); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: 'Lato'; src: url(/assets/fonts/lato-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Lato'; src: url(/assets/fonts/lato-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --navy: #0F1B3D;
  --navy-2: #182a5a;
  --gold: #C9A24A;
  --gold-light: #e2c47e;
  --gold-text: #7d6020;   /* gold dark enough for text on white (AA) */
  --kraft: #B08D68;
  --paper: #FBF8F3;
  --white: #FFFFFF;
  --ink: #1d2433;
  --muted: #4a5368;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Lato', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 14px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; font: 400 1.0625rem/1.65 var(--sans); color: var(--ink); background: var(--paper); }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-2); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.18; color: var(--navy); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 7.4vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 4.8vw, 2.6rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.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 { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--navy); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.ico { width: 1.35em; height: 1.35em; flex: none; }
.ico--sm { width: .85em; height: .85em; display: inline-block; vertical-align: -.05em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: 48px; padding: .75em 1.4em; border-radius: 999px; font: 700 1rem/1.2 var(--sans); text-decoration: none; letter-spacing: .01em; border: 2px solid transparent; transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn--gold { background: var(--gold); color: var(--navy); box-shadow: 0 6px 20px -8px rgba(201,162,74,.7); }
.btn--gold:hover { background: var(--gold-light); color: var(--navy); }
.btn--navy { background: var(--navy); color: var(--white); box-shadow: 0 8px 22px -10px rgba(15,27,61,.6); }
.btn--navy:hover { background: var(--navy-2); color: var(--white); }
.btn--lg { min-height: 56px; padding: .9em 1.7em; font-size: 1.08rem; }
.btn--sm { min-height: 40px; padding: .45em 1em; font-size: .92rem; }
.btn:focus-visible { outline-offset: 4px; }

/* Header */
.site-header { background: var(--navy); color: var(--white); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; }
.brand:hover { color: var(--white); }
.brand img { width: 50px; height: auto; }
.brand-name { font-family: var(--serif); font-size: .98rem; line-height: 1.15; letter-spacing: .01em; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 40px; padding: 0 10px; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; color: var(--white); text-decoration: none; font-weight: 700; font-size: .9rem; letter-spacing: .06em; }
.lang-switch:hover { color: var(--navy); background: var(--white); }
@media (max-width: 400px) { .header-wa span:not(.sr-only) { display: none; } .header-wa { padding: .45em .7em; } .brand-name { font-size: .9rem; } }

/* Hero */
.hero { background: var(--navy) radial-gradient(1200px 500px at 85% -10%, rgba(201,162,74,.18), transparent 60%); color: var(--white); padding: 40px 0 28px; }
.hero h1 { color: var(--white); max-width: 15ch; }
.eyebrow { color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; margin-bottom: 1.1em; }
.lede { font-size: clamp(1.1rem, 2.6vw, 1.3rem); max-width: 36em; color: rgba(255,255,255,.9); }
.lede strong { color: var(--white); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 26px 0 12px; }
.link-light { color: var(--white); font-weight: 700; }
.link-light:hover { color: var(--gold-light); }
.hero-note { font-size: .92rem; color: rgba(255,255,255,.75); }
.trust { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 22px 0 0; }
.trust li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid rgba(201,162,74,.5); border-radius: 999px; font-size: .9rem; color: rgba(255,255,255,.92); }
.trust li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }

/* Torn paper edges */
.tear { line-height: 0; margin: -1px 0; position: relative; z-index: 1; }
.tear svg { width: 100%; height: 34px; }
@media (min-width: 760px) { .tear svg { height: 56px; } }

/* Sections */
.section { padding: 56px 0; }
@media (min-width: 760px) { .section { padding: 84px 0; } }
.kicker { font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: var(--gold-text); margin-bottom: .8em; }
.intro { font-size: 1.12rem; color: var(--muted); max-width: 40em; }

/* Steps */
.steps-title { margin-top: 36px; font-family: var(--sans); font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 14px 0 36px; display: grid; gap: 16px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.step { position: relative; background: var(--white); border-radius: var(--radius); padding: 24px 22px 20px; box-shadow: 0 1px 0 rgba(15,27,61,.06), 0 14px 30px -22px rgba(15,27,61,.45); border-top: 4px solid var(--gold); }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--navy); color: var(--gold); font: 600 1.25rem/1 var(--serif); margin-bottom: 14px; }
.step p { color: var(--muted); margin: 0; }

/* Kraft paper */
.kraft {
  background-color: var(--kraft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.kraft h2, .kraft .kicker { color: var(--navy); }
.kraft .intro { color: #2a2418; }

/* Group cards */
.cards { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 18px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.card a { display: flex; flex-direction: column; height: 100%; padding: 26px 24px 22px; background: var(--white); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: 0 18px 36px -24px rgba(40,25,10,.7); transition: transform .15s ease, box-shadow .15s ease; }
.card a:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -22px rgba(40,25,10,.75); color: var(--ink); }
.card-mark { display: flex; align-items: center; min-height: 56px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid #ece4d8; }
.card-mark img { width: auto; height: 26px; }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); flex: 1; }
.card-link { font-weight: 700; color: var(--navy); font-size: .95rem; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gold); word-break: break-word; }
/* Text wordmarks (no logo file supplied) */
.wm { font-family: var(--sans); white-space: nowrap; }
.wm-cie { font-size: 1.12rem; color: #3b4a5a; letter-spacing: .01em; }
.wm-cie b { color: #86631a; font-weight: 700; }
.wm-cie .wm-dot { color: #86631a; }
.wm-casa { color: #1f2937; font-size: 1.6rem; letter-spacing: -.03em; }  /* matches casalinking_logo_dark.svg */
.wm-casa b { font-weight: 700; }

/* About */
.about-grid { display: grid; gap: 34px; }
@media (min-width: 860px) { .about-grid { grid-template-columns: 1.4fr 1fr; align-items: center; gap: 60px; } }
.about p { max-width: 38em; }
.stats { display: grid; gap: 14px; margin: 0; }
.stats div { display: flex; flex-direction: column-reverse; padding: 18px 22px; background: var(--navy); color: var(--white); border-radius: var(--radius); border-left: 4px solid var(--gold); }
.stats dd { margin: 0; font: 600 2rem/1.1 var(--serif); color: var(--gold); }
.stats dt { color: rgba(255,255,255,.88); }

/* Contact */
.contact { background: var(--white); }
.contact-grid { display: grid; gap: 34px; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; } }
.contact-list { margin: 0; display: grid; gap: 0; border-top: 1px solid #e8e2d8; }
.contact-list div { padding: 16px 0; border-bottom: 1px solid #e8e2d8; }
.contact-list dt { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--gold-text); }
.contact-list dd { margin: 4px 0 0; font-size: 1.08rem; }

/* Footer */
.site-footer { background: var(--navy); color: rgba(255,255,255,.85); padding: 26px 0 96px; font-size: .95rem; }
@media (min-width: 760px) { .site-footer { padding-bottom: 40px; } }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--gold-light); }
.footer-inner { display: grid; gap: 24px; }
@media (min-width: 860px) { .footer-inner { grid-template-columns: auto 1fr auto; align-items: center; gap: 44px; } }
.footer-logo { width: 140px; }
.footer-text p { margin: 0 0 .3em; }
.footer-legal ul { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-legal a { display: inline-block; padding: 6px 0; }
.copy { margin: 0; font-size: .85rem; color: rgba(255,255,255,.7); }

/* Floating WhatsApp (mobile) */
.wa-float { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--gold); color: var(--navy); box-shadow: 0 10px 26px -8px rgba(0,0,0,.55); }
.wa-float .ico { width: 32px; height: 32px; }
@media (min-width: 760px) { .wa-float { display: none; } }

/* Legal pages */
html[lang="en"] .l-es, html[lang="es"] .l-en { display: none; }
.prose { max-width: 780px; }
.prose h1 { font-size: clamp(2rem, 6vw, 3rem); }
.prose h2 { font-size: 1.4rem; margin-top: 1.6em; }
.prose code { font-size: .95em; background: #efe8dc; padding: 1px 6px; border-radius: 4px; }
.updated { color: var(--muted); font-size: .92rem; margin-top: -.4em; }
.lang-note { padding: 10px 14px; background: #f1ebe1; border-radius: 8px; font-size: .95rem; }
.table-wrap { overflow-x: auto; margin: 0 0 1em; }
table { border-collapse: collapse; width: 100%; min-width: 480px; background: var(--white); font-size: .97rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border: 1px solid #e3dccf; }
th { background: var(--navy); color: var(--white); font-weight: 700; }
.facts { display: grid; grid-template-columns: 1fr; gap: 2px 20px; margin: 0 0 1.4em; }
@media (min-width: 640px) { .facts { grid-template-columns: max-content 1fr; } }
.facts dt { font-weight: 700; color: var(--navy); }
.facts dd { margin: 0 0 10px; }
mark.todo { background: #fff3c4; color: #5a4300; padding: 2px 6px; border: 1px dashed #b8901c; border-radius: 4px; }
.back { margin-top: 2em; }

/* Desktop hero: logo on the right (CSS background, so phones never download it) */
@media (min-width: 960px) {
  .hero { padding: 64px 0 40px; }
  .hero-inner { position: relative; }
  .hero-inner::after { content: ''; position: absolute; right: 20px; top: 50%; width: 340px; height: 256px; transform: translateY(-50%); background: url(/assets/img/cps-logo-on-dark-640.png) center / contain no-repeat; opacity: .95; }
  .hero-inner > * { max-width: 620px; }
}
