/* ===========================
   Appqualia Studio — Main CSS
   =========================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0C0B09;
  --bg-2: #131210;
  --bg-3: #1A1916;
  --text: #EDE8DF;
  --text-muted: #8C8880;
  --text-dim: #4A4840;
  --gold: #C4922A;
  --gold-light: #E8B84A;
  --gold-dim: #6B4E18;
  --border: rgba(255,255,255,0.07);
  --border-gold: rgba(196,146,42,0.25);
  --serif: 'Noto Serif JP', Georgia, serif;
  --sans: 'Noto Sans JP', sans-serif;
  --mono: 'DM Mono', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.8;
  overflow-x: hidden;
}

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

/* ============
   NAVIGATION
   ============ */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 3rem;
  border-bottom: 1px solid var(--border);
  background: rgba(12,11,9,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-branding .site-title {
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--text);
  font-weight: 400;
}

.site-branding .site-title a {
  color: inherit;
  text-decoration: none;
}

.site-branding .site-title span {
  color: var(--gold);
}

.main-navigation ul {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation ul a {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.main-navigation ul a:hover {
  color: var(--text);
}

.nav-cta-wrap .nav-cta {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  border: 1px solid var(--border-gold);
  padding: 0.5rem 1.25rem;
  text-decoration: none;
  transition: all 0.2s;
}

.nav-cta-wrap .nav-cta:hover {
  background: var(--gold-dim);
}

/* Hamburger (mobile) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text);
  transition: all 0.3s;
}

/* ============
   HERO
   ============ */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 3rem 5rem;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.6;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 100%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 100%, black 20%, transparent 80%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; }

.hero-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 900px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}

.hero-title em {
  font-style: normal;
  color: var(--gold);
}

.hero-sub {
  margin-top: 2rem;
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.9;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.6s forwards;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 3rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.8s forwards;
}

/* ============
   BUTTONS
   ============ */

.btn-primary {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--bg);
  background: var(--gold);
  padding: 0.9rem 2.5rem;
  text-decoration: none;
  transition: all 0.2s;
  font-family: var(--sans);
  display: inline-block;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--gold-light);
  color: var(--bg);
}

.btn-ghost {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

.btn-outline {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.9rem 2rem;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* ============
   SECTIONS
   ============ */

section { padding: 7rem 3rem; }

.section-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  display: block;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 300;
  line-height: 1.25;
  max-width: 800px;
}

.section-title em {
  font-style: normal;
  color: var(--gold);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 30%, var(--border) 70%, transparent);
  margin: 0 3rem;
}

/* ============
   PHILOSOPHY
   ============ */

.philosophy {
  background: var(--bg-2);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.philosophy-text p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
  line-height: 2;
}

.philosophy-quote {
  border-left: 1px solid var(--gold);
  padding-left: 2rem;
}

.philosophy-quote blockquote {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text);
}

.philosophy-quote cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.75rem;
  font-style: normal;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  font-family: var(--mono);
  text-transform: uppercase;
}

/* ============
   PILLARS
   ============ */

.pillars-section { padding-bottom: 0; }

.pillars-header { margin-bottom: 4rem; }

.pillars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5px;
  background: var(--border);
}

.pillar {
  background: var(--bg);
  padding: 3.5rem;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}

.pillar:hover {
  background: var(--bg-2);
}

.pillar-num {
  font-family: var(--mono);
  font-size: 5rem;
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1;
  position: absolute;
  top: 2rem; right: 2.5rem;
  transition: color 0.3s;
  user-select: none;
}

.pillar:hover .pillar-num {
  color: var(--gold-dim);
}

.pillar-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  display: block;
}

.pillar-title {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1.35;
  margin-bottom: 1.25rem;
}

.pillar-body {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 2;
  margin-bottom: 2rem;
}

.pillar-items {
  list-style: none;
}

.pillar-items li {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: 0.04em;
}

.pillar-items li::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

.pillars-spacer {
  margin-bottom: 7rem;
}

/* ============
   PRODUCTS
   ============ */

.products {
  background: var(--bg-2);
}

.products-header {
  margin-bottom: 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  margin-top: 3rem;
}

.product-card {
  background: var(--bg-2);
  padding: 2.5rem;
  transition: background 0.3s;
}

.product-card:hover {
  background: var(--bg-3);
}

.product-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.product-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-name {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 0.75rem;
  display: block;
}

.product-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.product-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.9;
}

.product-status {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--text-dim);
  padding: 0.2rem 0.6rem;
}

.product-status.active {
  color: var(--gold);
  border-color: var(--border-gold);
}

/* ============
   WORKS / IP
   ============ */

.works-header {
  margin-bottom: 3.5rem;
}

.works-intro {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 2;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}

.work-card {
  background: var(--bg);
  padding: 2.5rem;
  position: relative;
  transition: background 0.3s;
}

.work-card:hover {
  background: var(--bg-2);
}

.work-tag {
  position: absolute;
  top: 2rem; right: 2rem;
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0.4;
}

.work-genre {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
}

.work-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.work-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.9;
}

/* ============
   APPROACH
   ============ */

.approach {
  background: var(--bg-2);
}

.approach-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 6rem;
  align-items: start;
}

.approach-steps {
  margin-top: 3rem;
}

.step {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.step:first-child {
  border-top: 1px solid var(--border);
}

.step-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--gold);
  padding-top: 0.2rem;
}

.step-content h4 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.step-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.9;
}

/* ============
   CTA SECTION
   ============ */

.cta-section {
  text-align: center;
  padding: 8rem 3rem;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 80%);
  pointer-events: none;
}

.cta-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.25;
  margin: 1rem auto 1.5rem;
  max-width: 700px;
  position: relative;
}

.cta-title em {
  font-style: normal;
  color: var(--gold);
}

.cta-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  position: relative;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  position: relative;
  flex-wrap: wrap;
}

/* ============
   FOOTER
   ============ */

.site-footer {
  padding: 3rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--serif);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

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

.footer-copy {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

/* ============
   CONTENT PAGES
   ============ */

.page-content-wrapper {
  padding: 12rem 3rem 7rem;
  max-width: 860px;
  margin: 0 auto;
}

.page-content-wrapper h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  margin-bottom: 2rem;
  line-height: 1.25;
}

.page-content-wrapper h2,
.page-content-wrapper h3 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 2.5rem 0 1rem;
}

.page-content-wrapper h2 { font-size: 1.6rem; }
.page-content-wrapper h3 { font-size: 1.2rem; }

.page-content-wrapper p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 2;
  margin-bottom: 1.5rem;
}

.page-content-wrapper a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============
   CONTACT FORM
   ============ */

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  outline: none;
  transition: border-color 0.2s;
  border-radius: 0;
  -webkit-appearance: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--border-gold);
}

.contact-form textarea {
  min-height: 160px;
  resize: vertical;
}

.contact-form label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.5rem;
}

.wpcf7-submit {
  background: var(--gold) !important;
  color: var(--bg) !important;
  border: none !important;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  padding: 0.9rem 2.5rem !important;
  cursor: pointer;
  transition: background 0.2s;
  font-family: var(--sans) !important;
}

.wpcf7-submit:hover {
  background: var(--gold-light) !important;
}

/* ============
   ANIMATIONS
   ============ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============
   RESPONSIVE
   ============ */

@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .approach-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .approach-steps {
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 1rem 1.5rem;
  }

  .main-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(12,11,9,0.97);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
  }

  .main-navigation.open {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 0;
  }

  .main-navigation ul a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding: 0 1.5rem 4rem;
  }

  section { padding: 5rem 1.5rem; }
  .divider { margin: 0 1.5rem; }

  .philosophy {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 2rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-section { padding: 6rem 1.5rem; }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}
