/* ============================================================
   Baroya Inc — shared stylesheet
   Built from the Baroya Brand Identity Guidelines v1.0
   ============================================================ */

:root {
  /* Brand palette */
  --terracotta: #CC785C;
  --deep-terracotta: #A85C3E;
  --near-black: #141413;
  --soft-black: #2A2A28;
  --warm-white: #F0EFEA;
  --linen: #E8E6DC;
  --warm-gray: #828179;
  --white: #FFFFFF;

  /* Derived tones */
  --line: #E2E0D6;
  --line-dark: rgba(240, 239, 234, 0.12);
  --terracotta-tint: rgba(204, 120, 92, 0.10);
  --terracotta-soft: rgba(204, 120, 92, 0.16);

  /* Type */
  --display: "Red Hat Display", system-ui, sans-serif;
  --text: "Red Hat Text", system-ui, sans-serif;
  --mono: "Red Hat Mono", ui-monospace, monospace;

  /* Spacing scale */
  --gap: 24px;
  --shell: 1240px;
  --radius: 18px;
  --radius-lg: 28px;

  /* Elevation */
  --shadow-sm: 0 2px 8px rgba(20, 20, 19, 0.04);
  --shadow: 0 18px 44px rgba(20, 20, 19, 0.06);
  --shadow-lg: 0 40px 90px rgba(20, 20, 19, 0.12);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  color: var(--soft-black);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

::selection { background: var(--terracotta); color: var(--near-black); }

/* ----------------------------------------------------------
   Typography
   ---------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--display);
  color: var(--near-black);
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 6vw, 74px); letter-spacing: -0.045em; }
h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.035em; }
h3 { font-size: clamp(21px, 2vw, 26px); font-weight: 700; }
h4 { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }

p { margin: 0; text-wrap: pretty; }

a { color: var(--terracotta); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--deep-terracotta); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--terracotta);
}
.eyebrow.no-rule::before { display: none; }

.lead {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.6;
  color: var(--soft-black);
  max-width: 60ch;
}
.muted { color: var(--warm-gray); }
.mono { font-family: var(--mono); }

/* ----------------------------------------------------------
   Layout helpers
   ---------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
}

section { position: relative; }

.section-pad { padding: clamp(64px, 9vw, 128px) 0; }
.section-pad-sm { padding: clamp(48px, 6vw, 80px) 0; }

.section-head {
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; align-items: center; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: var(--gap); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.surface-dark { background: var(--near-black); color: var(--warm-white); }
.surface-dark h1, .surface-dark h2, .surface-dark h3, .surface-dark h4 { color: var(--white); }
.surface-dark .lead { color: var(--linen); }
.surface-dark .muted { color: var(--warm-gray); }

/* ----------------------------------------------------------
   Buttons
   ---------------------------------------------------------- */
.btn {
  font-family: var(--text);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .25s var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn-primary {
  background: var(--terracotta);
  color: var(--near-black);
  box-shadow: 0 8px 22px rgba(204, 120, 92, 0.28);
}
.btn-primary:hover {
  background: var(--deep-terracotta);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(168, 92, 62, 0.34);
}
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost {
  background: transparent;
  color: var(--near-black);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--near-black); transform: translateY(-2px); }
.surface-dark .btn-ghost { color: var(--warm-white); border-color: rgba(240,239,234,0.28); }
.surface-dark .btn-ghost:hover { border-color: var(--warm-white); background: rgba(240,239,234,0.06); }
.btn-lg { padding: 17px 30px; font-size: 16px; }

.textlink {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--terracotta);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.textlink svg { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.textlink:hover svg { transform: translateX(4px); }

/* ----------------------------------------------------------
   Cards
   ---------------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 34px);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card.hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(204, 120, 92, 0.4);
}
.card.dark { background: var(--near-black); color: var(--warm-white); border-color: transparent; }
.card.dark h3, .card.dark h4 { color: var(--white); }

/* Icon chip */
.icon-chip {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--terracotta-tint);
  color: var(--deep-terracotta);
  margin-bottom: 22px;
}
.icon-chip svg { width: 26px; height: 26px; stroke-width: 1.5; }
.surface-dark .icon-chip, .card.dark .icon-chip {
  background: rgba(204,120,92,0.18);
  color: var(--terracotta);
}

/* ----------------------------------------------------------
   Header
   ---------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--near-black);
  color: var(--warm-white);
  border-bottom: 1px solid var(--line-dark);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 40px;
  letter-spacing: -0.05em;
  color: var(--white);
  display: inline-flex;
  align-items: center;
}
.logo:hover { color: var(--white); }
.logo .dot { color: var(--terracotta); }
.logo .mark {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--terracotta);
  margin-left: 3px;
  margin-bottom: -2px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--linen);
  font-size: 15px;
  font-weight: 500;
  padding: 9px 15px;
  border-radius: 9px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover { color: var(--white); background: rgba(240,239,234,0.06); }
.nav-links a.active { color: var(--terracotta); display: inline-flex; align-items: center; gap: 8px; }
.nav-links a.active::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--terracotta);
  flex: none;
  animation: footDot 1.8s var(--ease) infinite;
}
@media (prefers-reduced-motion: reduce) { .nav-links a.active::before { animation: none; } }
.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 42px; height: 42px;
  color: var(--warm-white);
}
.nav-toggle svg { width: 26px; height: 26px; }

/* ----------------------------------------------------------
   Footer
   ---------------------------------------------------------- */
.site-footer {
  background: var(--near-black);
  color: var(--linen);
  padding: clamp(56px, 7vw, 88px) 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line-dark);
}
.footer-brand .logo { font-size: 50px; margin-bottom: 16px; }
.footer-brand p { color: var(--warm-gray); font-size: 15px; max-width: 34ch; }
.footer-col h5 {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--warm-gray);
  margin: 0 0 18px;
  font-weight: 400;
}
@keyframes footDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.65); }
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { color: var(--linen); font-size: 15px; }
.footer-col a:hover { color: var(--terracotta); }
.footer-contact { font-style: normal; display: flex; flex-direction: column; gap: 11px; font-size: 15px; color: var(--linen); }
.social {
  display: flex; gap: 10px; margin-top: 22px;
}
.social a {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line-dark);
  display: grid; place-items: center;
  color: var(--linen);
  transition: all .2s var(--ease);
}
.social a:hover { background: var(--terracotta); color: var(--near-black); border-color: var(--terracotta); transform: translateY(-2px); }
.social svg { width: 19px; height: 19px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 28px;
  font-size: 13px;
  color: var(--warm-gray);
}
.footer-bottom a { color: var(--warm-gray); }
.footer-bottom a:hover { color: var(--linen); }
.footer-legal { display: flex; gap: 22px; }

/* ----------------------------------------------------------
   Image placeholders (photo slots)
   ---------------------------------------------------------- */
.photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(204,120,92,0.07) 0 12px, rgba(204,120,92,0) 12px 24px),
    var(--linen);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--warm-gray);
}
.photo .photo-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(4px);
}
.photo.dark {
  background:
    repeating-linear-gradient(135deg, rgba(204,120,92,0.16) 0 12px, rgba(204,120,92,0) 12px 24px),
    var(--soft-black);
  border-color: var(--line-dark);
}
.photo.dark .photo-label { background: rgba(20,20,19,0.5); border-color: var(--line-dark); color: var(--linen); }

/* Pills / tags */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 6px 13px;
  border-radius: 100px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--soft-black);
}
.surface-dark .pill { background: rgba(240,239,234,0.05); border-color: var(--line-dark); color: var(--linen); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--terracotta); }

/* Stat */
.stat-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(38px, 5vw, 58px);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--near-black);
}
.surface-dark .stat-num { color: var(--white); }
.stat-num .unit { color: var(--terracotta); }
.stat-label { font-size: 14px; color: var(--warm-gray); margin-top: 10px; }

/* ----------------------------------------------------------
   Scroll reveal
   ---------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
.reveal[data-d="5"] { transition-delay: .40s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ----------------------------------------------------------
   Misc
   ---------------------------------------------------------- */
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.surface-dark .divider { background: var(--line-dark); }

.kicker-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.dotgrid {
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 920px) {
  .grid.four { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--near-black);
    border-bottom: 1px solid var(--line-dark);
    padding: 12px 20px 22px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 14px 12px; border-bottom: 1px solid var(--line-dark); font-size: 17px; }
  .nav-toggle { display: grid; place-items: center; }
  .nav .btn { display: none; }
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-legal { gap: 16px; }
}
