/*
Theme Name: Threadify3
Theme URI: https://threadifyapparel.com
Author: Threadify
Description: Custom theme for Threadify – Custom Embroidery & Digitizing. Includes file upload contact form.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: threadify
*/

/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d0d0d;
  --bg2:       #141414;
  --bg3:       #1a1a1a;
  --border:    rgba(255,255,255,0.08);
  --text:      #e8e8e8;
  --muted:     rgba(255,255,255,0.45);
  --accent:    #ffffff;
  --accent2:   #c8a96e;
  --radius:    8px;
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
  --max:       1100px;
  --nav-h:     64px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─── Typography ──────────────────────────────────────── */
h1,h2,h3,h4 { font-family: var(--font-head); line-height: 1.2; }

/* ─── Layout helpers ──────────────────────────────────── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-label {
  font-size: 0.72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-weight: 600;
}
.section-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin-bottom: 16px;
}
.section-sub {
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 56px;
}

/* ─── NAV ─────────────────────────────────────────────── */
#site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(13,13,13,0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}
#site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-logo {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 0.85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links .nav-cta {
  background: var(--accent);
  color: #000;
  padding: 8px 20px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: .06em;
  color: #000 !important;
  transition: opacity .2s;
}
.nav-links .nav-cta:hover { opacity: .85; }

/* hamburger */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--accent); margin: 5px 0;
  transition: transform .25s, opacity .25s;
}

/* ─── HERO ────────────────────────────────────────────── */
#welcome {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 65% 50%, rgba(200,169,110,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(255,255,255,0.03) 0%, transparent 60%);
}
.hero-grid {
  position: absolute; inset: 0; opacity: .04;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-inner {
  position: relative;
  padding: 80px 0 60px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.75rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent2); margin-bottom: 28px;
  border: 1px solid rgba(200,169,110,0.25);
  padding: 6px 14px; border-radius: 40px;
}
.hero-eyebrow::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent2);
}
.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -.02em;
}
.hero-title em { font-style: italic; color: var(--accent2); }
.hero-desc {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 64px; }
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  transition: transform .15s, opacity .15s, box-shadow .15s;
  font-family: var(--font-body);
}
.btn:hover { transform: translateY(-1px); opacity: .92; }
.btn-primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 4px 20px rgba(255,255,255,0.12);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.3); }

.hero-badges {
  display: flex; gap: 28px; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--muted);
}
.hero-badges span { display: flex; align-items: center; gap: 6px; }
.hero-badges span::before {
  content: '✓'; color: var(--accent2);
  font-weight: 700; font-size: .7rem;
}

/* ─── SERVICES ────────────────────────────────────────── */
#services { background: var(--bg2); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.service-card {
  background: var(--bg2);
  padding: 32px 28px;
  transition: background .2s;
}
.service-card:hover { background: var(--bg3); }
.service-icon { font-size: 1.6rem; margin-bottom: 14px; }
.service-card h3 {
  font-size: 1.05rem;
  font-family: var(--font-head);
  margin-bottom: 10px;
}
.service-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }

/* How to order strip */
.order-steps {
  margin-top: 64px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
}
.order-steps h3 {
  font-size: 1.2rem;
  margin-bottom: 28px;
  font-family: var(--font-head);
}
.steps-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent2);
  color: #000;
  font-weight: 700;
  font-size: .8rem;
  display: grid; place-items: center;
}
.step-text { font-size: 0.86rem; color: var(--muted); line-height: 1.5; }
.step-text strong { color: var(--text); }

/* ─── PORTFOLIO ───────────────────────────────────────── */
#portfolio { background: var(--bg); }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.portfolio-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: border-color .2s;
}
.portfolio-item:hover { border-color: rgba(255,255,255,0.2); }
.pi-icon  { font-size: 2rem; }
.pi-title { font-size: 0.92rem; color: var(--muted); }


/* ── Slideshow ──────────────────────────────────────────
   All photos are 1080x1080 (1:1 square).
   The wrapper is max 600px wide, centered, square.
   Images are block-level with width:100% height:auto —
   they render at exactly their natural proportions.
   No object-fit, no absolute positioning on <img>.
   ─────────────────────────────────────────────────── */

.portfolio-slideshow {
  max-width: 600px;
  width: 100%;
  margin: 0 auto 48px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  position: relative;
  background: #0d0d0d;
}

/* Slide wrapper — exactly as wide as the container */
.ps-slide {
  display: none;           /* hidden by default */
  width: 100%;
  line-height: 0;          /* kills phantom space below inline images */
  position: relative;      /* caption anchors to this, not the outer container */
}
.ps-slide.ps-active {
  display: block;
}

/* The image — natural square, no distortion ever */
.ps-slide img {
  display: block;
  width: 100%;
  height: auto;            /* browser calculates height from natural ratio */
}

/* Caption bar over bottom of image */
.ps-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;  /* flush with bottom of image */
  padding: 32px 20px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: #fff;
  pointer-events: none;
}

/* Navigation dots bar */
.ps-dots-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  background: rgba(0,0,0,0.55);
}
.ps-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  padding: 0;
  transition: background .25s, transform .25s;
  flex-shrink: 0;
}
.ps-dot.ps-dot-active {
  background: var(--accent2);
  transform: scale(1.35);
}
.ps-dot:hover { background: rgba(255,255,255,0.65); }

/* Prev / Next arrows */
.ps-arrow {
  position: absolute;
  top: calc(50% - 26px);   /* visually centred on the image */
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 46px; height: 46px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  transition: background .2s;
}
.ps-arrow:hover { background: rgba(0,0,0,0.8); }
.ps-prev { left: 12px; }
.ps-next { right: 12px; }

.portfolio-note {
  padding: 20px 24px;
  background: var(--bg3);
  border-left: 3px solid var(--accent2);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.portfolio-note strong { color: var(--text); }

/* ─── TESTIMONIALS ────────────────────────────────────── */
#testimonials { background: var(--bg2); }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.testimonial {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.stars { color: var(--accent2); font-size: 1rem; margin-bottom: 16px; letter-spacing: 2px; }
.testimonial blockquote {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
  font-style: italic;
}
.testimonial cite {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  font-style: normal;
  letter-spacing: .04em;
}

/* ─── CONTACT ─────────────────────────────────────────── */
#contact { background: var(--bg); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: start;
}
.contact-info h3 {
  font-size: 1.4rem;
  margin-bottom: 24px;
}
.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}
.contact-detail .cd-icon {
  font-size: 1.1rem; margin-top: 2px; flex-shrink: 0;
}
.contact-detail .cd-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent2);
  margin-bottom: 4px;
  font-weight: 600;
}
.contact-detail .cd-val {
  font-size: 0.92rem;
  color: var(--muted);
}
.contact-detail .cd-val a:hover { color: var(--text); }

/* Form */
.contact-form-wrap {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
}
.contact-form-wrap h3 {
  font-size: 1.2rem;
  margin-bottom: 28px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 11px 14px;
  outline: none;
  transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: rgba(255,255,255,0.3); }
.form-group textarea { min-height: 120px; resize: vertical; }

/* ── Upload Field ── */
.upload-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
  background: rgba(255,255,255,0.03);
}
.upload-drop-zone:hover, .upload-drop-zone.dragover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.06);
}
.upload-drop-zone input[type="file"] {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.upload-icon { font-size: 1.6rem; display: block; margin-bottom: 6px; }
.upload-label-text { font-size: 0.84rem; color: var(--muted); }
.upload-label-text span { color: var(--text); font-weight: 600; text-decoration: underline; }
.upload-hint { font-size: 0.72rem; color: var(--muted); opacity: .6; display: block; margin-top: 4px; }
.upload-preview {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-top: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  font-size: 0.84rem;
}
.upload-preview.visible { display: flex; }
.upload-preview .file-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 82%; }
.remove-file {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 1rem;
  padding: 0; line-height: 1;
  transition: color .15s;
}
.remove-file:hover { color: var(--text); }
.upload-error { font-size: 0.78rem; color: #ff8080; display: none; margin-top: 6px; }
.upload-error.visible { display: block; }

.form-submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: .05em;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  margin-top: 6px;
}
.form-submit-btn:hover { opacity: .88; transform: translateY(-1px); }
.form-submit-btn:disabled { opacity: .5; transform: none; cursor: default; }
.form-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 14px;
}
.form-success {
  display: none;
  text-align: center;
  padding: 20px;
  color: #7dcea0;
  font-size: 0.92rem;
}
.form-success.visible { display: block; }

/* ─── FOOTER ──────────────────────────────────────────── */
#site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  font-size: 0.8rem;
  color: var(--muted);
}
#site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; flex-direction: column; gap: 0; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 24px; }
  .nav-toggle { display: block; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .order-steps { padding: 28px 20px; }
  .contact-form-wrap { padding: 24px 18px; }
}
