/*
Theme Name: GetCrazy3D
Theme URI: https://getcrazy3d.com
Author: GetCrazy3D
Description: Block theme for GetCrazy3D, built on the approved brand identity (logo, cyan, magenta and navy). Includes an "Our work" gallery fed from the Media Library and a custom order request form.
Version: 1.5.2
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: getcrazy3d
*/

/* The page background matches the logo's own background (#F6F6F6) so the
   approved JPG/WebP logo sits on the page without a visible box. */

:where(a, button, input, select, textarea):focus-visible { outline: 3px solid var(--wp--preset--color--magenta); outline-offset: 3px; border-radius: 4px; }

/* ---------- header / footer ---------- */
.gc-bar { padding-top: 12px; padding-bottom: 12px; }
.gc-header-logo { margin: 0; }
.gc-header-logo img { display: block; width: 96px !important; height: auto; }
@media (max-width: 600px) { .gc-header-logo img { width: 64px !important; } }
.gc-bar .wp-block-navigation { font-weight: 700; }
.gc-bar .wp-block-navigation a { text-decoration: none; }
.gc-bar .wp-block-navigation a:hover { color: var(--wp--preset--color--magenta); }
.gc-footer { margin-top: 40px; padding-bottom: 56px; color: var(--wp--preset--color--ink-soft); font-size: .92rem; }
.gc-footer > .alignwide { border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--ink) 18%, transparent); padding-top: 32px; }
.gc-footer p { margin: 4px 0; }
.gc-main { padding-bottom: 40px; }

/* ---------- hero ---------- */
.gc-hero { padding: 8px 0 64px; }
.gc-hero-cols { gap: 40px; }
.gc-hero-logo { display: block; width: 100%; max-width: 460px; height: auto; margin: 0 auto; }
@media (max-width: 781px) { .gc-hero-logo { max-width: 320px; } }
.gc-lede.gc-lede {
  font-family: var(--wp--preset--font-family--body); font-weight: 800;
  font-size: clamp(1.5rem, 3.2vw, 2.2rem); line-height: 1.2; margin: 0; max-width: 24ch;
}
.gc-sub { max-width: 52ch; color: var(--wp--preset--color--ink-soft); margin-top: 16px !important; }
.gc-actions { margin-top: 28px !important; gap: 12px; }
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--wp--preset--color--ink); border: 2px solid var(--wp--preset--color--ink); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--paper); color: var(--wp--preset--color--magenta); border-color: var(--wp--preset--color--magenta); }

/* ---------- sections ---------- */
.gc-section { padding: 64px 0; }
.gc-section h2 { margin: 0 0 12px; }
.gc-intro { max-width: 60ch; color: var(--wp--preset--color--ink-soft); margin: 0 0 36px !important; }

/* price-tag list */
.gc-tags { border-top: 3px solid var(--wp--preset--color--ink); }
.gc-tags > .gc-tag { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; padding: 20px 0; margin: 0 !important; border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--ink) 22%, transparent); }
.gc-tag > * { margin: 0 !important; }
.gc-tag h3 { grid-column: 1; }
.gc-tag p:not(.gc-price) { grid-column: 1; color: var(--wp--preset--color--ink-soft); }
.gc-tag .gc-price { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-family: var(--wp--preset--font-family--display); font-size: 1.35rem; white-space: nowrap; color: var(--wp--preset--color--magenta); }
.gc-note { margin-top: 18px !important; font-size: .95rem; color: var(--wp--preset--color--ink-soft); }

/* finishes: the holographic swatch shows the print finish, not the brand */
.gc-finishes { gap: 40px; }
.gc-swatch { aspect-ratio: 16 / 10; border-radius: 22px; position: relative; overflow: hidden; }
.gc-holo { background: conic-gradient(from 200deg at 30% 60%, #38B9C4, #6FA8FF, #8E5BE8, #C52CAA, #FFB703, #38B9C4); }
.gc-holo::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,0) 0 10px, rgba(255,255,255,.35) 12px, rgba(255,255,255,0) 16px); mix-blend-mode: overlay; }
.gc-carbon {
  background:
    radial-gradient(#080812 15%, transparent 16%) 0 0,
    radial-gradient(#080812 15%, transparent 16%) 8px 8px,
    radial-gradient(rgba(255,255,255,.09) 15%, transparent 20%) 0 1px,
    radial-gradient(rgba(255,255,255,.09) 15%, transparent 20%) 8px 9px;
  background-color: #262a36; background-size: 16px 16px;
}
.gc-carbon::after { content: ""; position: absolute; inset: 0; background: linear-gradient(130deg, rgba(255,255,255,.18), transparent 45%); }
.gc-finishes h3 { margin: 16px 0 4px; }
.gc-finishes p { margin: 0; color: var(--wp--preset--color--ink-soft); }

/* steps: a real sequence */
.gc-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 24px; }
@media (min-width: 720px) { .gc-steps { grid-template-columns: repeat(4, 1fr); } }
.gc-steps li { counter-increment: step; padding-top: 14px; border-top: 4px solid var(--wp--preset--color--ink); color: var(--wp--preset--color--ink-soft); font-size: .98rem; }
.gc-steps li:nth-child(odd)::before { color: var(--wp--preset--color--cyan); }
.gc-steps li::before { content: counter(step); font-family: var(--wp--preset--font-family--display); font-size: 2rem; display: block; line-height: 1; margin-bottom: 8px; color: var(--wp--preset--color--magenta); }
.gc-steps strong { display: inline-block; font-size: 1.1rem; margin-bottom: 4px; color: var(--wp--preset--color--ink); }

/* story: split cyan/magenta edge, echoing the robot */
.gc-story { background: var(--wp--preset--gradient--brand) top / 100% 8px no-repeat, var(--wp--preset--color--paper); border-radius: 28px; padding: 48px 24px 40px; gap: 48px; }
@media (min-width: 782px) { .gc-story { padding: 56px; } }
.gc-story p { margin: 0 0 14px; }

/* updates log */
.gc-log { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--wp--preset--color--ink); }
.gc-log li { position: relative; padding: 0 0 22px 24px; color: var(--wp--preset--color--ink-soft); }
.gc-log li strong { color: var(--wp--preset--color--ink); }
.gc-log li::before { content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--wp--preset--gradient--brand); border: 2px solid var(--wp--preset--color--ink); }

/* contact */
.gc-big { font-family: var(--wp--preset--font-family--display); font-size: clamp(1.4rem, 5vw, 2.4rem); word-break: break-word; }
.gc-big a { color: var(--wp--preset--color--ink); text-decoration: none; background-image: var(--wp--preset--gradient--brand); background-size: 100% 6px; background-repeat: no-repeat; background-position: 0 100%; padding-bottom: 6px; }
.gc-big a:hover { color: var(--wp--preset--color--magenta); }

/* ---------- Our work (showcase) ---------- */
.gc-work-head { padding: 24px 0 32px; }
.gc-work-head h1 { font-size: var(--wp--preset--font-size--x-large); margin: 0 0 12px; }
.gc-notice { background: var(--wp--preset--color--paper); border-left: 6px solid var(--wp--preset--color--cyan); border-radius: 0 16px 16px 0; padding: 20px 24px; max-width: 72ch; }
.gc-notice .gc-notice-title { font-family: var(--wp--preset--font-family--body); font-weight: 800; font-size: 1.1rem; margin: 0 0 6px; }
.gc-notice p { margin: 0; color: var(--wp--preset--color--ink-soft); }
.gc-gallery-area .wp-block-gallery { gap: 16px; }
/* captions sit under each photo so the designer credit is always readable */
.gc-gallery-area .wp-block-gallery.has-nested-images figure.wp-block-image { flex-direction: column; align-items: stretch; }
.gc-gallery-area .wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 16px; aspect-ratio: 1; object-fit: cover; height: auto; flex: none; }
.gc-gallery-area .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
  position: static; background: none; color: var(--wp--preset--color--ink-soft); text-shadow: none;
  font-size: .88rem; text-align: left; padding: 8px 2px 0; max-height: none; overflow: visible; flex: none; }
.gc-gallery-area .wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before { display: none; }
.gc-cta { border-top: 3px solid var(--wp--preset--color--ink); margin-top: 48px; }

/* ---------- WooCommerce touches ---------- */
.woocommerce .price, .wc-block-components-product-price { font-family: var(--wp--preset--font-family--display); font-weight: 400; color: var(--wp--preset--color--magenta); }
.wc-block-grid__product, .wp-block-woocommerce-product-template li { background: var(--wp--preset--color--paper); border-radius: 18px; padding: 16px; }
.woocommerce span.onsale, .wc-block-components-product-sale-badge { background: var(--wp--preset--color--magenta); color: #fff; border: 0; border-radius: 999px; }

/* ---------- Our work grid ---------- */
.gc-work-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gc-work-item figure { margin: 0; }
.gc-work-item img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 16px; background: var(--wp--preset--color--paper); }
.gc-work-item a:hover img { outline: 3px solid var(--wp--preset--color--cyan); outline-offset: 2px; }
.gc-work-item figcaption { padding: 10px 2px 0; display: grid; gap: 2px; }
.gc-work-item figcaption span { font-size: .88rem; color: var(--wp--preset--color--ink-soft); }
.gc-work-empty { color: var(--wp--preset--color--ink-soft); }

/* ---------- Shop: custom request form ---------- */
.gc-request { border-top: 3px solid var(--wp--preset--color--ink); margin-top: 48px; }
.gc-form { background: var(--wp--preset--color--paper); border-radius: 22px; padding: 28px 24px; max-width: 720px; display: grid; gap: 4px; }
@media (min-width: 782px) { .gc-form { padding: 36px 40px; } }
.gc-field { margin: 0 0 14px; display: grid; gap: 6px; }
.gc-field label { font-weight: 800; }
.gc-optional, .gc-hint { font-weight: 400; font-size: .88rem; color: var(--wp--preset--color--ink-soft); }
.gc-field input[type="text"], .gc-field input[type="email"], .gc-field textarea {
  font: inherit; color: var(--wp--preset--color--ink); background: var(--wp--preset--color--plate);
  border: 2px solid color-mix(in srgb, var(--wp--preset--color--ink) 25%, transparent); border-radius: 12px; padding: 12px 14px; width: 100%; box-sizing: border-box; }
.gc-field input:focus, .gc-field textarea:focus { border-color: var(--wp--preset--color--cyan); outline: none; }
.gc-field input[type="file"] { font: inherit; }
.gc-field-row { display: grid; gap: 0 16px; }
@media (min-width: 600px) { .gc-field-row { grid-template-columns: 1fr 1fr; } }
.gc-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gc-form .wp-block-button__link { cursor: pointer; }
.gc-form-msg { max-width: 720px; padding: 14px 18px; border-radius: 12px; font-weight: 700; }
.gc-form-msg--ok { background: color-mix(in srgb, var(--wp--preset--color--cyan) 22%, white); }
.gc-form-msg--err { background: color-mix(in srgb, var(--wp--preset--color--magenta) 15%, white); }
.gc-form .gc-field > * { margin: 0; }
.gc-form .gc-field { gap: 8px; }

/* ---------- Our work: category tabs ---------- */
.gc-work { position: relative; }
.gc-cats ul { list-style: none; margin: 0; padding: 0; }
.gc-cats:not(.gc-cats--rail) { margin: 0 0 20px; background: var(--wp--preset--color--plate); z-index: 20; }
.gc-cats:not(.gc-cats--rail) ul { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0; }
.gc-cat {
  font: inherit; font-weight: 800; font-size: .95rem; cursor: pointer;
  border: 2px solid var(--wp--preset--color--ink); background: var(--wp--preset--color--paper); color: var(--wp--preset--color--ink);
  border-radius: 999px; padding: 7px 14px; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap;
}
.gc-cat span { font-weight: 700; font-size: .8rem; color: var(--wp--preset--color--ink-soft); }
.gc-cat:hover { border-color: var(--wp--preset--color--magenta); color: var(--wp--preset--color--magenta); }
.gc-cat.is-active { background: var(--wp--preset--color--ink); color: #fff; }
.gc-cat.is-active span { color: var(--wp--preset--color--cyan); }
.gc-work-status { margin: 0 0 16px; font-size: .9rem; color: var(--wp--preset--color--ink-soft); }
.gc-work-item[hidden] { display: none; }

/* Below 1400px there's no room at the side, so the tab bar sticks to the top and scrolls sideways on phones. */
@media (max-width: 1399px) {
  .gc-cats:not(.gc-cats--rail) { position: sticky; top: var(--gc-header-h, 0px); box-shadow: 0 8px 12px -10px rgba(30,33,64,.25); }
}
@media (max-width: 781px) {
  .gc-cats:not(.gc-cats--rail) ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 10px 16px; }
  .gc-cats:not(.gc-cats--rail) ul::-webkit-scrollbar { display: none; }
}

/* Wide screens: once the top bar scrolls away, the same tabs dock to the left side. */
.gc-cats--rail { display: none; }
@media (min-width: 1400px) {
  .gc-cats--rail {
    display: block; box-sizing: border-box; position: fixed; top: calc(var(--gc-header-h, 110px) + 20px); left: max(12px, calc((100vw - 1040px) / 2 - 180px)); width: 160px;
    background: var(--wp--preset--color--paper); border-radius: 18px; padding: 16px 12px; box-shadow: 0 10px 30px -14px rgba(30,33,64,.35);
    opacity: 0; transform: translateX(-12px); visibility: hidden; transition: opacity .2s ease, transform .2s ease, visibility .2s;
    max-height: calc(100vh - 160px); overflow-y: auto; z-index: 30;
  }
  .gc-work.is-docked .gc-cats--rail { opacity: 1; transform: none; visibility: visible; }
  .gc-cats--rail ul { display: grid; gap: 6px; }
  .gc-cats--rail .gc-cat { width: 100%; justify-content: space-between; border-width: 0; background: transparent; padding: 7px 10px; }
  .gc-cats--rail .gc-cat.is-active { background: var(--wp--preset--color--ink); }
  .gc-cats-title { margin: 0 0 8px 10px; font-weight: 800; font-size: .8rem; color: var(--wp--preset--color--ink-soft); }
}
@media (prefers-reduced-motion: reduce) { .gc-cats--rail { transition: none; } }

/* what-we-make photo */
.gc-make-photo { margin: 0 0 32px; }
.gc-make-photo img { display: block; width: 100%; height: auto; border-radius: 22px; }

/* Contact Form 7 version of the request form */
.gc-form--cf7 .wpcf7-form-control-wrap { display: block; }
.gc-form--cf7 input[type="text"], .gc-form--cf7 input[type="email"], .gc-form--cf7 textarea {
  font: inherit; color: var(--wp--preset--color--ink); background: var(--wp--preset--color--plate);
  border: 2px solid color-mix(in srgb, var(--wp--preset--color--ink) 25%, transparent); border-radius: 12px; padding: 12px 14px; width: 100%; box-sizing: border-box; }
.gc-form--cf7 input:focus, .gc-form--cf7 textarea:focus { border-color: var(--wp--preset--color--cyan); outline: none; }
.gc-form--cf7 .wpcf7-submit {
  font: inherit; font-weight: 800; cursor: pointer; border: 2px solid var(--wp--preset--color--ink); border-radius: 999px;
  background: var(--wp--preset--color--ink); color: #fff; padding: 12px 22px; margin-top: 6px; }
.gc-form--cf7 .wpcf7-submit:hover { background: var(--wp--preset--color--magenta); border-color: var(--wp--preset--color--magenta); }
.gc-form--cf7 .wpcf7-not-valid-tip { font-size: .88rem; color: var(--wp--preset--color--magenta); margin-top: 4px; }
.gc-form--cf7 .wpcf7-response-output { margin: 12px 0 0 !important; border-radius: 12px; padding: 12px 16px !important; font-weight: 700; }
.gc-form--cf7 .wpcf7-spinner { vertical-align: middle; }
.gc-form--cf7 .wpcf7-submit { justify-self: start; width: auto; }

/* ---------- Timeline ---------- */
.gc-tl { position: relative; }
.gc-tl-track { list-style: none; margin: 0; padding: 0 0 16px; display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x proximity; }
.gc-tl-group { flex: 0 0 auto; min-width: 240px; position: relative; padding: 0 28px 0 0; scroll-snap-align: start; }
.gc-tl-group::before { content: ""; position: absolute; left: 0; right: 0; top: 46px; height: 3px; background: var(--wp--preset--color--ink); }
.gc-tl-group:last-child::before { right: 28px; }
.gc-tl-label { margin: 0 0 30px; font-weight: 800; font-size: .95rem; color: var(--wp--preset--color--ink-soft); }
.gc-tl-group.is-current .gc-tl-label { color: var(--wp--preset--color--magenta); }
.gc-tl-items { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.gc-tl-item { position: relative; width: 190px; flex: 0 0 auto; padding-top: 12px; }
.gc-tl-item::before { content: ""; position: absolute; left: 0; top: -14px; width: 16px; height: 16px; border-radius: 50%; background: var(--wp--preset--gradient--brand); border: 2px solid var(--wp--preset--color--ink); box-sizing: border-box; }
.gc-tl-item time { display: block; font-weight: 800; color: var(--wp--preset--color--ink); }
.gc-tl-item p { margin: 4px 0 0; color: var(--wp--preset--color--ink-soft); font-size: .95rem; line-height: 1.45; }
.gc-tl-group--future::before { background: repeating-linear-gradient(90deg, var(--wp--preset--color--ink) 0 8px, transparent 8px 14px); }
.gc-tl-group--future .gc-tl-item::before { background: var(--wp--preset--color--paper); }
.gc-tl-group--future .gc-tl-label { color: var(--wp--preset--color--cyan); }
.gc-tl-group--year { min-width: 0; display: flex; align-items: flex-start; gap: 20px; }
.gc-tl-year { font: inherit; cursor: pointer; margin-top: 26px; position: relative; z-index: 1; display: grid; text-align: left;
  background: var(--wp--preset--color--paper); border: 2px solid var(--wp--preset--color--ink); border-radius: 14px; padding: 8px 14px; color: var(--wp--preset--color--ink); }
.gc-tl-year:hover { border-color: var(--wp--preset--color--magenta); }
.gc-tl-year-label { font-family: var(--wp--preset--font-family--display); font-size: 1.2rem; }
.gc-tl-year-count { font-size: .8rem; color: var(--wp--preset--color--ink-soft); }
.gc-tl-year::after { content: "+"; position: absolute; right: 10px; top: 6px; font-weight: 800; }
.gc-tl-group--year.is-open .gc-tl-year::after { content: "–"; }
.gc-tl-group--year .gc-tl-items { padding-top: 54px; }
.gc-tl-group--year .gc-tl-items[hidden] { display: none; }
@media (max-width: 600px) { .gc-tl-item { width: 160px; } .gc-tl-group { min-width: 200px; } }

/* ---------- Finishes photos ---------- */
.gc-finish-grid { display: grid; gap: 32px; }
@media (min-width: 782px) { .gc-finish-grid { grid-template-columns: 1fr 1fr; } }
.gc-finish { margin: 0; }
.gc-finish img { display: block; width: 100%; height: auto; border-radius: 22px; aspect-ratio: 1200 / 670; object-fit: cover; }
.gc-finish figcaption { padding-top: 14px; display: grid; gap: 4px; }
.gc-finish figcaption strong { font-size: var(--wp--preset--font-size--large); font-weight: 800; }
.gc-finish figcaption span { color: var(--wp--preset--color--ink-soft); }

/* ---------- Family photo (small, under "Why we started") ---------- */
.gc-crew { margin: 20px 0 0; max-width: 200px; }
.gc-crew img { display: block; width: 100%; height: auto; border-radius: 16px; transform: rotate(-2deg); box-shadow: 0 8px 20px -10px rgba(30,33,64,.4); border: 4px solid #fff; }
.gc-crew figcaption { font-size: .85rem; color: var(--wp--preset--color--ink-soft); margin-top: 10px; }

/* ---------- Sticky header on every page ---------- */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 100; background: var(--wp--preset--color--plate); transition: box-shadow .2s; }
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; } }
@media (max-width: 600px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; } }
body.gc-scrolled .wp-site-blocks > header.wp-block-template-part { box-shadow: 0 8px 18px -14px rgba(30,33,64,.45); }
.gc-header-logo img { transition: width .2s; }
body.gc-scrolled .gc-header-logo img { width: 60px !important; }
body.gc-scrolled .gc-bar { padding-top: 6px; padding-bottom: 6px; }
.gc-bar { transition: padding .2s; }
@media (max-width: 600px) { body.gc-scrolled .gc-header-logo img { width: 48px !important; } }
html { scroll-padding-top: calc(var(--gc-header-h, 110px) + 12px); }
