/* ============================================================
   DWAIN THOMAS PHOTOGRAPHY — Global Stylesheet
   dtp-global.css  |  v1.0
   
   Table of contents:
   1. Fonts
   2. CSS Variables (brand tokens)
   3. Reset & base
   4. Grain overlay
   5. Typography
   6. Navigation
   7. Buttons
   8. Section utilities
   9. Credentials strip
   10. Footer
   11. Animations
   12. Responsive
   ============================================================ */


/* ── 1. FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;1,400;1,500&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;1,8..60,300;1,8..60,400&display=swap');


/* ── 2. CSS VARIABLES ── */
:root {
  /* Brand palette */
  --bg:           #F7E8D3;   /* Cream — main background */
  --bg-mid:       #EDD9BC;   /* Tan — alternate section background */
  --bg-dark:      #E0C9A6;   /* Dark tan — hover states, card fills */
  --near-black:   #212121;   /* Near Black — dark sections, text */
  --brown:        #7B5B43;   /* Brown — muted text, dividers */
  --gold:         #B37520;   /* Deep Resin — primary accent */
  --gold-light:   #E6B365;   /* Gold — highlights, dark-bg accents */
  --cream:        #F7E8D3;   /* Cream — text on dark backgrounds */
  --text:         #2B1D12;   /* Primary text on light backgrounds */
  --text-mid:     #5C3D22;   /* Secondary text on light backgrounds */
  --rule:         rgba(123, 91, 67, 0.2);  /* Divider lines */
  --rule-dark:    rgba(247, 232, 211, 0.1); /* Divider lines on dark bg */

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;

  /* Spacing scale */
  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  48px;
  --space-xl:  72px;
  --space-2xl: 100px;

  /* Layout */
  --max-width:    1200px;
  --page-padding: 72px;
  --nav-height:   72px;
}


/* ── 3. RESET & BASE ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}


/* ── 4. GRAIN OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 9999;
}


/* ── 5. TYPOGRAPHY ── */

/* Display / headlines */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  color: var(--near-black);
}

h1 { font-size: clamp(42px, 6vw, 88px); }
h2 { font-size: clamp(30px, 3.5vw, 52px); }
h3 { font-size: clamp(20px, 2vw, 28px); }
h4 { font-size: 18px; }

em { font-style: italic; }

/* Italic gold accent used throughout headlines */
h1 em, h2 em, h3 em { color: var(--gold); }

/* Section eyebrow labels */
.label {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

/* Pull quote */
.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 26px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  color: var(--near-black);
  padding-left: var(--space-md);
  border-left: 2px solid var(--gold);
  margin-top: var(--space-lg);
}

/* ── TESTIMONIAL CARDS ── */
.testimonial-card {
  background: var(--bg);
  padding: 40px 32px;
}

.testimonial-card blockquote {
  font-family: var(--font-display);
  font-size: 17px;
  font-style: italic;
  line-height: 1.55;
  color: var(--near-black);
}

.testimonial-card cite {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  font-style: normal;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-dark);
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cite-name {
  font-size: 13px;
  font-weight: 400;
  color: var(--near-black);
  display: block;
}

.cite-role {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--brown);
}


/* ── ORNAMENT ── */
.ornament {
  display: block;
  font-size: 18px;
  color: var(--gold);
  margin-bottom: var(--space-md);
}

/* Horizontal rule */
hr.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0 var(--page-padding);
}


/* ── 6. NAVIGATION ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-padding);
  background: rgba(247, 232, 211, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.2s;
}

.site-nav.scrolled {
  box-shadow: 0 2px 24px rgba(43, 29, 18, 0.08);
}

.nav-logo {
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 44px;
  width: auto;
  display: block;
}

.nav-logo span {
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.nav-links a.nav-cta {
  color: var(--gold);
  border-bottom: 1px solid var(--gold-light);
  padding-bottom: 2px;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--near-black);
  transition: transform 0.2s, opacity 0.2s;
}


/* ── 7. BUTTONS ── */
.btn-primary {
  display: inline-block;
  padding: 14px 36px;
  background: var(--near-black);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-primary:hover {
  background: var(--gold);
  color: var(--near-black);
}

/* Gold variant — used on dark backgrounds */
.btn-primary.gold {
  background: var(--gold);
  color: var(--near-black);
}

.btn-primary.gold:hover {
  background: var(--cream);
}

.btn-ghost {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brown);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
}

.btn-ghost:hover {
  color: var(--gold);
  border-color: var(--gold);
}

/* Ghost on dark backgrounds */
.btn-ghost.light {
  color: var(--cream-dim, #C9A882);
  border-color: rgba(247, 232, 211, 0.3);
}

.btn-ghost.light:hover {
  color: var(--gold-light);
  border-color: var(--gold-light);
}

/* Inline text link — for links within body copy and between sections */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-light);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s, gap 0.2s;
}

.text-link::after {
  content: '→';
  font-size: 14px;
  transition: transform 0.2s;
}

.text-link:hover {
  color: var(--near-black);
  border-color: var(--near-black);
  gap: 10px;
}


/* ── 8. SECTION UTILITIES ── */

/* Standard section padding */
.section {
  padding: var(--space-2xl) var(--page-padding);
}

.section-sm {
  padding: var(--space-lg) var(--page-padding);
}

/* Background variants */
.bg-cream  { background: var(--bg); }
.bg-mid    { background: var(--bg-mid); }
.bg-dark   { background: var(--near-black); }

/* Text color overrides for dark backgrounds */
.bg-dark h1,
.bg-dark h2,
.bg-dark h3,
.bg-dark h4 {
  color: var(--cream);
}

.bg-dark h1 em,
.bg-dark h2 em,
.bg-dark h3 em {
  color: var(--gold-light);
}

.bg-dark .label {
  color: var(--gold-light);
}

.bg-dark p {
  color: rgba(247, 232, 211, 0.7);
}

.bg-dark .pull-quote {
  color: var(--cream);
  border-left-color: var(--gold-light);
}

/* Two-column grid */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

/* Three-column grid */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

/* Centered text block */
.text-center { text-align: center; }

.text-center h2 {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.text-center p {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  margin-top: var(--space-sm);
  color: var(--text-mid);
}

/* Top gold rule accent */
.rule-top {
  position: relative;
}

.rule-top::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
  opacity: 0.7;
}


/* ── 9. CREDENTIALS STRIP ── */
.credentials {
  background: var(--near-black);
  padding: 32px var(--page-padding);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.credential-item {
  text-align: center;
  flex: 1;
}

.credential-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 6px;
}

.credential-value {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--cream);
}

.credential-divider {
  width: 1px;
  height: 36px;
  background: rgba(247, 232, 211, 0.12);
  flex-shrink: 0;
}


/* ── 10. FOOTER ── */
.site-footer {
  background: var(--near-black);
  padding: 56px var(--page-padding) 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-lg);
  align-items: start;
  border-top: 3px solid var(--gold);
}

.footer-brand .logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--cream);
  margin-bottom: 8px;
}

.footer-brand .logo span {
  color: var(--gold-light);
}

.footer-brand .tagline {
  font-size: 12px;
  color: var(--brown);
  letter-spacing: 0.06em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-links a {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(247, 232, 211, 0.45);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--gold-light);
}

.footer-contact {
  text-align: right;
}

.footer-contact a {
  font-size: 14px;
  color: rgba(247, 232, 211, 0.55);
  display: block;
  margin-bottom: 6px;
  transition: color 0.2s;
}

.footer-contact a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  grid-column: 1 / -1;
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--rule-dark);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--brown);
}


/* ── 11. ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* Scroll-triggered reveal — add .reveal to any element,
   JS will add .visible when it enters the viewport */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fallback: if JS hasn't run yet show everything */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Local file fallback — no-js safety net */
html:not(.js-loaded) .reveal {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }


/* ── 12. RESPONSIVE ── */
@media (max-width: 1024px) {
  :root {
    --page-padding: 48px;
  }

  h1 { font-size: clamp(36px, 5vw, 64px); }
}

@media (max-width: 768px) {
  :root {
    --page-padding: 24px;
    --space-2xl:    72px;
    --space-xl:     48px;
  }

  /* Stack two-col grids */
  .two-col {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Stack three-col grids */
  .three-col {
    grid-template-columns: 1fr;
  }

  /* Nav — hide links, show toggle */
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(247, 232, 211, 0.98);
    flex-direction: column;
    align-items: center;
    padding: var(--space-lg) var(--space-md);
    gap: var(--space-md);
    border-bottom: 1px solid var(--rule);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 14px;
  }

  .nav-toggle {
    display: flex;
  }

  /* Credentials wrap */
  .credentials {
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
  }

  .credential-divider {
    display: none;
  }

  .credential-item {
    flex: 0 0 40%;
  }

  /* Footer stacks */
  .site-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-contact {
    text-align: center;
  }

  .footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}
