/* ==========================================================================
   Weblyne universal stylesheet.
   This file never changes between domains. All visual identity (colors,
   fonts, radius) is injected per-domain as CSS custom properties from
   data.json in the <head> of index.php.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 0.5em;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-2-ink, var(--text-muted));
  letter-spacing: 0.01em;
  margin-bottom: 14px;
  padding: 3px 0;
  position: relative;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { transform: translateY(-2px); background: var(--accent); color: var(--ink); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { transform: translateY(-2px); background: var(--ink); color: var(--paper); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 21px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.logo::before {
  content: "";
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 2px;
  display: inline-block;
}
.logo img { height: 32px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: var(--text); position: relative; padding: 4px 0; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.nav-toggle { display: none; background: none; border: none; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform 0.2s ease, opacity 0.2s ease; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 68px 0 0 0; background: var(--paper);
    flex-direction: column; align-items: flex-start; padding: 30px 24px; gap: 22px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: all 0.2s ease;
    border-top: 1px solid var(--border);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .header-actions .btn-primary { padding: 10px 18px; font-size: 14px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 100px 0 90px;
  overflow: hidden;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center -1px;
  -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
}
.hero-content { -webkit-mask-image: none; mask-image: none; position: relative; }
.hero-inner { max-width: 780px; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.hero .subheadline { font-size: 18px; color: var(--text-muted); max-width: 620px; margin: 18px 0 34px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-corner {
  position: absolute; width: 22px; height: 22px; border: 2px solid var(--ink); opacity: 0.55;
}
.hero-corner.tl { top: 28px; left: 24px; border-right: none; border-bottom: none; }
.hero-corner.tr { top: 28px; right: 24px; border-left: none; border-bottom: none; }
.hero-stats { display: flex; gap: 44px; flex-wrap: wrap; }
.hero-stat .value { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--ink); }
.hero-stat .label { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Logos strip ---------- */
.logos-strip { padding: 34px 0; border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); }
.logos-strip .eyebrow { display: block; text-align: center; margin-bottom: 20px; }
.logos-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 34px 48px; }
.logos-row span { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--text-muted); opacity: 0.75; }

/* ---------- Section base ---------- */
.section { padding: 88px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.section-head .subtitle { color: var(--text-muted); font-size: 16.5px; margin-top: 10px; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-copy p { color: var(--text-muted); font-size: 16.5px; margin-bottom: 22px; }
.about-points { display: flex; flex-direction: column; gap: 12px; }
.about-points li { display: flex; gap: 10px; font-size: 15px; color: var(--text); }
.about-points li::before { content: "—"; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.about-figure { aspect-ratio: 4/3; background: linear-gradient(135deg, var(--ink), color-mix(in srgb, var(--ink) 70%, var(--accent-2))); border-radius: var(--radius); position: relative; overflow: hidden; }
.about-figure::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
}
@media (max-width: 780px) { .about-grid { grid-template-columns: 1fr; } .about-figure { order: -1; } }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.service-card { background: var(--paper); padding: 30px 26px; }
.service-icon { width: 38px; height: 38px; border-radius: 8px; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.service-icon svg { width: 18px; height: 18px; }
.service-card h3 { font-size: 17px; margin-bottom: 8px; }
.service-card p { font-size: 14.5px; color: var(--text-muted); margin: 0; }
@media (max-width: 900px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }

/* ---------- Process ---------- */
.process-list { border-top: 1px solid var(--border); }
.process-item { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.process-item .phase { font-family: var(--font-mono); font-size: 14px; color: var(--ink); font-weight: 500; }
.process-item p { margin: 0; color: var(--text-muted); font-size: 15.5px; max-width: 560px; }
@media (max-width: 640px) { .process-item { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- Work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.work-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.work-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -18px rgba(18,23,43,0.35); }
.work-thumb { aspect-ratio: 16/11; background: linear-gradient(140deg, var(--border), var(--paper)); position: relative; }
.work-thumb .tag { position: absolute; top: 14px; left: 14px; background: var(--paper); font-family: var(--font-mono); font-size: 11.5px; padding: 5px 10px; border-radius: 4px; border: 1px solid var(--border); }
.work-body { padding: 20px 22px 24px; }
.work-body h3 { font-size: 17px; margin-bottom: 6px; }
.work-body p { font-size: 14.5px; color: var(--text-muted); margin: 0; }
@media (max-width: 900px) { .work-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .work-grid { grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 26px; display: flex; flex-direction: column; }
.testimonial-card .quote { font-size: 15.5px; color: var(--text); margin: 0 0 20px; flex: 1; }
.testimonial-card .quote::before { content: open-quote; color: var(--accent); font-family: var(--font-display); font-size: 26px; }
.testimonial-author { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.testimonial-role { font-size: 13px; color: var(--text-muted); }
@media (max-width: 900px) { .testimonial-grid { grid-template-columns: 1fr; } }

/* ---------- Blog preview / listing ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.blog-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); display: flex; flex-direction: column; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -18px rgba(18,23,43,0.35); }
.blog-thumb { aspect-ratio: 16/10; background: linear-gradient(140deg, var(--border), var(--paper)); }
.blog-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.blog-meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); margin-bottom: 10px; display: flex; gap: 10px; align-items: center; }
.blog-meta .cat { color: var(--ink); font-weight: 500; }
.blog-card h3 { font-size: 17px; margin-bottom: 8px; }
.blog-card p { font-size: 14.5px; color: var(--text-muted); margin: 0; flex: 1; }
.blog-readmore { margin-top: 16px; font-size: 13.5px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-hero { padding: 70px 0 50px; border-bottom: 1px solid var(--border); }
.blog-filter { display: flex; gap: 10px; flex-wrap: wrap; margin: 30px 0 44px; }
.blog-filter a { font-family: var(--font-mono); font-size: 13px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 100px; color: var(--text-muted); }
.blog-filter a.active, .blog-filter a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 54px; }
.pagination a, .pagination span { min-width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; }
.pagination a:hover { border-color: var(--ink); }
.pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination .disabled { opacity: 0.4; pointer-events: none; }

/* ---------- Single post ---------- */
.post-hero { padding: 56px 0 20px; }
.post-hero .blog-meta { margin-bottom: 18px; }
.post-hero h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); max-width: 820px; }
.post-cover { aspect-ratio: 21/9; border-radius: var(--radius); overflow: hidden; background: linear-gradient(140deg, var(--border), var(--paper)); margin: 30px 0 10px; }
.post-author-row { display: flex; align-items: center; gap: 12px; margin: 26px 0 10px; padding-bottom: 26px; border-bottom: 1px solid var(--border); }
.author-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--ink); flex-shrink: 0; }
.author-name { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.author-role { font-size: 13px; color: var(--text-muted); }

.post-body { max-width: 720px; margin: 0 auto; padding: 46px 0 20px; font-size: 17px; }
.post-body h2 { font-size: 24px; margin-top: 1.6em; }
.post-body h3 { font-size: 19px; margin-top: 1.4em; }
.post-body p { margin: 0 0 1.3em; color: var(--text); }
.post-body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.post-body blockquote { border-left: 3px solid var(--accent); margin: 1.6em 0; padding: 4px 0 4px 20px; color: var(--text-muted); font-style: italic; }
.post-tags { max-width: 720px; margin: 20px auto 0; display: flex; gap: 8px; flex-wrap: wrap; }
.post-tags span { font-family: var(--font-mono); font-size: 12px; border: 1px solid var(--border); padding: 5px 12px; border-radius: 100px; color: var(--text-muted); }

.related-posts { border-top: 1px solid var(--border); padding-top: 54px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { padding: 22px 0; font-family: var(--font-display); font-weight: 600; font-size: 16.5px; color: var(--ink); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; color: var(--accent); flex-shrink: 0; transition: transform 0.2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 0 24px; color: var(--text-muted); font-size: 15px; max-width: 620px; }

/* ---------- CTA banner ---------- */
.cta-banner { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: 56px 48px; text-align: center; }
.cta-banner h2 { color: var(--paper); font-size: clamp(1.6rem, 3vw, 2.1rem); }
.cta-banner .subtitle { color: color-mix(in srgb, var(--paper) 70%, transparent); max-width: 480px; margin: 12px auto 28px; }
.cta-banner .btn-primary { background: var(--accent); color: var(--ink); }
.cta-banner .btn-primary:hover { background: var(--paper); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; display: block; }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 15px; background: var(--surface); color: var(--text);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-details { display: flex; flex-direction: column; gap: 22px; }
.contact-detail .label { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.contact-detail .value { font-size: 16px; font-weight: 500; color: var(--ink); }
.social-row { display: flex; gap: 12px; margin-top: 6px; }
.social-row a { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.social-row a:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } .form-row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 60px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; margin-bottom: 46px; }
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { color: var(--text-muted); font-size: 14.5px; max-width: 320px; }
.footer-col h4 { font-family: var(--font-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 14px; font-weight: 500; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14.5px; color: var(--text); }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 26px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.footer-bottom-links { display: flex; gap: 18px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.error-page { padding: 130px 0; text-align: center; }
.error-page .code { font-family: var(--font-mono); color: var(--accent); font-size: 15px; margin-bottom: 14px; }
.error-page h1 { font-size: clamp(2rem, 5vw, 3rem); }
.error-page p { color: var(--text-muted); margin: 14px 0 30px; }

/* ---------- Utility ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
