/* 360 Surfaces — Base Stylesheet
   Brand tokens pulled from 01-Foundation/brand-kit.md */

:root {
  /* Colors */
  --bg-cream: #FAF8F5;
  --bg-dark: #0D0D0D;
  --bg-card: #FFFFFF;
  --text-primary: #1C1C1C;
  --text-body: #333333;
  --text-muted: #6B6B6B;
  --text-inverse: #FAF8F5;
  --accent-gold: #B8860B;
  --accent-gold-hover: #9A7109;
  --border-subtle: #E8E4DC;
  --shadow-card: 0 4px 24px rgba(13, 13, 13, 0.08);

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type scale */
  --fs-h1: clamp(42px, 6vw, 74px);
  --fs-h2: clamp(32px, 4vw, 48px);
  --fs-h3: 22px;
  --fs-h4: 18px;
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-label: 12.5px;

  --lh-tight: 1.15;
  --lh-normal: 1.5;
  --lh-loose: 1.7;

  /* Spacing (8px grid) */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 48px;
  --s-6: 64px;
  --s-7: 96px;
  --s-8: 128px;

  /* Layout */
  --max-width: 1200px;
  --content-width: 800px;
  --radius: 6px;
  --radius-lg: 12px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 240ms;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text-body);
  background: var(--bg-cream);
  -webkit-font-smoothing: antialiased;
}
img, picture, video, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: var(--lh-tight);
  margin: 0 0 var(--s-3);
  font-weight: 700;
}
h1 { font-size: var(--fs-h1); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.01em; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
p { margin: 0 0 var(--s-2); }

/* Layout helpers */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--s-3); }
.narrow { max-width: var(--content-width); margin: 0 auto; }
.section { padding: var(--s-7) 0; }
.section-dark { background: var(--bg-dark); color: var(--text-inverse); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--text-inverse); }
.grid { display: grid; gap: var(--s-3); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: var(--s-5) 0; }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all var(--dur) var(--ease);
  cursor: pointer;
}
.btn-primary { background: var(--accent-gold); color: var(--text-inverse); }
.btn-primary:hover { background: var(--accent-gold-hover); transform: translateY(-1px); }
.btn-outline { border: 2px solid var(--text-primary); color: var(--text-primary); }
.btn-outline:hover { background: var(--text-primary); color: var(--text-inverse); }
/* On dark hero/section backgrounds the outline button needs light text */
.hero .btn-outline, .section-dark .btn-outline { border-color: #fff; color: #fff; }
.hero .btn-outline:hover, .section-dark .btn-outline:hover { background: #fff; color: var(--text-primary); }

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--s-3);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease);
}
.card:hover { transform: translateY(-4px); }
.card img { border-radius: var(--radius); margin-bottom: var(--s-2); }
.card h3 { margin-bottom: var(--s-1); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 245, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: var(--s-2); padding-bottom: var(--s-2);
}
.site-header .logo { display: block; line-height: 0; flex-shrink: 0; }
.site-header .logo img { height: 44px !important; max-height: 44px; width: auto; max-width: none; display: block; }
.site-nav { display: flex; gap: var(--s-3); align-items: center; }
.site-nav a { font-size: var(--fs-small); font-weight: 500; white-space: nowrap; }
.site-nav .btn { white-space: nowrap; }
.site-nav { flex-wrap: nowrap; }
@media (max-width: 1100px) and (min-width: 801px) { .site-nav { gap: var(--s-2); } .site-nav .btn { padding-left: 18px; padding-right: 18px; } }
.site-nav a:hover { color: var(--accent-gold); }
.nav-toggle { position: absolute !important; opacity: 0 !important; pointer-events: none; width: 1px !important; height: 1px !important; margin: 0; overflow: hidden; clip: rect(0 0 0 0); -webkit-appearance: none; appearance: none; }
.nav-burger { display: none; }
@media (max-width: 800px) {
  .site-header .container { position: relative; gap: 12px; }
  .site-header .logo img { height: 36px !important; max-height: 36px; }
  .site-nav { margin-left: auto; }
  .site-nav a:not(.btn) { display: none; }
  .site-nav .btn { padding: 10px 14px; font-size: 14px; }
  .nav-burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 42px; height: 42px; padding: 0 9px; cursor: pointer; border: 1px solid var(--border-subtle); border-radius: 8px; background: #fff; flex-shrink: 0; }
  .nav-burger span { display: block; height: 2px; background: var(--text-primary); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .nav-toggle:focus-visible + .nav-burger { outline: 2px solid var(--accent-gold); outline-offset: 2px; }
  .nav-toggle:checked + .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked + .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked + .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-toggle:checked ~ .site-nav { position: absolute; top: 100%; left: 0; right: 0; margin: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--s-3) var(--s-3); background: #FAF8F5; border-bottom: 1px solid var(--border-subtle); box-shadow: 0 12px 24px rgba(0,0,0,0.08); }
  .nav-toggle:checked ~ .site-nav a:not(.btn) { display: block; padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--border-subtle); }
  .nav-toggle:checked ~ .site-nav .btn { margin-top: var(--s-2); text-align: center; padding: 14px; font-size: 16px; }
  .site-header .container > .nav-burger { order: 3; }
}
@media (max-width: 360px) { .site-header .logo img { height: 32px !important; max-height: 32px; } .site-nav .btn { padding: 9px 10px; font-size: 13px; } }

/* Blog listing */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4, 32px); }
@media (max-width: 1000px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }
.post-card { display: flex; flex-direction: column; background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); transition: transform var(--dur) var(--ease); color: inherit; }
.post-card:hover { transform: translateY(-4px); }
.post-card .post-card-img { aspect-ratio: 16 / 10; overflow: hidden; background: #e9e6e1; }
.post-card .post-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; margin: 0; }
.post-card .post-card-body { padding: var(--s-3); display: flex; flex-direction: column; flex: 1; }
.post-card .post-meta { font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 8px; }
.post-card .post-meta .cat { color: var(--accent-gold); font-weight: 600; }
.post-card h3 { margin-bottom: var(--s-1); font-size: 20px; line-height: 1.3; }
.post-card p { font-size: 14px; color: var(--text-muted); margin-bottom: var(--s-2); }
.post-card .read-more { margin-top: auto; font-size: var(--fs-small); font-weight: 600; color: var(--accent-gold); }
.post-card:hover h3 { color: var(--accent-gold); }

/* Footer */
.site-footer { background: var(--bg-dark); color: var(--text-inverse); padding: var(--s-6) 0 var(--s-3); }
.site-footer h4 { color: var(--text-inverse); font-family: var(--font-body); font-size: var(--fs-small); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--s-2); }
.site-footer a { display: block; color: #BBB; font-size: var(--fs-small); padding: 4px 0; }
.site-footer a:hover { color: var(--accent-gold); }
.site-footer .copyright { border-top: 1px solid #222; margin-top: var(--s-5); padding-top: var(--s-3); text-align: center; font-size: var(--fs-label); color: #888; }

/* Hero */
.hero { padding: var(--s-7) 0 var(--s-6); }
.hero .eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: var(--fs-label); color: var(--accent-gold); font-weight: 600; margin-bottom: var(--s-2); }
.hero p.lead { font-size: 20px; line-height: var(--lh-loose); color: var(--text-body); max-width: 640px; margin-bottom: var(--s-4); }

/* Forms */
.form-group { margin-bottom: var(--s-2); }
.form-group label { display: block; font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; color: var(--text-muted); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--text-primary);
  background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: 2px solid var(--accent-gold); outline-offset: 1px; }

/* Mobile phone CTA bar */
.phone-cta-bar { display: none; }
@media (max-width: 800px) {
  .phone-cta-bar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: var(--accent-gold); color: var(--text-inverse);
    padding: 14px; justify-content: center; gap: var(--s-1);
    font-weight: 600; font-size: var(--fs-small); text-transform: uppercase; letter-spacing: 0.06em;
  }
  body { padding-bottom: 56px; }
}

/* Utility */
.text-center { text-align: center; }
.mb-1 { margin-bottom: var(--s-1); } .mb-2 { margin-bottom: var(--s-2); } .mb-3 { margin-bottom: var(--s-3); }
.mb-4 { margin-bottom: var(--s-4); } .mb-5 { margin-bottom: var(--s-5); }
.mt-3 { margin-top: var(--s-3); } .mt-5 { margin-top: var(--s-5); }

/* Hero with background image */
.hero-image { background-size: cover; background-position: center; color: #fff; }
.hero-image .eyebrow { color: var(--accent-gold); }

/* Photo grid for service pages + gallery */
.photo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 800px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }
.photo-tile {
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: #111;
}
.photo-tile img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s ease;
}
.photo-tile:hover img { transform: scale(1.04); }

/* Featured strip on homepage */
.featured-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 800px) {
  .featured-strip { grid-template-columns: repeat(2, 1fr); }
  /* a lone tile on the last row centers instead of hugging the left */
  .featured-strip > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: calc(50% - 8px);
    justify-self: center;
  }
}
.featured-tile {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px;
  display: block; text-decoration: none; background: #111;
}
.featured-tile img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s ease;
}
.featured-tile:hover img { transform: scale(1.05); }
.featured-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 12px 16px; background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: #fff; font-weight: 600; font-size: 15px;
}

