/* ============================================================
   Nicolas Martinez APA — Design System
   Style: Organic Biophilic + Nature Distilled
   Typo: Lora (headings) / Raleway (body)
   Palette: Warm earth tones, sage green, cream
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&family=Raleway:wght@300;400;500;600;700&display=swap');

:root {
  /* Colors — Nature Distilled palette */
  --sage: #6B7B3C;
  --sage-light: #8fa058;
  --sage-muted: rgba(107, 123, 60, 0.12);
  --sage-subtle: rgba(107, 123, 60, 0.06);
  --terracotta: #C67B5C;
  --terracotta-light: #d4956e;
  --sand: #D4C4A8;
  --warm-clay: #B5651D;
  --cream: #F5F0E1;
  --cream-deep: #EDE6D3;
  --bg: #FAFAF5;
  --surface: #FFFFFF;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --text: #2C2C2C;
  --text-muted: #5E5E52;
  --text-light: #8A8A7E;
  --line: rgba(107, 123, 60, 0.12);
  --line-strong: rgba(107, 123, 60, 0.22);

  /* Shadows — Organic soft */
  --shadow-sm: 0 2px 8px rgba(44, 44, 44, 0.04);
  --shadow-md: 0 8px 32px rgba(44, 44, 44, 0.06);
  --shadow-lg: 0 20px 60px rgba(44, 44, 44, 0.08);
  --shadow-card: 0 4px 20px rgba(107, 123, 60, 0.06);

  /* Radii — Organic curves */
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 72px;
  --space-2xl: 96px;

  /* Layout */
  --max-width: 1200px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 250ms;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: 'Raleway', system-ui, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { cursor: pointer; }

/* Subtle grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Layout ---- */
.page-shell {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding-bottom: var(--space-lg);
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--space-sm);
  color: var(--text);
}

h1 {
  font-size: clamp(2.6rem, 4.5vw, 4.2rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: 'Raleway', sans-serif;
}

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

.eyebrow {
  margin: 0 0 var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sage);
}

.lead {
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 60ch;
}

.lead.secondary { margin-top: 4px; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 16px;
  z-index: 50;
  margin-top: 18px;
  padding: 14px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(20px) saturate(1.3);
  background: var(--surface-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--duration) var(--ease);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transition: opacity var(--duration) var(--ease);
}

.brand:hover { opacity: 0.85; }

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cream), var(--cream-deep));
  border: 1.5px solid var(--line-strong);
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--sage);
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 0.95rem; }
.brand small { color: var(--text-light); font-size: 0.78rem; }

.site-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  position: relative;
  transition: color var(--duration) var(--ease);
  cursor: pointer;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--sage);
  border-radius: 1px;
  transition: width var(--duration) var(--ease);
}

.site-nav a:hover { color: var(--sage); }
.site-nav a:hover::after { width: 100%; }

/* ---- Buttons ---- */
.header-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition:
    transform var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease),
    background var(--duration) var(--ease);
}

.header-cta:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 2px;
}

.header-cta,
.button.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--sage), var(--sage-light));
  box-shadow: 0 8px 24px rgba(107, 123, 60, 0.22);
}

.header-cta:hover,
.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(107, 123, 60, 0.3);
}

.button.secondary {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line-strong);
}

.button.secondary:hover {
  background: var(--cream);
  transform: translateY(-1px);
}

.button.ghost {
  color: var(--sage);
  background: transparent;
  border-color: var(--sage);
}

.button.ghost:hover {
  background: var(--sage-muted);
  transform: translateY(-1px);
}

.button.wide { width: 100%; }

/* ---- SVG icon buttons ---- */
.button svg,
.header-cta svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

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

.section-heading {
  max-width: 780px;
  margin-bottom: var(--space-lg);
}

.section-heading.compact {
  margin-bottom: var(--space-md);
}

/* ---- Hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-lg);
  align-items: center;
  padding-top: var(--space-xl);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 32px 0 28px;
}

.hero-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.hero-points li {
  position: relative;
  padding-left: 28px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
}

.hero-visual {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(180deg, var(--cream), var(--cream-deep));
  position: relative;
}

.hero-photo {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  object-position: center 18%;
}

/* Soft organic overlay on hero image */
.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 60%,
    rgba(245, 240, 225, 0.4) 100%
  );
  pointer-events: none;
}

/* ---- Cards ---- */
.cards-grid {
  display: grid;
  gap: 20px;
}

.cards-grid.three { grid-template-columns: repeat(3, 1fr); }
.cards-grid.two { grid-template-columns: repeat(2, 1fr); }

.info-card,
.service-card,
.about-card {
  padding: var(--space-md) var(--space-md) 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.info-card:hover,
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.info-card p,
.service-card p {
  color: var(--text-muted);
  margin-bottom: 0;
}

.service-card { min-height: 200px; }

/* Service accent cards */
.accent-sage {
  background: linear-gradient(180deg, rgba(107, 123, 60, 0.08), var(--surface));
  border-color: rgba(107, 123, 60, 0.15);
}

.accent-sand {
  background: linear-gradient(180deg, rgba(212, 196, 168, 0.2), var(--surface));
  border-color: rgba(212, 196, 168, 0.3);
}

.accent-blue {
  background: linear-gradient(180deg, rgba(135, 206, 235, 0.1), var(--surface));
  border-color: rgba(135, 206, 235, 0.2);
}

.accent-rose {
  background: linear-gradient(180deg, rgba(198, 123, 92, 0.08), var(--surface));
  border-color: rgba(198, 123, 92, 0.15);
}

/* ---- Emphasis / Benefits ---- */
.emphasis-section {
  display: grid;
  gap: var(--space-md);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.benefits-grid span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px 18px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  transition: background var(--duration) var(--ease), transform var(--duration) var(--ease);
  cursor: default;
}

.benefits-grid span:hover {
  background: var(--cream);
  transform: translateY(-2px);
}

/* ---- Image Story ---- */
.image-story {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-lg);
  align-items: center;
}

.story-photo {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  min-height: 420px;
}

.story-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
}

.story-copy {
  display: grid;
  gap: 14px;
}

.story-copy p {
  color: var(--text-muted);
}

.story-copy p:last-child { margin-bottom: 0; }

/* ---- Gallery ---- */
.gallery-section { padding-top: var(--space-sm); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.gallery-card {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.gallery-card img,
.gallery-video {
  min-height: 300px;
}

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

.gallery-video {
  width: 100%;
  background: var(--cream);
  object-fit: cover;
}

.gallery-card figcaption {
  padding: 18px 20px 22px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ---- Soft panel (APA section) ---- */
.soft-panel {
  background: linear-gradient(135deg, var(--cream), var(--cream-deep));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: var(--space-lg);
  text-align: center;
}

.soft-panel p {
  color: var(--text-muted);
  max-width: 65ch;
  margin-left: auto;
  margin-right: auto;
}

/* ---- About ---- */
.about-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 22px;
}

.about-card {
  padding: var(--space-md);
}

.about-card.main {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.about-card.values {
  background: linear-gradient(135deg, rgba(107, 123, 60, 0.06), rgba(212, 196, 168, 0.1));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.subtitle {
  margin: -4px 0 var(--space-sm);
  color: var(--sage);
  font-weight: 600;
  font-size: 0.95rem;
}

.about-card p { color: var(--text-muted); }

.about-card.values ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  color: var(--text-muted);
  display: grid;
  gap: 10px;
}

.about-card.values li {
  position: relative;
  padding-left: 24px;
}

.about-card.values li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
}

/* ---- Steps ---- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.steps-grid article {
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration) var(--ease);
}

.steps-grid article:hover {
  transform: translateY(-2px);
}

.steps-grid span {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--sage-muted), rgba(107, 123, 60, 0.18));
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--sage);
  font-family: 'Lora', serif;
  font-size: 0.95rem;
}

.steps-grid p {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 0;
}

/* ---- FAQ ---- */
.faq-list {
  display: grid;
  gap: 12px;
  max-width: 800px;
}

.faq-list details {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration) var(--ease);
}

.faq-list details[open] {
  box-shadow: var(--shadow-card);
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.faq-list summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--sage);
  flex-shrink: 0;
  transition: transform var(--duration) var(--ease);
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list p {
  margin: 14px 0 0;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---- Contact ---- */
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.contact-copy {
  align-self: center;
}

.contact-copy p { color: var(--text-muted); }

.contact-cards {
  display: grid;
  gap: 12px;
  margin-top: var(--space-md);
}

.contact-cards a,
.contact-cards div {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: background var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.contact-cards a { cursor: pointer; }

.contact-cards a:hover {
  background: var(--cream);
  transform: translateX(4px);
}

.contact-cards strong,
.contact-cards span { display: block; }
.contact-cards strong { font-size: 0.88rem; color: var(--sage); text-transform: uppercase; letter-spacing: 0.06em; }
.contact-cards span { color: var(--text); margin-top: 4px; }

/* ---- Contact Form ---- */
.contact-form {
  display: grid;
  gap: 18px;
  padding: var(--space-md) var(--space-md) 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px var(--sage-muted);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-light);
}

.form-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-light);
}

/* ---- Footer ---- */
.site-footer {
  padding: var(--space-lg) 0 var(--space-sm);
  text-align: center;
  color: var(--text-light);
  border-top: 1px solid var(--line);
  margin-top: var(--space-md);
}

.site-footer p { margin: 6px 0; font-size: 0.92rem; }

/* ---- Scroll reveal animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */

/* Tablet — 1040px */
@media (max-width: 1040px) {
  .hero,
  .cards-grid.three,
  .cards-grid.two,
  .about-layout,
  .image-story,
  .contact-section,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual { min-height: 400px; }
  .hero-photo { min-height: 400px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .site-header {
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    flex-wrap: wrap;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Mobile — 720px */
@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, var(--max-width));
  }

  .site-header { top: 10px; }

  h1 { font-size: clamp(2.2rem, 9vw, 3rem); }
  h2 { font-size: clamp(1.6rem, 7vw, 2.4rem); }

  .hero { padding-top: var(--space-md); }
  .hero-actions { flex-direction: column; }
  .button, .header-cta { width: 100%; }
  .benefits-grid { grid-template-columns: 1fr; }
  .section { padding: var(--space-lg) 0; }

  .soft-panel { padding: var(--space-md); }

  .site-nav {
    gap: 10px 16px;
    font-size: 0.9rem;
  }
}

/* Small mobile — 375px */
@media (max-width: 400px) {
  :root {
    --space-lg: 36px;
    --space-xl: 48px;
  }

  .brand small { display: none; }
  .hero-points { font-size: 0.88rem; }
}
