/* Sullivan Creative Co. — v5 Editorial Redesign
   True white + deep charcoal | Modak display + DM Sans body | Gallery pacing */

@import url('https://fonts.googleapis.com/css2?family=Modak&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300;1,9..40,400&family=JetBrains+Mono:wght@300;400;500&display=swap');

:root {
  /* Palette — editorial gallery, clean white space */
  --ivory: #FAFAFA;
  --ivory-deep: #F5F5F5;
  --ivory-warm: #FFFFFF;
  --charcoal: #1a1a1a;
  --charcoal-mid: #2a2a2a;
  --charcoal-soft: #3a3a38;
  --stone: #8A8A8A;
  --stone-light: #B0B0B0;
  --stone-dark: #5A5A5A;

  /* Teal — matched to logo */
  --teal: #62B2BA;
  --teal-dark: #4A9AA2;
  --teal-subtle: rgba(98, 178, 186, 0.08);

  /* Blush — warm champagne editorial accent */
  --blush: #C4A882;
  --blush-subtle: rgba(196, 168, 130, 0.15);

  /* Functional */
  --rule: rgba(26, 26, 26, 0.06);
  --rule-light: rgba(255, 255, 255, 0.08);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

/* -- Focus (WCAG 2.4.7) -- */
*:focus-visible {
  outline: 2px solid var(--blush);
  outline-offset: 3px;
}

/* -- Skip link (WCAG 2.4.1) -- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--charcoal);
  color: var(--ivory);
  padding: 8px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--charcoal);
  background: var(--ivory);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TYPOGRAPHY — Editorial hierarchy
   ============================================ */
.font-display { font-family: 'Modak', cursive; }
.font-body { font-family: 'DM Sans', sans-serif; font-size: 1.0625rem; line-height: 1.75; }
.font-mono { font-family: 'JetBrains Mono', monospace; font-size: 8px; font-weight: 300; letter-spacing: 0.08em; }

/* ============================================
   SECTIONS
   ============================================ */
.section-ivory {
  background: var(--ivory);
  color: var(--charcoal);
  border-bottom: 1px solid var(--rule);
}
.section-warm {
  background: var(--ivory-deep);
  color: var(--charcoal);
  border-bottom: 1px solid var(--rule);
}
.section-dark {
  background: var(--charcoal);
  color: var(--ivory);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Grain — removed for clean gallery aesthetic */
.grain::before { display: none; }
.grain { position: relative; }
.grain > * { position: relative; z-index: 2; }

/* ============================================
   REVEAL ANIMATIONS — Slow, editorial pacing
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease-smooth),
              transform 0.9s var(--ease-out);
}
.reveal.vis {
  opacity: 1;
  transform: translateY(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.8s var(--ease-smooth),
              transform 0.8s var(--ease-out);
}
.reveal-scale.vis {
  opacity: 1;
  transform: scale(1);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.9s var(--ease-smooth),
              transform 0.9s var(--ease-out);
}
.reveal-left.vis {
  opacity: 1;
  transform: translateX(0);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes lineReveal {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================
   NAV — Minimal, disappears into the page
   ============================================ */
.navlink {
  position: relative;
  color: inherit;
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.3s;
  font-size: 13px;
  letter-spacing: 0.03em;
}
.navlink:hover { opacity: 1; }
.navlink::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--blush);
  transition: width 0.4s var(--ease-out);
}
.navlink:hover::after { width: 100%; }

/* Mobile menu */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out), opacity 0.3s;
  opacity: 0;
}
.mobile-menu.open {
  max-height: 500px;
  opacity: 1;
}
.mobile-menu a {
  display: block;
  padding: 18px 0;
  font-family: 'Instrument Serif', serif;
  font-size: 24px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 0.2s;
}
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu a:hover { color: var(--blush); }

/* Hamburger */
.hamburger-line {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.2s ease;
}
.hamburger-open .hamburger-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger-open .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger-open .hamburger-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============================================
   BUTTONS — Quiet, editorial
   ============================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--teal);
  color: #FFFFFF;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s var(--ease-out);
}
.btn-primary:hover {
  background: var(--blush);
  color: var(--charcoal);
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: inherit;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  border: 1px solid var(--charcoal);
  cursor: pointer;
  text-decoration: none;
  opacity: 0.5;
  transition: all 0.3s var(--ease-out);
}
.btn-outline:hover {
  opacity: 1;
  border-color: var(--blush);
  color: var(--blush);
}

/* Dark section button variants */
.section-dark .btn-primary {
  background: var(--ivory);
  color: var(--charcoal);
}
.section-dark .btn-primary:hover {
  background: var(--blush);
  color: var(--charcoal);
}
.section-dark .btn-outline {
  border-color: var(--ivory);
  color: var(--ivory);
  opacity: 0.4;
}
.section-dark .btn-outline:hover {
  opacity: 1;
  border-color: var(--blush);
  color: var(--blush);
}

/* ============================================
   DECORATIVE
   ============================================ */
.rule { height: 1px; background: var(--rule); }
.rule-accent {
  height: 1px;
  background: var(--blush);
  transform-origin: left;
  width: 48px;
}

.line-reveal {
  height: 1px;
  background: var(--charcoal);
  transform-origin: left;
  transform: scaleX(0);
}
.line-reveal.vis { animation: lineReveal 1s var(--ease-out) forwards; }

/* ============================================
   SERVICES LIST — Editorial, not boxy
   ============================================ */
.svc-row {
  border-bottom: 1px solid var(--rule);
  transition: padding-left 0.4s var(--ease-out);
  cursor: pointer;
}
.svc-row:hover { padding-left: 12px; }
.svc-row:hover .svc-title { color: var(--blush); }
.svc-row:hover .svc-arrow { transform: translateX(8px); opacity: 1; }
.svc-arrow {
  opacity: 0.2;
  transition: all 0.4s var(--ease-out);
}
.svc-title { transition: color 0.3s; }

/* ============================================
   FORM INPUTS — Minimal underline style
   ============================================ */
.input-field {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 16px 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: inherit;
  outline: none;
  transition: border-color 0.4s;
}
.input-field:focus { border-bottom-color: var(--blush); }
.input-field::placeholder { color: var(--stone); }
.input-field:focus-visible { outline: none; }

select.input-field {
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238A8A8A' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

.section-dark .input-field { border-bottom-color: var(--rule-light); }
.section-dark .input-field:focus { border-bottom-color: var(--blush); }
.section-dark .input-field::placeholder { color: var(--stone-light); }

/* ============================================
   FAQ — Clean accordion
   ============================================ */
.faq-row {
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  transition: background 0.2s;
}
.faq-row:hover { background: var(--blush-subtle); }

/* ============================================
   PORTFOLIO — Gallery with breathing room
   ============================================ */
.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out), filter 0.5s;
}
.gallery-img:hover {
  transform: scale(1.03);
}

/* ============================================
   PRICING — Understated cards
   ============================================ */
.pricing-card {
  border: 1px solid var(--rule);
  padding: 40px;
  transition: border-color 0.4s, transform 0.4s;
}
.pricing-card:hover {
  border-color: var(--charcoal);
  transform: translateY(-2px);
}
.pricing-card.featured {
  border-color: var(--charcoal);
  position: relative;
}
.pricing-card.featured::before {
  content: 'RECOMMENDED';
  position: absolute;
  top: -10px;
  left: 32px;
  background: var(--charcoal);
  color: var(--ivory);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 500;
  padding: 4px 12px;
  letter-spacing: 0.1em;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0;
}
.feature-list li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--stone);
  margin-top: 8px;
  flex-shrink: 0;
}

/* ============================================
   QUOTE
   ============================================ */
.quote-card {
  border-left: 2px solid var(--charcoal);
  transition: border-color 0.3s;
}
.quote-card:hover { border-left-color: var(--blush); }

/* ============================================
   MARQUEE
   ============================================ */
.marquee-track { animation: marquee 40s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }

/* ============================================
   IMAGE HOVER — Magazine crop reveal
   ============================================ */
.img-wrap {
  overflow: hidden;
  position: relative;
}
.img-wrap img {
  transition: transform 0.8s var(--ease-out);
}
.img-wrap:hover img {
  transform: scale(1.04);
}

/* ============================================
   RESPONSIVE / ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-scale, .reveal-left {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .marquee-track { animation: none; }
  .mobile-menu { transition: none; }
  .line-reveal { transform: scaleX(1); animation: none; }
  .img-wrap img { transition: none; }
  .gallery-img { transition: none; }
}

/* Selection color */
::selection {
  background: rgba(196, 168, 130, 0.3);
  color: var(--charcoal);
}

/* ============================================
   MOBILE OPTIMIZATION — Responsive fixes
   ============================================ */

/* Ensure images never overflow their containers */
img {
  max-width: 100%;
  height: auto;
}

/* Touch targets — 44px minimum per WCAG 2.5.5 */
.btn-primary,
.btn-outline {
  min-height: 44px;
}

/* Buttons go full-width on small screens */
@media (max-width: 479px) {
  .btn-primary,
  .btn-outline {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* Hamburger touch target bump */
button[aria-label="Menu"] {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Review dot touch targets */
button[aria-label^="Review"] {
  min-width: 28px;
  min-height: 28px;
  padding: 8px;
  box-sizing: content-box;
}

/* Mobile type — Modak display font needs restraint on small screens */
@media (max-width: 639px) {
  /* Hero headline already uses clamp(3rem, 8vw, 7rem) via Tailwind — no override needed */

  /* Prevent horizontal overflow from fixed-width elements */
  .max-w-\[1400px\] {
    max-width: 100%;
  }

  /* Mobile menu links need adequate tap targets */
  .mobile-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Pricing card padding reduction on small screens */
  .pricing-card {
    padding: 24px 16px;
  }

  /* Service description text visible on mobile */
  .svc-row .hidden {
    display: block;
  }
}

/* Prevent any section from causing horizontal scroll */
section {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Contact form grid — stack on small screens */
@media (max-width: 639px) {
  /* The grid grid-cols-2 in the contact form is inline Tailwind; add a fallback override */
  .input-field {
    font-size: 16px; /* Prevent iOS zoom on input focus */
  }
}

/* Input font-size 16px minimum to prevent iOS auto-zoom */
.input-field {
  font-size: max(16px, 0.9375rem);
}

/* Testimonial blockquote — prevent overflow on very small screens */
@media (max-width: 479px) {
  blockquote {
    word-break: break-word;
    hyphens: auto;
  }
}

/* Marquee — reduce size on mobile */
@media (max-width: 639px) {
  .marquee-track span {
    font-size: clamp(1.5rem, 7vw, 2.5rem);
  }
}

/* ============================================
   FONT-MONO utility — scale up on mobile
   The 8px base is only used as a class fallback;
   actual sizes are set via Tailwind inline. This
   ensures .font-mono class usage is readable.
   ============================================ */
@media (max-width: 639px) {
  .font-mono {
    font-size: 11px;
  }
}
