@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #14131f;
  --ink-soft: #46445c;
  --ink-faint: #8583a0;
  --paper: #fbf7f1;
  --paper-alt: #f3ede2;
  --paper-line: #e7dfd0;
  --coral: #ff6b4a;
  --coral-dark: #e04f2f;
  --coral-light: #ffe3d9;
  --gold: #f2b84b;
  --gold-dark: #d99a24;
  --teal: #1f6f63;
  --teal-light: #dcece7;

  --shadow-sm: 0 1px 2px rgba(20, 19, 31, 0.07), 0 1px 1px rgba(255, 107, 74, 0.05);
  --shadow-md: 0 12px 28px -10px rgba(20, 19, 31, 0.20), 0 4px 10px -4px rgba(255, 107, 74, 0.14);
  --shadow-lg: 0 28px 56px -16px rgba(20, 19, 31, 0.30), 0 10px 20px -6px rgba(242, 184, 75, 0.18);
  --shadow-floating: 0 40px 80px -20px rgba(20, 19, 31, 0.38), 0 16px 32px -10px rgba(255, 107, 74, 0.20);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.font-display {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  letter-spacing: -0.03em;
}

h1, h2, h3, .font-display { font-family: 'Fraunces', ui-serif, Georgia, serif; }

/* ---------- Grain overlay for depth ---------- */
.grain {
  position: relative;
  isolation: isolate;
}
.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  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");
  z-index: 1;
}

/* ---------- Layered gradient mesh backgrounds ---------- */
.mesh-hero {
  background:
    radial-gradient(60% 55% at 15% 10%, rgba(255, 122, 87, 0.35), transparent 60%),
    radial-gradient(50% 50% at 90% 0%, rgba(242, 184, 75, 0.30), transparent 60%),
    radial-gradient(70% 60% at 50% 100%, rgba(31, 111, 99, 0.12), transparent 65%),
    var(--ink);
}

.mesh-soft {
  background:
    radial-gradient(45% 45% at 85% 15%, rgba(255, 107, 74, 0.14), transparent 60%),
    radial-gradient(40% 40% at 10% 85%, rgba(242, 184, 75, 0.16), transparent 60%),
    var(--paper);
}

/* ---------- Elevation / depth system ---------- */
.surface-base { background: var(--paper); }
.surface-elevated {
  background: #fff;
  box-shadow: var(--shadow-md);
  border-radius: 1.25rem;
}
.surface-floating {
  background: #fff;
  box-shadow: var(--shadow-floating);
  border-radius: 1.5rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.875rem 1.75rem;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background-color 0.25s ease, color 0.25s ease;
  will-change: transform;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--coral), var(--gold-dark));
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-primary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border: 1.5px solid rgba(251, 247, 241, 0.35);
}
.btn-ghost:hover { background: rgba(251, 247, 241, 0.1); border-color: rgba(251, 247, 241, 0.6); transform: translateY(-2px); }
.btn-ghost:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.btn-dark {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-sm);
}
.btn-dark:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: #232135; }
.btn-dark:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--paper-line);
}
.btn-outline:hover { border-color: var(--coral); color: var(--coral-dark); transform: translateY(-2px); }
.btn-outline:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

/* ---------- Links ---------- */
.link-underline {
  position: relative;
  text-decoration: none;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-link {
  color: var(--ink-soft);
  font-weight: 500;
  transition: color 0.25s ease;
}
.nav-link:hover { color: var(--coral-dark); }
.nav-link:focus-visible { outline: 2px solid var(--coral); outline-offset: 4px; border-radius: 4px; }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* ---------- Form fields ---------- */
.field {
  width: 100%;
  border-radius: 0.9rem;
  border: 1.5px solid var(--paper-line);
  background: #fff;
  padding: 0.85rem 1rem;
  color: var(--ink);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.field:hover { border-color: #d8cdb8; }
.field:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 107, 74, 0.15);
}
.field:focus-visible { transform: translateY(-1px); }

/* ---------- Image treatment ---------- */
.img-treated {
  position: relative;
  overflow: hidden;
}
.img-treated img { display: block; width: 100%; height: 100%; object-fit: cover; }
.img-treated::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 19, 31, 0.55), transparent 55%);
}
.img-treated::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 107, 74, 0.28), rgba(242, 184, 75, 0.14));
  mix-blend-mode: multiply;
  z-index: 1;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
}
.badge-coral { background: var(--coral-light); color: var(--coral-dark); }
.badge-gold { background: #fbead0; color: var(--gold-dark); }
.badge-teal { background: var(--teal-light); color: var(--teal); }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .field { transition: none; }
}

/* ---------- Mobile nav ---------- */
.mobile-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-nav.is-open { max-height: 32rem; }

/* ---------- Divider stitch motif ---------- */
.stitch-divider {
  height: 1px;
  background-image: repeating-linear-gradient(to right, var(--paper-line) 0 8px, transparent 8px 14px);
}

/* ---------- Utility ---------- */
.text-balance { text-wrap: balance; }
.container-page { max-width: 80rem; margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem; }
@media (min-width: 768px) { .container-page { padding-left: 2rem; padding-right: 2rem; } }
