/* Nwafor Group — Apple-inspired marketing site */

:root {
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --bg-card: #ffffff;
  --accent: #1d1d1f;
  --accent-hover: #000000;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --focus: #0071e3;
  --error: #b00020;
  --success: #1d1d1f;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --header-h: 52px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --max: 980px;
  --wide: 1120px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -0.022em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--focus);
  text-decoration: none;
  transition: opacity 0.2s var(--ease);
}

a:hover {
  opacity: 0.8;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--text);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 14px;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2.5rem, var(--wide));
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(251, 251, 253, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  width: min(100% - 2rem, var(--wide));
  margin-inline: auto;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-brand:hover {
  opacity: 1;
}

.nav-mark {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: 34px;
  max-width: 36px;
  border-radius: 4px;
  object-fit: contain;
}

.nav-name {
  font-size: 14px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--text);
  font-size: 12px;
  opacity: 0.88;
  text-decoration: none;
}

.nav-menu a:hover {
  opacity: 1;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 980px;
  background: var(--text);
  color: #fff !important;
  opacity: 1 !important;
  font-weight: 500;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.nav-cta:hover {
  background: var(--accent-hover);
  opacity: 1 !important;
}

.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* —— Hero —— */
.hero {
  padding: clamp(4.5rem, 12vw, 8rem) 0 clamp(4rem, 10vw, 7rem);
  background: var(--bg);
  text-align: center;
}

.hero-inner {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  text-transform: none;
}

.display {
  margin: 0 0 1.25rem;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--text);
}

.lede {
  margin: 0 auto 2rem;
  max-width: 34em;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.45;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.7rem 1.4rem;
  border-radius: 980px;
  border: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), opacity 0.2s var(--ease), transform 0.15s var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  opacity: 1;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--focus);
  padding-inline: 1rem;
}

.btn-ghost:hover {
  opacity: 0.75;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* —— Sections —— */
.section {
  padding: clamp(4rem, 9vw, 6.5rem) 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-title {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-sub {
  margin: 1rem 0 0;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.services {
  background: var(--bg-soft);
}

.card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
}

.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--bg-soft);
  color: var(--text);
  margin-bottom: 1.1rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* —— How it works —— */
.how {
  background: var(--bg);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  counter-reset: none;
}

.step {
  text-align: left;
  padding: 0.5rem 0;
}

.step-num {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

.step h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.step p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.98rem;
}

/* —— Estimate form —— */
.estimate {
  background: var(--bg-soft);
}

.estimate-layout .section-header {
  margin-bottom: 2.25rem;
}

.form-shell {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.server-note {
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: #fff8e6;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.45;
}

.server-note code {
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.estimate-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.form-block {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.form-legend {
  padding: 0;
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.optional {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 0.9em;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.field:last-child {
  margin-bottom: 0;
}

.field label,
.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field input:hover,
.field textarea:hover {
  border-color: var(--border-strong);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
}

.field input.invalid,
.field textarea.invalid {
  border-color: var(--error);
  background: #fff5f5;
}

.field textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.45;
}

.field-hint {
  margin: -0.4rem 0 0.85rem;
  font-size: 13px;
  color: var(--text-secondary);
}

.field > .field-hint {
  margin: -0.15rem 0 0;
}

.authorization-note {
  margin: -0.35rem 0 0.85rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
}

.authorization-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  font-size: 14px;
  cursor: pointer;
}

.authorization-check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0.1rem 0 0;
  accent-color: var(--text);
}

.authorization-check input.invalid {
  outline: 2px solid var(--error);
  outline-offset: 2px;
}

.license-upload {
  padding: 1.25rem 0.75rem;
}

.license-upload .dropzone-inner {
  gap: 0;
}

.license-preview {
  margin-top: 0.75rem;
}

.contact-method {
  margin: 0.25rem 0 0;
  padding: 0;
  border: 0;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.radio {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 980px;
  background: var(--bg-soft);
  border: 1px solid transparent;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.radio:has(input:checked) {
  border-color: var(--text);
  background: #fff;
}

.radio input {
  accent-color: var(--text);
}

/* Dropzone */
.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 2rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-dragover {
  border-color: var(--text);
  background: #eeeef0;
}

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-secondary);
  pointer-events: none;
}

.dropzone-inner p {
  margin: 0;
  font-size: 0.95rem;
}

.dropzone-inner strong {
  color: var(--text);
  font-weight: 550;
}

.photo-previews {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.65rem;
}

.photo-previews:empty {
  display: none;
}

.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-thumb .photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 11px;
  color: var(--text-secondary);
  padding: 0.35rem;
  text-align: center;
  word-break: break-all;
}

.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(29, 29, 31, 0.75);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.photo-remove:hover {
  background: #000;
}

.field-error {
  margin: 0.65rem 0 0;
  font-size: 13px;
  color: var(--error);
}

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  padding-top: 0.25rem;
}

.btn-submit {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
}

.form-status {
  margin: 0;
  min-height: 1.25em;
  font-size: 0.95rem;
  text-align: center;
}

.form-status.is-error {
  color: var(--error);
}

.form-status.is-success {
  color: var(--text);
}

/* Success panel */
.success-panel {
  text-align: center;
  padding: 2rem 0.5rem 1rem;
}

.success-mark {
  color: var(--text);
  margin-bottom: 1.25rem;
}

.success-panel h3 {
  margin: 0 0 0.65rem;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.success-panel p {
  margin: 0 auto 1.75rem;
  max-width: 28em;
  color: var(--text-secondary);
}

/* —— Footer —— */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.footer-tag {
  margin: 0.15rem 0 0;
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 13px;
}

.footer-links a:hover {
  color: var(--text);
  opacity: 1;
}

.footer-copy {
  margin: 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 12px;
}

/* —— Reveal animations —— */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .card:hover {
    transform: none;
  }

  .btn:active {
    transform: none;
  }
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: rgba(251, 251, 253, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.25s var(--ease);
  }

  .nav-menu.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu li {
    border-bottom: 1px solid var(--border);
  }

  .nav-menu a {
    display: block;
    padding: 0.9rem 0;
    font-size: 15px;
  }

  .nav-cta {
    margin-top: 0.5rem;
    justify-content: center;
    width: 100%;
  }

  .field-row,
  .field-row-3 {
    grid-template-columns: 1fr;
  }

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

  .hero {
    text-align: left;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .section-header {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 1.75rem, var(--wide));
  }

  .display {
    font-size: clamp(2.15rem, 10vw, 2.75rem);
  }
}
