/* ============================================================
   APPLE JACKS PRINTING — Core Color & Type Tokens
   Custom apparel & graphics print shop
   ============================================================ */

/* ---------- Fonts ----------
   Bebas Neue + Montserrat are loaded from Google Fonts in index.html <head>
   (more reliable across hosts than self-hosted .ttf files). */

:root {
  /* ===== BRAND PALETTE ===== */
  --aj-cream:    #F8F7F4;
  --aj-ink:      #222222;
  --aj-navy:     #203040;
  --aj-cyan:     #11C7D8;
  --aj-magenta:  #E81A8B;

  /* ===== TINTS / SHADES ===== */
  --aj-cyan-dark:    #0EA6B5;
  --aj-cyan-soft:    #D5F5F8;
  --aj-magenta-dark: #C51475;
  --aj-magenta-soft: #FBD9ED;
  --aj-navy-soft:    #2C4258;
  --aj-paper-2:      #EFEDE7;
  --aj-paper-3:      #E4E1D8;

  /* ===== SEMANTIC TEXT ===== */
  --fg-1: var(--aj-ink);
  --fg-2: #4A4A4A;
  --fg-3: #7C7C7C;
  --fg-on-dark-1: var(--aj-cream);
  --fg-on-dark-2: #B7BFC8;
  --fg-on-dark-3: #7E8893;

  /* ===== SEMANTIC SURFACES ===== */
  --bg-1: var(--aj-cream);
  --bg-2: var(--aj-paper-2);
  --bg-dark: var(--aj-ink);
  --bg-dark-2: var(--aj-navy);

  /* ===== BORDERS ===== */
  --border-1: var(--aj-paper-3);
  --border-2: #D2CEC3;
  --border-dark: rgba(255,255,255,0.12);

  /* ===== STATUS ===== */
  --ok:    #1FA463;
  --warn:  #E8A317;
  --error: #D8392B;

  /* ===== TYPE FAMILIES ===== */
  --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-body: "Montserrat", -apple-system, "Segoe UI", sans-serif;

  /* ===== TYPE SCALE ===== */
  --display-1: 96px;  --display-1-lh: 0.92;
  --h1: 64px;         --h1-lh: 0.96;
  --h2: 44px;         --h2-lh: 1.0;
  --h3: 30px;         --h3-lh: 1.1;
  --h4: 22px;         --h4-lh: 1.2;
  --body-lg: 19px;    --body-lg-lh: 1.6;
  --body: 16px;       --body-lh: 1.65;
  --body-sm: 14px;    --body-sm-lh: 1.55;
  --caption: 12px;    --caption-lh: 1.4;
  --overline: 13px;

  /* ===== RADII ===== */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* ===== SPACING (8pt base) ===== */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  /* ===== SHADOWS ===== */
  --shadow-sm: 0 1px 2px rgba(34,34,34,0.06), 0 1px 3px rgba(34,34,34,0.08);
  --shadow-md: 0 4px 12px rgba(34,34,34,0.08), 0 2px 4px rgba(34,34,34,0.06);
  --shadow-lg: 0 12px 32px rgba(34,34,34,0.12), 0 4px 8px rgba(34,34,34,0.06);
  --shadow-cyan: 0 8px 24px rgba(17,199,216,0.32);
  --shadow-magenta: 0 8px 24px rgba(232,26,139,0.30);

  /* ===== MOTION ===== */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-std: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 140ms;
  --dur: 240ms;
  --dur-slow: 420ms;

  /* Scroll-reveal motion — slow + gentle so entrances feel calm.
     Decelerate curve eases in smoothly instead of lurching. */
  --reveal-dur: 820ms;
  --ease-reveal: cubic-bezier(0.0, 0.0, 0.2, 1);
}

/* ============================================================
   SEMANTIC TYPE CLASSES
   ============================================================ */
.aj-display-1, .aj-h1, .aj-h2, .aj-h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--fg-1);
}
.aj-display-1 { font-size: var(--display-1); line-height: var(--display-1-lh); }
.aj-h1 { font-size: var(--h1); line-height: var(--h1-lh); }
.aj-h2 { font-size: var(--h2); line-height: var(--h2-lh); }
.aj-h3 { font-size: var(--h3); line-height: var(--h3-lh); letter-spacing: 0.02em; }

.aj-h4 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--h4);
  line-height: var(--h4-lh);
  letter-spacing: -0.01em;
  color: var(--fg-1);
}
.aj-body-lg { font-family: var(--font-body); font-weight: 400; font-size: var(--body-lg); line-height: var(--body-lg-lh); color: var(--fg-2); }
.aj-body    { font-family: var(--font-body); font-weight: 400; font-size: var(--body); line-height: var(--body-lh); color: var(--fg-2); }
.aj-body-sm { font-family: var(--font-body); font-weight: 400; font-size: var(--body-sm); line-height: var(--body-sm-lh); color: var(--fg-2); }
.aj-caption { font-family: var(--font-body); font-weight: 500; font-size: var(--caption); line-height: var(--caption-lh); color: var(--fg-3); }

.aj-overline {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--overline);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--aj-magenta);
}

/* ============================================================
   KIT — base, buttons, photo placeholder
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--aj-cream);
  color: var(--fg-1);
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.disp { font-family: var(--font-display); text-transform: uppercase; line-height: 0.94; letter-spacing: 0.01em; font-weight: 400; }
.eyebrow { font-weight: 700; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--aj-magenta); }

/* buttons */
.btn { font-family: var(--font-body); font-weight: 700; font-size: 15px; border: none; cursor: pointer;
  border-radius: var(--r-pill); padding: 14px 26px; transition: all var(--dur) var(--ease-out); display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--aj-cyan); color: var(--aj-ink); }
.btn-primary:hover { background: var(--aj-cyan-dark); box-shadow: var(--shadow-cyan); transform: translateY(-1px); }
.btn-accent { background: var(--aj-magenta); color: #fff; }
.btn-accent:hover { background: var(--aj-magenta-dark); transform: translateY(-1px); }
.btn-ink { background: var(--aj-ink); color: var(--aj-cream); }
.btn-ink:hover { background: #000; }
.btn-outline { background: transparent; border: 1.5px solid var(--aj-ink); color: var(--aj-ink); }
.btn-outline:hover { background: var(--aj-ink); color: var(--aj-cream); }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }

.lucide { width: 20px; height: 20px; stroke-width: 1.75; }

/* photo placeholder */
.photo {
  background: var(--aj-paper-3);
  background-image: repeating-linear-gradient(45deg, transparent, transparent 14px, rgba(34,34,34,0.025) 14px, rgba(34,34,34,0.025) 28px);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-3); position: relative; overflow: hidden;
}
.photo .ph-ico { width: 34px; height: 34px; stroke-width: 1.5; opacity: 0.55; }
.photo.dark { background: var(--aj-navy); color: var(--fg-on-dark-3);
  background-image: repeating-linear-gradient(45deg, transparent, transparent 14px, rgba(255,255,255,0.03) 14px, rgba(255,255,255,0.03) 28px); }

section { scroll-margin-top: 80px; }

/* ============================================================
   PAGE-SPECIFIC — hovers, form inputs, toast
   ============================================================ */
.cat-card:hover .photo { transform: scale(1.08); }
.cat-card .photo { transition: transform var(--dur-slow) var(--ease-out); }
.cat-card:hover .cat-cta { gap: 9px; }
.cat-cta { transition: gap var(--dur) var(--ease-out); }
.prod-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: transparent; }
.footlink:hover { color: var(--aj-cyan) !important; }
.soc:hover { border-color: var(--aj-cyan) !important; background: var(--aj-cyan); color: var(--aj-ink) !important; transform: translateY(-2px); }
.map-card:hover .photo { transform: scale(1.04); }
.map-card .photo { transition: transform var(--dur-slow) var(--ease-out); }
.hero-photo .photo { transition: transform var(--dur-slow) var(--ease-out); }

/* form inputs */
.cinput {
  width: 100%; font-family: var(--font-body); font-size: 14.5px; padding: 12px 14px;
  border: 1.5px solid var(--border-2); border-radius: var(--r-sm); background: #fff;
  outline: none; color: var(--fg-1); transition: border-color var(--dur), box-shadow var(--dur);
}
.cinput::placeholder { color: var(--fg-3); }
.cinput:focus { border-color: var(--aj-cyan); box-shadow: 0 0 0 3px rgba(17,199,216,0.18); }

/* toast */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(160%);
  background: var(--aj-ink); color: var(--aj-cream); padding: 14px 22px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; z-index: 200;
  box-shadow: var(--shadow-lg); transition: transform var(--dur) var(--ease-out); }
.toast.show { transform: translateX(-50%) translateY(0); }

@media (max-width: 940px) {
  .tb-hide { display: none !important; }
}

/* ============================================================
   SCROLL REVEAL — entrance as elements enter the viewport.
   Uses the independent `translate`/`scale` properties (NOT
   `transform`) so hover lifts can use `transform` freely without
   conflict. Gated behind reduced-motion: those users never see
   the hidden state, so all content is visible immediately.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal],
  [data-reveal-children] > * {
    opacity: 0;
    translate: 0 24px;
    transition: opacity var(--reveal-dur) var(--ease-reveal),
                translate var(--reveal-dur) var(--ease-reveal),
                scale var(--reveal-dur) var(--ease-reveal);
  }

  /* Directional variants (set on the [data-reveal-children] group) */
  [data-reveal-children][data-reveal-from="left"]  > * { translate: -28px 0; }
  [data-reveal-children][data-reveal-from="right"] > * { translate: 28px 0; }
  [data-reveal-children][data-reveal-from="scale"] > * { translate: 0 0; scale: 0.94; }
  /* "split": odd children enter from the left, even from the right —
     ideal for two-column sections (about, contact). */
  [data-reveal-children][data-reveal-from="split"] > *:nth-child(odd)  { translate: -32px 0; }
  [data-reveal-children][data-reveal-from="split"] > *:nth-child(even) { translate: 32px 0; }

  [data-reveal].is-visible,
  [data-reveal-children].is-visible > *,
  /* Higher-specificity match so it overrides the directional hidden
     states (e.g. split's :nth-child rules) once revealed. */
  [data-reveal-children][data-reveal-from].is-visible > * {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
}

/* ============================================================
   CARD HOVER MICRO-INTERACTIONS
   Comprehensive transition covers reveal props (opacity/translate/
   scale) AND hover props (transform/box-shadow/border-color) so a
   single declaration serves both. Placed after the reveal block so
   it wins on source order for equal specificity.
   ============================================================ */
.cat-card,
#reviews [data-reveal-children] > div,
#services [data-reveal-children] > div {
  transition: opacity var(--reveal-dur) var(--ease-reveal),
              translate var(--reveal-dur) var(--ease-reveal),
              scale var(--reveal-dur) var(--ease-reveal),
              transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}
.cat-card { box-shadow: var(--shadow-sm); }
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-cyan); }
#reviews [data-reveal-children] > div:hover,
#services [data-reveal-children] > div:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

/* Nav underline: slide in from the left instead of snapping on */
.navlink { position: relative; }
.navlink::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--aj-cyan); transform: scaleX(0); transform-origin: left center;
  transition: transform var(--dur) var(--ease-out);
}
.navlink:hover::after { transform: scaleX(1); }

/* Social icons: fill with brand cyan + lift on hover */
.soc { transition: all var(--dur) var(--ease-out); }

/* ============================================================
   RESPONSIVE — inline styles carry the desktop layout; these
   queries override grid columns and type at tablet/phone widths.
   !important is needed because the targets are inline-styled.
   ============================================================ */

/* Allow images/grids to shrink rather than force horizontal scroll */
img { max-width: 100%; }

/* ---- Tablet / small laptop ---- */
@media (max-width: 900px) {
  .wrap { padding: 0 22px; }

  /* stack the section padding down a touch (skip the hero #top) */
  section:not(#top) { padding-top: 60px !important; padding-bottom: 60px !important; }

  /* grids → fewer columns */
  .cat-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .rev-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .svc-grid { grid-template-columns: 1fr !important; }
  .about-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .contact-grid { grid-template-columns: 1fr !important; }
  .foot-grid { grid-template-columns: 1fr 1fr !important; gap: 32px 40px !important; }

  /* trust strip → 2x2; swap the divider lines from left to top */
  .tstrip { grid-template-columns: repeat(2, 1fr) !important; }
  .tstrip > div { border-left: none !important; }
  .tstrip > div:nth-child(n + 3) { border-top: 1px solid var(--border-1); }

  /* type scale down */
  #top h1.disp { font-size: 64px !important; }
  h2.disp { font-size: 40px !important; }

  /* about photo a bit shorter once stacked, badge stays anchored */
  .about-grid .photo.dark { height: 360px !important; }
}

/* ---- Phone ---- */
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }

  /* everything to a single column */
  .cat-grid,
  .rev-grid,
  .foot-grid,
  .field-grid,
  .tstrip { grid-template-columns: 1fr !important; }

  /* single-column trust strip: divider above each item after the first */
  .tstrip > div:nth-child(n + 2) { border-top: 1px solid var(--border-1); }

  /* hero: tighter and smaller headline */
  .hero-photo { min-height: 520px !important; }
  #top h1.disp { font-size: 48px !important; }
  h2.disp { font-size: 32px !important; }

  /* hero subcopy + CTA buttons full width */
  .hero-photo .btn { width: 100%; justify-content: center; }

  /* owner stats: let them wrap and trim the gutters */
  .dave-stats { flex-wrap: wrap; gap: 18px 0 !important; }
  .dave-stats > div { padding-right: 18px !important; margin-right: 18px !important; }

  /* drop the address from the top bar so it doesn't overflow 38px */
  .tb-addr { display: none !important; }

  /* footer bottom row stacks */
  footer .wrap > div:last-child { flex-direction: column; align-items: flex-start; }
}

/* When the two-column "split" reveal sections (about, contact) stack on
   smaller screens, their sideways entrance offset would push past the
   viewport and cause a horizontal scrollbar. Swap it for a vertical rise.
   Scoped to :not(.is-visible) so it only touches the pre-reveal state and
   never overrides the reveal reset; gated on motion preference so
   reduced-motion users (who never get .is-visible) aren't left shifted. */
@media (prefers-reduced-motion: no-preference) and (max-width: 900px) {
  [data-reveal-children][data-reveal-from="split"]:not(.is-visible) > * {
    translate: 0 24px;
  }
}

/* ============================================================
   MOBILE HAMBURGER MENU — shown when the nav links (.tb-hide) hide
   ============================================================ */
.menu-toggle { display: none; }
.mobile-menu { display: none; }

@media (max-width: 940px) {
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; padding: 0; border: none; background: transparent;
    color: var(--fg-1); cursor: pointer;
  }
  .mobile-menu {
    background: var(--aj-cream);
    border-bottom: 1px solid var(--border-1);
    box-shadow: var(--shadow-md);
    padding: 6px 0 14px;
  }
  .mobile-menu.open { display: block; }
  .mobile-menu a {
    display: block; padding: 13px 24px;
    font-size: 15px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--fg-1); text-decoration: none;
    transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
  }
  .mobile-menu a:hover { background: var(--aj-paper-2); color: var(--aj-cyan-dark); }
}
