@tailwind base;
@tailwind components;
@tailwind utilities;

@font-face {
  font-family: 'Monotype Corsiva';
  src: url('/fonts/Monotype-Corsiva-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Monotype Corsiva';
  src: url('/fonts/Monotype-Corsiva-Regular-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Monotype Corsiva';
  src: url('/fonts/Monotype-Corsiva-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Monotype Corsiva';
  src: url('/fonts/Monotype-Corsiva-Bold-Italic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@layer base {
  html {
    scroll-behavior: smooth;
    overflow-x: hidden;
  }

  body {
    font-family: 'Inter', system-ui, sans-serif;
    background:
      radial-gradient(circle at 18% 0%, rgba(143, 94, 51, 0.14), transparent 34rem),
      linear-gradient(180deg, #121214 0%, #171515 42%, #111113 100%);
    color: var(--color-cream, #F4EFE5);
    overflow-x: hidden;
  }

  h1, h2, h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    letter-spacing: 0;
  }

  ::selection {
    background-color: rgba(201, 154, 74, 0.3);
    color: #F4EFE5;
  }
}

@layer components {
  .section-padding {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .section-breathing {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .section-top-breathing {
    padding-top: 3.5rem;
  }

  .section-bottom-breathing {
    padding-bottom: 3.5rem;
  }

  main > section + section {
    margin-top: 0;
  }

  .container-padding {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .section-panel {
    border: 1px solid rgba(244,239,229,0.10);
    border-radius: 8px;
    background: rgba(244,239,229,0.035);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 18px 42px rgba(0,0,0,0.18);
  }

  .brass-button,
  .ghost-button,
  .ghost-button-light,
  .ghost-button-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.78rem 1.35rem;
    border-radius: 8px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  }

  .brass-button {
    border: 1px solid rgba(246, 199, 112, 0.78);
    background: linear-gradient(180deg, #e2b766 0%, #c99443 100%);
    color: #101014;
    box-shadow: 0 12px 26px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.28);
  }
  .brass-button:hover {
    transform: translateY(-2px);
    background-color: #d8aa55;
    border-color: #e8c579;
    box-shadow: 0 16px 32px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.35);
  }
  .brass-button:active {
    transform: translateY(0);
  }

  .ghost-button {
    border: 1px solid rgba(244,239,229,0.18);
    background: rgba(244,239,229,0.07);
    color: #F4EFE5;
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  }
  .ghost-button:hover {
    transform: translateY(-2px);
    background: rgba(244,239,229,0.12);
    border-color: rgba(226,183,102,0.72);
    box-shadow: 0 14px 28px rgba(0,0,0,0.20);
  }
  .ghost-button:active {
    transform: translateY(0);
  }
  .ghost-button-light {
    border: 1px solid rgba(244,239,229,0.18);
    background: rgba(244,239,229,0.07);
    color: #F4EFE5;
    backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  }
  .ghost-button-light:hover {
    transform: translateY(-2px);
    background: rgba(244,239,229,0.10);
    border-color: #C99A4A;
    box-shadow: 0 14px 30px rgba(0,0,0,0.34);
  }
  .ghost-button-dark {
    color: #101014;
    background: rgba(255,255,255,0.82);
    border-color: rgba(16,16,20,0.45);
  }
  .ghost-button-dark:hover {
    transform: translateY(-2px);
    border-color: #5A3825;
    box-shadow: 0 14px 30px rgba(0,0,0,0.18);
  }

  .image-frame {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(244, 239, 229, 0.12);
    background: #171515;
    box-shadow: 0 20px 44px rgba(0,0,0,0.28);
  }
  .image-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent 42%, rgba(0,0,0,0.18));
    pointer-events: none;
    z-index: 10;
  }

  .image-frame img,
  .gallery-image,
  .hero-preview-image {
    filter: saturate(0.93) contrast(1.06) brightness(1.03);
  }

  .placeholder-frame {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(135deg, #191817 0%, #25211d 55%, #151516 100%);
    border: 1px solid rgba(244, 239, 229, 0.10);
  }
  .placeholder-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23C99A4A' fill-opacity='0.03' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
  }

  .craft-divider {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(244,239,229,0.12) 18%, rgba(201,154,74,0.34) 50%, rgba(244,239,229,0.12) 82%, transparent 100%);
  }

  .corner-mark {
    position: absolute;
    width: 0.75rem;
    height: 0.75rem;
    border-color: rgba(244,239,229,0.25);
  }
  .corner-mark-tl {
    position: absolute;
    width: 0.75rem;
    height: 0.75rem;
    top: 0.5rem;
    left: 0.5rem;
    border-top: 1px solid rgba(244,239,229,0.25);
    border-left: 1px solid rgba(244,239,229,0.25);
  }
  .corner-mark-tr {
    position: absolute;
    width: 0.75rem;
    height: 0.75rem;
    top: 0.5rem;
    right: 0.5rem;
    border-top: 1px solid rgba(244,239,229,0.25);
    border-right: 1px solid rgba(244,239,229,0.25);
  }
  .corner-mark-bl {
    position: absolute;
    width: 0.75rem;
    height: 0.75rem;
    bottom: 0.5rem;
    left: 0.5rem;
    border-bottom: 1px solid rgba(244,239,229,0.25);
    border-left: 1px solid rgba(244,239,229,0.25);
  }
  .corner-mark-br {
    position: absolute;
    width: 0.75rem;
    height: 0.75rem;
    right: 0.5rem;
    bottom: 0.5rem;
    border-right: 1px solid rgba(244,239,229,0.25);
    border-bottom: 1px solid rgba(244,239,229,0.25);
  }

  .card-hover {
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  }
  .card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 42px rgba(0,0,0,0.28), 0 0 0 1px rgba(244,239,229,0.08);
  }

  .text-gradient {
    background: linear-gradient(135deg, #F4EFE5 0%, #C99A4A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

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

@layer utilities {
  .image-fade {
    mask-image: none;
    -webkit-mask-image: none;
  }

  .font-script {
    font-family: 'Monotype Corsiva', 'Apple Chancery', 'URW Chancery L', cursive;
  }

  .font-brand {
    font-family: 'Monotype Corsiva', 'Apple Chancery', 'URW Chancery L', cursive;
  }

  .font-display {
    font-family: 'Cormorant Garamond', Georgia, serif;
  }

  .font-body {
    font-family: 'Inter', system-ui, sans-serif;
  }

  .animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
  }

  .animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
  }

  .animate-slide-in {
    animation: slideIn 0.6s ease-out forwards;
  }

  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes brassPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 154, 74, 0.2); }
  50% { box-shadow: 0 0 20px 4px rgba(201, 154, 74, 0.1); }
}

.brass-glow {
  animation: brassPulse 3s ease-in-out infinite;
}

@media (min-width: 640px) {
  .container-padding {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

@media (min-width: 1024px) {
  .section-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .section-breathing {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .section-top-breathing {
    padding-top: 4.5rem;
  }

  .section-bottom-breathing {
    padding-bottom: 4.5rem;
  }

  .container-padding {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.brass-button {
  border: 1px solid rgba(246, 199, 112, 0.78) !important;
}

.ghost-button,
.ghost-button-light,
.ghost-button-dark,
.gallery-filter {
  border-width: 1px;
  border-style: solid;
}

.gallery-filter {
  border-radius: 8px !important;
}

.section-panel,
.image-frame,
.placeholder-frame {
  border: 1px solid rgba(244, 239, 229, 0.12) !important;
  border-radius: 8px !important;
}

.section-panel {
  background: rgba(244,239,229,0.035) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 18px 42px rgba(0,0,0,0.18) !important;
}

.ghost-button,
.ghost-button-light {
  border-color: rgba(244,239,229,0.18) !important;
}
