/* ==========================================================================
   TAG Building Co. Ltd
   ========================================================================== */

:root {
  --ink: #141414;
  --ink-2: #1c1c1b;
  --ink-3: #2a2927;
  --gold: #c9a24c;
  --gold-light: #e6cc85;
  --gold-dark: #8f7130;
  --paper: #f5f1e8;
  --white: #ffffff;
  --text: #1b1a18;
  --muted: #5d584f;
  --muted-on-ink: #b4ada0;
  --line: #e2dbcc;
  --line-on-ink: rgba(255, 255, 255, 0.12);

  --font-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius: 6px;
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(64px, 9vw, 112px);
  --header-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--ink); padding: 10px 16px; border-radius: var(--radius); font-weight: 600; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.icon { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.eyebrow-dark { color: var(--gold-dark); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: 0.02em;
  text-decoration: none; border-radius: var(--radius); border: 2px solid transparent;
  padding: 14px 24px; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--ink); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { border-color: rgba(255,255,255,.35); color: var(--white); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-light); }
.btn-sm { padding: 9px 16px; font-size: 0.95rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 20, 20, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line-on-ink);
  color: var(--white);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; }
.brand-mark path { fill: none; stroke: var(--gold); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark text { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: 1px; fill: var(--gold); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.12em; text-transform: uppercase; }
.brand-sub { font-family: var(--font-display); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.42em; text-transform: uppercase; color: var(--gold); margin-top: 6px; padding-bottom: 4px; border-bottom: 2px solid var(--gold); align-self: flex-start; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.site-nav ul a { text-decoration: none; font-weight: 500; font-size: 0.97rem; color: rgba(255,255,255,.82); padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav ul a:hover { color: var(--white); border-bottom-color: var(--gold); }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; color: var(--white); }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 24px; height: 2px; background: currentColor; margin: 0 auto; position: relative; transition: transform .25s, background-color .25s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--line-on-ink);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line-on-ink); font-size: 1.05rem; }
  .site-nav ul a:hover { border-bottom-color: var(--line-on-ink); }
  .header-call { margin-top: 16px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 600px at 85% 20%, #262421 0%, var(--ink) 60%);
  color: var(--white);
  padding: clamp(48px, 8vw, 96px) 0 0;
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(201,162,76,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,162,76,.07) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero-copy h1 { margin-bottom: 20px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted-on-ink); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-art { margin: 0; }
.blueprint { width: 100%; height: auto; display: block; }
.blueprint .bp-strong { fill: none; stroke: rgba(255,255,255,.85); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.blueprint .bp-line { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 1.5; }
.blueprint .bp-faint { fill: none; stroke: rgba(255,255,255,.22); stroke-width: 1; }
.blueprint .bp-gold { fill: none; stroke: var(--gold); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.blueprint .bp-dim { fill: none; stroke: rgba(201,162,76,.6); stroke-width: 1; }
.blueprint .bp-text { font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: .2em; fill: rgba(255,255,255,.6); }
.blueprint .bp-text-gold { fill: var(--gold); }
.blueprint .bp-text-faint { fill: rgba(255,255,255,.32); }

.hero-strip {
  position: relative; list-style: none; margin: clamp(40px, 6vw, 72px) 0 0; padding: 22px 0;
  display: flex; flex-wrap: wrap; gap: 10px 32px; justify-content: space-between;
  border-top: 1px solid var(--line-on-ink);
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.7);
}
.hero-strip li { display: flex; align-items: center; gap: 10px; }
.hero-strip li::before { content: ""; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 520px; }
  .hero-strip { justify-content: flex-start; }
}

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section-ink { background: var(--ink); color: var(--white); }
.section-ink .section-head p:not(.eyebrow) { color: var(--muted-on-ink); }
.section-paper { background: var(--paper); }
.section-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; padding: 30px 28px 26px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card::after { content: ""; position: absolute; left: 28px; right: 28px; top: -1px; height: 3px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.card:hover { border-color: #d6cdb8; box-shadow: 0 14px 36px -18px rgba(20,20,20,.25); transform: translateY(-2px); }
.card:hover::after { transform: scaleX(1); }
.card-icon { width: 46px; height: 46px; margin-bottom: 18px; fill: none; stroke: var(--gold-dark); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.card p { color: var(--muted); margin: 0; font-size: 0.98rem; }
@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Process ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: none; }
.step { padding: 28px 28px 8px 0; border-top: 1px solid var(--line-on-ink); position: relative; }
.step + .step { padding-left: 28px; border-left: 1px solid var(--line-on-ink); }
.step-num { display: block; font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--gold); margin-bottom: 16px; }
.step p { color: var(--muted-on-ink); font-size: 0.98rem; }
@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .step + .step { padding-left: 0; border-left: 0; }
}

/* ---------- Gallery (for when photos are added) ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); display: block; }
.gallery figcaption { font-size: .9rem; color: var(--muted); margin-top: 8px; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about-copy p { color: var(--muted); font-size: 1.05rem; }
.areas { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; border-top: 3px solid var(--gold); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; padding: 0; }
.chips li { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .93rem; font-weight: 500; background: var(--paper); }
.areas-note { color: var(--muted); font-size: .93rem; margin: 0; }
@media (max-width: 880px) { .about { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); }
.contact-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-copy > p:not(.eyebrow) { color: var(--muted-on-ink); font-size: 1.05rem; }
.contact-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; font-size: 1.1rem; }
.contact-list .icon { width: 44px; height: 44px; padding: 11px; border: 1px solid rgba(201,162,76,.45); border-radius: 50%; color: var(--gold); fill: var(--gold); }
.contact-list .icon path, .contact-list .icon circle { stroke: var(--gold); }
.contact-list .label { display: block; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-on-ink); font-weight: 600; margin-bottom: 2px; }
.contact-list a { text-decoration: none; font-weight: 600; word-break: break-word; }
.contact-list a:hover { color: var(--gold-light); }

.quote-form { background: var(--white); color: var(--text); border-radius: var(--radius); padding: clamp(24px, 4vw, 36px); border-top: 4px solid var(--gold); }
.quote-form h3 { font-size: 1.4rem; margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field label span { color: var(--gold-dark); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  padding: 12px 14px; border: 1px solid #cfc7b6; border-radius: var(--radius); background: #fcfbf8;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(201,162,76,.25); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.form-error { color: #b3261e; font-weight: 600; font-size: .95rem; }
.form-note { font-size: .85rem; color: var(--muted); margin: 12px 0 0; }
.form-success { margin: 16px 0 0; padding: 14px 16px; background: #f3f8ef; border: 1px solid #c9dfbd; border-radius: var(--radius); font-size: .95rem; }
@media (max-width: 880px) { .contact-inner { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: #0e0e0e; color: rgba(255,255,255,.75); padding: 40px 0 28px; font-size: .95rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--line-on-ink); }
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-brand .brand-name { color: var(--white); font-size: 1rem; }
.footer-contact { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; }
.footer-contact a { text-decoration: none; }
.footer-contact a:hover { color: var(--gold-light); }
.footer-legal { padding-top: 20px; font-size: .82rem; color: rgba(255,255,255,.5); }
.footer-legal p { margin: 0; }

/* ---------- Mobile quick-contact bar ---------- */
.mobile-bar { display: none; }
@media (max-width: 680px) {
  body { padding-bottom: 64px; }
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    height: 64px; padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -8px 24px rgba(0,0,0,.25);
  }
  .mobile-bar a {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font-display); font-weight: 700; text-decoration: none; font-size: 1rem;
  }
  .mobile-bar-call { background: var(--ink); color: var(--white); }
  .mobile-bar-call .icon { color: var(--gold); }
  .mobile-bar-quote { background: var(--gold); color: var(--ink); }
}
