/*
  IKORE Udaipur - Shared Styles
  Quiet luxury editorial baseline styles to pair with Tailwind utility classes.
*/

:root {
  --bg-parchment: #FDFCF8;
  --bg-sand: #F4F1EA;
  --accent-forest: #1B2B22;
  --accent-bronze: #A67C52;
  --text-body: #3A3A3A;
  --divider: rgba(27, 43, 34, 0.18);
  --overlay-dark: rgba(27, 43, 34, 0.35);
  --overlay-clear: rgba(27, 43, 34, 0.05);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-body);
  background-color: var(--bg-parchment);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Sticky mobile action bar spacing */
@media (max-width: 767px) {
  body {
    padding-bottom: 5.5rem;
  }
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-serif-display {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  color: var(--accent-forest);
}

/* Thin editorial divider utility */
.divider-thin {
  width: 100%;
  height: 1px;
  background: var(--divider);
}

/* Subtle image tone overlay helper */
.image-overlay-soft {
  position: relative;
  isolation: isolate;
}

.image-overlay-soft::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, var(--overlay-clear) 0%, var(--overlay-dark) 100%);
}

.image-overlay-soft > * {
  position: relative;
  z-index: 2;
}

/* Underline hover for minimal, elegant text links/buttons */
.link-underline {
  position: relative;
  display: inline-block;
}

.link-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 600ms ease;
}

.link-underline:hover::after,
.link-underline:focus-visible::after {
  transform: scaleX(1);
}

/* Shared button system for premium consistency */
.btn-base {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.125rem;
  border: 1px solid transparent;
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition: color 500ms ease, background-color 500ms ease, border-color 500ms ease;
}

.btn-primary {
  background: var(--accent-bronze);
  color: var(--bg-parchment);
  border-color: var(--accent-bronze);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #936c46;
  border-color: #936c46;
}

.btn-forest {
  background: var(--accent-forest);
  color: var(--bg-parchment);
  border-color: var(--accent-forest);
}

.btn-forest:hover,
.btn-forest:focus-visible {
  background: transparent;
  color: var(--accent-forest);
}

.btn-outline {
  background: transparent;
  color: var(--accent-forest);
  border-color: var(--accent-forest);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--accent-forest);
  color: var(--bg-parchment);
}

.btn-ghost {
  background: transparent;
  color: var(--accent-forest);
  border-color: rgba(27, 43, 34, 0.22);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: rgba(27, 43, 34, 0.45);
}

/* Editorial utility */
.eyebrow-line {
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}

/* Scroll reveal base state; Tailwind handles duration/ease classes in markup */
.reveal {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition-property: opacity, transform;
  will-change: opacity, transform;
  backface-visibility: hidden;
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Prevent sticky header overlap on anchor jumps */
[id] {
  scroll-margin-top: 7.5rem;
}

/* Active nav state set by JS scroll spy */
.nav-link-active {
  color: var(--accent-forest);
  font-weight: 500;
}

/* Small, non-intrusive toast */
.toast {
  position: fixed;
  right: 1rem;
  bottom: 5.5rem;
  max-width: 20rem;
  background: rgba(253, 252, 248, 0.97);
  color: var(--accent-forest);
  border: 1px solid rgba(27, 43, 34, 0.2);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 300ms ease, transform 300ms ease;
  z-index: 60;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Prevent overlap with desktop layout */
@media (min-width: 768px) {
  .toast {
    bottom: 1.25rem;
  }
}
