/* Home page — layout and section styling. Depends on CSSs/global.css. */

.page-container { max-width: 1040px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }

/* ---- Nav ---- */
/* Three-column grid so the center links stay truly centered between the
   logo and the button regardless of either one's width — the two 1fr
   tracks absorb the leftover space equally. */
.site-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; max-width: 1040px; margin: 0 auto; padding: 40px clamp(20px, 5vw, 48px) 32px; border-bottom: 1px solid var(--rule); position: relative; }
.site-nav .brand { grid-column: 1; order: 1; justify-self: start; display: flex; align-items: center; gap: 10px; font-family: var(--heading); font-weight: 600; font-size: 22px; letter-spacing: 0.01em; color: var(--ink); }
.brand-mark { flex: none; }
.nav-links { grid-column: 2; order: 2; justify-self: center; display: flex; gap: 32px; align-items: center; }
.nav-link { color: var(--ink); font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; }
.nav-cta { grid-column: 3; order: 3; justify-self: end; color: var(--bg); background: var(--ink); padding: 10px 22px; font-size: 14px; letter-spacing: 0.02em; border: 1px solid var(--ink); transition: background 0.2s ease, color 0.2s ease; }
.nav-cta:hover { background: transparent; color: var(--ink); }

.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 34px; height: 34px; padding: 0; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--ink); transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 720px) {
  /* Grid gives way to flex here: brand pinned left via margin-right:auto,
     hamburger + Hire me sit top-right, and the links panel drops to its
     own full-width row underneath when toggled open. */
  .site-nav { display: flex; flex-wrap: wrap; align-items: center; padding: 22px clamp(20px, 5vw, 48px); }
  .brand { order: 1; margin-right: auto; }
  .brand span { display: none; }
  .nav-cta { order: 2; }
  .nav-toggle { display: flex; order: 3; margin-left: 14px; }
  .nav-links {
    order: 4; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%;
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease;
    margin-top: 0;
  }
  .nav-links.open { max-height: 320px; opacity: 1; margin-top: 20px; }
  .nav-link { padding: 10px 0; width: 100%; }
}

/* ---- Hero ---- */
.hero { padding: 96px 0 72px; text-align: center; border-bottom: 1px solid var(--rule); }
.hero-tag { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.hero-role { display: block; font-size: 14px; font-style: italic; color: var(--accent); margin-top: 8px; }
.hero-title { font-family: var(--heading); font-weight: 700; font-size: clamp(40px, 6vw, 68px); line-height: 1.12; margin: 20px auto 0; max-width: 16ch; }
.hero-sub { font-size: 18px; line-height: 30px; max-width: 56ch; margin: 28px auto 0; color: var(--ink-soft); }
.hero-actions { display: flex; gap: 16px; justify-content: center; margin-top: 36px; }
.btn-solid { color: var(--bg); background: var(--ink); padding: 14px 30px; font-size: 15px; letter-spacing: 0.02em; border: 1px solid var(--ink); transition: background 0.2s ease, color 0.2s ease; }
.btn-solid:hover { background: transparent; color: var(--ink); }
.btn-outline { color: var(--ink); border: 1px solid var(--ink); padding: 13px 30px; font-size: 15px; letter-spacing: 0.02em; }

/* ---- Generic section ---- */
.section { padding: 64px 0; border-bottom: 1px solid var(--rule); }
.section-label { font-family: var(--heading); font-weight: 600; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 36px; }

/* ---- Services ---- */
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.service-card { border-top: 2px solid var(--ink); padding-top: 20px; }
.service-card h3 { font-family: var(--heading); font-weight: 600; font-size: 21px; margin: 0 0 12px; }
.service-card p { font-size: 15.5px; line-height: 26px; color: var(--ink-soft); margin: 0; }

/* ---- Work ---- */
.work-list { display: grid; gap: 0; }
.work-item { text-decoration: none; color: var(--ink); display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 32px; align-items: center; padding: 32px 0; border-bottom: 1px solid var(--rule); }
.work-list a.work-item:last-child { border-bottom: none; }
.work-list a.work-item.page-last { border-bottom: none; }
.work-item[hidden], .work-pager[hidden] { display: none; }
.work-pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--rule); }
.pager-nums { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pager-btn { font-family: var(--body); font-size: 14px; color: var(--ink); background: none; border: 1px solid var(--rule); min-width: 40px; height: 40px; padding: 0 12px; cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease; }
.pager-btn:hover:not(:disabled) { border-color: var(--ink); }
.pager-btn[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); cursor: default; }
.pager-btn:disabled:not([aria-current]) { opacity: 0.35; cursor: default; }
.pager-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pager-step { letter-spacing: 0.03em; }
.work-title { font-family: var(--heading); font-weight: 600; font-size: 26px; margin: 0 0 8px; }
.work-desc { font-size: 15px; line-height: 25px; color: var(--ink-soft); margin: 0 0 10px; max-width: 52ch; }
.work-tag { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }

/* ---- Testimonials ---- */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.testimonial-card { border: 1px solid var(--rule); padding: 28px 26px; margin: 0; display: flex; flex-direction: column; }
.testimonial-stars { color: var(--accent); font-size: 14px; letter-spacing: 2px; margin-bottom: 14px; }
.testimonial-card blockquote { margin: 0; font-size: 15.5px; line-height: 25px; color: var(--ink); font-style: italic; flex: 1; }
.testimonial-card figcaption { margin-top: 18px; display: flex; flex-direction: column; gap: 2px; }
.testimonial-name { font-family: var(--heading); font-weight: 600; font-size: 15px; font-style: normal; color: var(--ink); }
.testimonial-role { font-size: 12.5px; color: var(--ink-soft); }
.testimonial-project { font-size: 12.5px; color: var(--accent); margin-top: 6px; }
.review-cta { margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--rule); text-align: center; }
.review-cta p { color: var(--ink-soft); margin: 0 0 18px; }

/* ---- Automations / Contact (centered text sections) ---- */
.center-section { padding: 64px 0; border-bottom: 1px solid var(--rule); text-align: center; }
.center-section:last-of-type { border-bottom: none; }
.center-section h3 { font-family: var(--heading); font-weight: 700; font-size: 30px; margin: 0; }
.center-section p { font-size: 16px; line-height: 28px; color: var(--ink-soft); margin: 18px auto 0; max-width: 54ch; }
#contact.center-section { padding-top: 72px; padding-bottom: 72px; }
#contact h3 { font-size: 34px; }

/* ---- Contact form ---- */
.contact-form { max-width: 480px; margin: 32px auto 0; text-align: left; display: grid; gap: 16px; }
.contact-form .field { display: flex; flex-direction: column; gap: 6px; }
.contact-form label { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.contact-form input, .contact-form textarea, .contact-form select { font-family: var(--body); font-size: 15px; color: var(--ink); background: #fff; border: 1px solid var(--rule); padding: 11px 13px; }
.contact-form textarea { resize: vertical; min-height: 100px; }
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.contact-form .submit-row { display: flex; align-items: center; gap: 16px; justify-content: center; margin-top: 6px; }
.contact-form button[type="submit"] { font-family: var(--body); cursor: pointer; }
.form-status { font-size: 14px; min-height: 20px; }
.form-status.success { color: #3f5d3a; }
.form-status.error { color: var(--accent); }
.contact-alt { font-size: 13.5px; color: var(--ink-soft); margin-top: 18px; }

/* ---- Footer ---- */
.site-footer { padding: 32px 0 56px; font-size: 13px; color: var(--ink-soft); display: flex; flex-direction: column; align-items: center; gap: 12px; border-top: 1px solid var(--rule); }
.footer-social { display: flex; flex-direction: row; align-items: center; gap: 20px; }
.footer-social a { display: inline-flex; color: var(--ink-soft); }
.footer-social a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .testimonials-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .services-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .work-item { grid-template-columns: 1fr; }
  .pager-step { font-size: 0; min-width: 40px; padding: 0; }
  .pager-step::before { font-size: 16px; }
  .pager-step:first-child::before { content: '\2190'; }
  .pager-step:last-child::before { content: '\2192'; }
}

@media (max-width: 480px) {
  .hero { padding: 64px 0 56px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions a { text-align: center; }
  .contact-form .submit-row { flex-direction: column; align-items: stretch; }
  .footer-social { flex-wrap: wrap; justify-content: center; }
}
