/* =============================================
   Yeon — Global Styles
   "Where nature meets form"
   ============================================= */

/* Smooth page-wide transitions */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Base body text — ensure minimum legibility */
body {
  font-size: 16px;
  line-height: 1.6;
}

::selection {
  background-color: #C9B99A;
  color: #3D3428;
}

/* =============================================
   Philosophy — typographic hierarchy
   ============================================= */

.phil-body p {
  transition: opacity 0.3s ease;
}

.phil-highlight {
  font-size: 1.05em;
  font-style: italic;
  color: #3D3428;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.phil-closing {
  color: #3D3428;
  padding-top: 0.5rem;
  font-weight: 450;
}

/* =============================================
   Animations — slow, breathing, contemplative
   ============================================= */

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

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

@keyframes softFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes expandLine {
  from { width: 0; }
  to { width: 64px; }
}

/* =============================================
   Scroll-triggered View Transitions
   ============================================= */

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

.view-trigger.view-active .view-transition {
  opacity: 1;
  transform: translateY(0);
}

.view-trigger.view-active .view-transition:nth-child(1) { transition-delay: 0.15s; }
.view-trigger.view-active .view-transition:nth-child(2) { transition-delay: 0.3s; }
.view-trigger.view-active .view-transition:nth-child(3) { transition-delay: 0.45s; }
.view-trigger.view-active .view-transition:nth-child(4) { transition-delay: 0.6s; }
.view-trigger.view-active .view-transition:nth-child(5) { transition-delay: 0.75s; }
.view-trigger.view-active .view-transition:nth-child(6) { transition-delay: 0.9s; }

/* =============================================
   Header States — transparent on hero, solid on scroll
   ============================================= */

.header-transparent {
  background-color: transparent;
  border-bottom: 1px solid transparent;
}

.header-transparent a,
.header-transparent button svg {
  color: #FAF7F2; /* ivory */
}

.header-transparent .obna-link::after {
  background-color: #FAF7F2;
}

.header-solid {
  background-color: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(232, 223, 209, 0.5);
}

.header-solid a,
.header-solid button svg {
  color: #3D3428; /* walnut */
}

.header-solid nav a {
  color: #6B5E4F; /* earth */
}

.header-solid nav a:hover {
  color: #3D3428;
}

/* =============================================
   Mobile Menu
   ============================================= */

#mobile-menu {
  transition: max-height 0.4s ease-out, opacity 0.4s ease-out;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

#mobile-menu.open {
  max-height: 400px;
  opacity: 1;
}

/* =============================================
   Custom Elements
   ============================================= */

/* Decorative thin line */
.obna-line {
  width: 64px;
  height: 1px;
  background-color: #C9B99A;
}

/* Warm image overlay on hover */
.obna-card-image {
  transition: transform 0.8s ease-out, filter 0.8s ease-out;
}

.group:hover .obna-card-image {
  transform: scale(1.03);
}

/* Soft border radius for organic feel */
.obna-rounded {
  border-radius: 24px;
}

/* Brass accent underline for links */
.obna-link {
  position: relative;
  display: inline-block;
}

.obna-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #B08D57;
  transition: width 0.4s ease-out;
}

.obna-link:hover::after {
  width: 100%;
}

/* Scrollbar — thin overlay that doesn't eat into layout */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 185, 154, 0.3) transparent;
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(201, 185, 154, 0.3);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 185, 154, 0.6);
}

/* =============================================
   Modal — contemplative overlay
   ============================================= */

.obna-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  pointer-events: none;
  visibility: hidden;
}

.obna-modal.open {
  pointer-events: auto;
  visibility: visible;
}

.obna-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(61, 52, 40, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.obna-modal.open .obna-modal-backdrop {
  opacity: 1;
}

.obna-modal-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1rem;
}

.obna-modal-content {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.5s ease-out 0.1s, transform 0.5s ease-out 0.1s;
  max-height: 90vh;
  overflow-y: auto;
}

.obna-modal.open .obna-modal-content {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.obna-modal-content::-webkit-scrollbar {
  width: 3px;
}

.obna-modal-content::-webkit-scrollbar-thumb {
  background: rgba(201, 185, 154, 0.3);
  border-radius: 2px;
}

/* Step panel transitions */
.modal-step-panel {
  animation: modalPanelIn 0.4s ease-out forwards;
}

.modal-step-panel.hidden {
  display: none;
}

@keyframes modalPanelIn {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Form field focus glow */
.obna-modal input:focus,
.obna-modal select:focus,
.obna-modal textarea:focus {
  border-color: #B08D57;
  box-shadow: 0 2px 0 0 rgba(176, 141, 87, 0.15);
}

/* Validation error state */
.obna-modal .field-error {
  border-color: #c9726a !important;
}

.obna-modal .error-message {
  color: #c9726a;
  font-size: 0.7rem;
  margin-top: 0.25rem;
  letter-spacing: 0.05em;
}

/* Select arrow */
.obna-modal select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C9B99A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
}
