/* Ahmad Studio — shared styles (works alongside Tailwind CDN) */

:root {
  --ink: #0D0D0F;
  --parchment: #FAFAF8;
  --ember: #E4672E;
  --ember-light: #F0946B;
  --steel: #B8B8BD;
  --steel-dark: #6E6E74;
  --ivory: #F5F0EA;
  --charcoal: #1A1A1A;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--parchment);
  color: var(--charcoal);
  font-family: 'Outfit', sans-serif;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.container-studio {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
@media (min-width: 768px) {
  .container-studio { padding-left: 2.5rem; padding-right: 2.5rem; }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--ember);
  color: var(--ivory);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: transform 0.3s, background-color 0.3s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  transform: scale(1.03);
  background-color: var(--ember-light);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(110,110,116,0.4);
  color: var(--charcoal);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: border-color 0.3s, color 0.3s;
  background: transparent;
  cursor: pointer;
}
.btn-outline:hover {
  border-color: var(--ember);
  color: var(--ember);
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ember);
  font-weight: 600;
}

/* Calligraphy stroke reveal animation, used in the hero — draw, then a
   soft glow settles in, with a small light following the pen tip. */
.stroke-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw-stroke 2.2s 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards,
             stroke-glow 1.6s 2.3s ease-out forwards;
}
@keyframes draw-stroke {
  to { stroke-dashoffset: 0; }
}
@keyframes stroke-glow {
  0% { filter: drop-shadow(0 0 0px rgba(228,103,46,0)); }
  40% { filter: drop-shadow(0 0 6px rgba(228,103,46,0.55)); }
  100% { filter: drop-shadow(0 0 2px rgba(228,103,46,0.25)); }
}

.pen-tip {
  offset-path: path('M10 140 C 160 40, 260 190, 400 90 S 620 -10, 760 70 S 870 150, 890 60');
  offset-distance: 0%;
  animation: travel-tip 2.2s 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards,
             fade-tip 2.5s 0.3s ease-out forwards;
  opacity: 0;
}
@keyframes travel-tip {
  to { offset-distance: 100%; }
}
@keyframes fade-tip {
  0% { opacity: 0; }
  8% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .stroke-draw { stroke-dashoffset: 0; animation: none; }
  .pen-tip { display: none; }
}

/* Navbar */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background-color 0.3s;
}
.site-header.scrolled {
  background-color: rgba(13,13,15,0.9);
  backdrop-filter: blur(8px);
}

/* Mockup gallery */
.gallery-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  scrollbar-width: thin;
}
.gallery-item {
  flex-shrink: 0;
  width: 78%;
  scroll-snap-align: center;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--ink);
  cursor: pointer;
}
@media (min-width: 640px) {
  .gallery-item { width: 45%; }
}
@media (min-width: 1024px) {
  .gallery-item { width: 32%; }
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(13,13,15,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 0.75rem;
}
/* Admin mobile drawer */
.admin-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  color: var(--ivory);
  padding: 14px 16px;
}
@media (max-width: 767px) {
  .admin-topbar { display: flex; }
}
.admin-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
}
.admin-drawer.open { display: block; }
.admin-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.admin-drawer-panel {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 240px;
  background: var(--ink);
  color: var(--ivory);
  padding: 0;
  overflow-y: auto;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: rgba(245,240,234,0.1);
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}
