@import url("assets/fonts.css");

/* Simple Contracting App — test home page
   Black and orange, diamond-plate feel, readable on phones. */

:root {
  --orange: #ed620d;
  --orange-hot: #ff7318;
  --orange-deep: #c44e0a;
  --black: #0a0a0a;
  --charcoal: #141414;
  --card: #1b1b1b;
  --line: #2e2e2e;
  --text: #f4f4f4;
  --muted: #c8c8c8;
  --steel: #9a9a9a;
  --focus: #ffb070;
  --radius: 10px;
  --wrap: 1120px;
  --header: Oswald, "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Sans 3", "Segoe UI", Tahoma, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--header);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2.15rem, 6vw, 3.65rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.08;
  margin: 0 0 0.7em;
}

h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.25rem);
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.35em;
}

p {
  margin: 0 0 0.85em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--orange-hot);
}

a:hover {
  color: #ffd0a8;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--orange);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.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;
}

.wrap {
  width: min(var(--wrap), calc(100% - 2rem));
  margin-inline: auto;
}

@media (min-width: 720px) {
  .wrap {
    width: min(var(--wrap), calc(100% - 3rem));
  }
}

/* Diamond plate overlay on dark sections */
.plate-bg {
  position: relative;
  background-color: #0c0c0c;
  background-image: url("assets/plate-dark.png");
  background-size: 168px 168px;
  background-repeat: repeat;
}

.plate-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.35) 0%,
    rgba(10, 10, 10, 0.55) 100%
  );
  pointer-events: none;
}

.plate-bg > * {
  position: relative;
  z-index: 1;
}

/* Test banner */
.test-banner {
  background: var(--orange);
  color: #1a0a00;
  text-align: center;
  font-family: var(--header);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
}

/* Header */
.site-header {
  background: rgba(8, 8, 8, 0.96);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

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

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px #333;
}

.brand-name {
  font-family: var(--header);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.header-link {
  flex-shrink: 0;
  font-family: var(--header);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--orange);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}

.header-link:hover {
  background: var(--orange);
  color: #fff;
}

/* Hero */
.hero {
  padding: 2.2rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  gap: 2.2rem;
  align-items: center;
}

.eyebrow {
  font-family: var(--header);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange-hot);
  margin: 0 0 0.7rem;
}

.subhead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 38rem;
  margin-bottom: 1.4rem;
}

.cta-lead {
  font-weight: 600;
  margin-bottom: 0.7rem;
}

/* Waitlist form */
.waitlist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  max-width: 34rem;
}

.waitlist input[type="email"] {
  flex: 1 1 12rem;
  min-width: 0;
  background: #111;
  color: var(--text);
  border: 1px solid #4a4a4a;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-family: var(--body);
  font-size: 1rem; /* keep 16px to avoid iOS zoom */
  line-height: 1.3;
}

.waitlist input[type="email"]::placeholder {
  color: #8a8a8a;
}

.waitlist input[type="email"]:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--orange);
}

.waitlist button {
  flex: 0 0 auto;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  font-family: var(--header);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  line-height: 1.3;
}

.waitlist button:hover {
  background: var(--orange-hot);
}

.waitlist button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.form-note {
  flex: 1 1 100%;
  margin: 0.2rem 0 0;
  color: #ffd0a8;
  font-size: 0.95rem;
}

/* Phone mockup */
.phone {
  margin: 0 auto;
  width: min(260px, 78vw);
}

.phone-frame {
  background: linear-gradient(180deg, #2c2c2c 0%, #111 18%, #0a0a0a 100%);
  border-radius: 32px;
  padding: 14px 9px 16px;
  border: 2px solid #3a3a3a;
  box-shadow:
    0 0 0 1px #000,
    0 18px 40px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.phone-speaker {
  width: 42px;
  height: 5px;
  background: #2a2a2a;
  border-radius: 3px;
  margin: 0 auto 10px;
  box-shadow: inset 0 1px 1px #000;
}

.phone-screen {
  border-radius: 22px;
  overflow: hidden;
  background: #c8c8cc;
  line-height: 0;
}

.phone figcaption {
  margin-top: 0.8rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--steel);
  line-height: 1.35;
}

/* Benefits */
.benefits {
  background: var(--charcoal);
  padding: 3rem 0;
  border-bottom: 1px solid var(--line);
}

.benefit-grid {
  display: grid;
  gap: 1rem;
}

.benefit {
  display: flex;
  gap: 0.9rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.15rem 1.2rem;
  border-top: 3px solid var(--orange);
}

.benefit-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-family: var(--header);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.benefit h3 {
  color: #fff;
}

.benefit p {
  color: var(--muted);
  font-size: 1.05rem;
}

/* Story */
.story {
  background: #101010;
  padding: 3rem 0;
  border-bottom: 1px solid var(--line);
}

.story-inner {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.story-logo {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  box-shadow: 0 0 0 1px #333, 0 10px 24px rgba(0, 0, 0, 0.4);
  justify-self: center;
}

.story-copy p {
  color: var(--muted);
  max-width: 42rem;
}

.story-copy p + p {
  margin-top: 0.9rem;
}

/* Pricing */
.pricing {
  background: var(--charcoal);
  padding: 3rem 0;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.pricing .section-lead {
  color: var(--muted);
  max-width: 36rem;
  margin-inline: auto;
}

.pricing .section-lead + .section-lead {
  margin-top: 0.4rem;
  margin-bottom: 1.5rem;
}

.plan-grid {
  display: grid;
  gap: 1rem;
  margin: 0 auto 1.5rem;
  max-width: 900px;
}

.plan {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem 1.5rem;
  text-align: center;
}

.plan h3 {
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-hot);
  margin-bottom: 0.4rem;
}

.plan-price {
  margin: 0 0 0.35rem;
}

.plan-price .amount {
  font-family: var(--header);
  font-weight: 700;
  font-size: 2.6rem;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1;
}

.plan-price .per {
  display: block;
  color: var(--steel);
  font-size: 0.95rem;
  margin-top: 0.2rem;
}

.plan-meta {
  color: var(--muted);
  font-weight: 600;
  margin: 0;
}

.pricing-notes {
  color: var(--muted);
  max-width: 36rem;
  margin: 0 auto 0.6rem;
  font-size: 1.05rem;
}

/* FAQ */
.faq {
  background: #101010;
  padding: 3rem 0;
  border-bottom: 1px solid var(--line);
}

.faq-inner {
  max-width: 760px;
  margin-inline: auto;
}

.pricing .section-lead,
.pricing-notes,
.benefit h3,
.story-copy h2 {
  text-wrap: balance;
}

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 0.2rem 0;
}

.faq-list summary {
  font-family: var(--header);
  font-weight: 600;
  font-size: 1.15rem;
  cursor: pointer;
  list-style: none;
  padding: 0.95rem 1.8rem 0.95rem 0;
  position: relative;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--orange);
  font-family: var(--header);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1;
}

.faq-list details[open] summary::after {
  content: "–";
}

.faq-list summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.faq-list details p {
  color: var(--muted);
  padding: 0 0 1.1rem;
  margin: 0;
}

/* Bottom CTA */
.bottom-cta {
  padding: 3rem 0;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.bottom-cta-inner {
  max-width: 640px;
}

.bottom-cta p {
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.bottom-cta .waitlist {
  margin-inline: auto;
  justify-content: center;
}

/* Footer */
.site-footer {
  padding: 1.6rem 0 1.8rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

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

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.footer-name {
  font-family: var(--header);
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
}

.footer-by,
.footer-test {
  margin: 0;
  color: var(--steel);
  font-size: 0.92rem;
}

/* Desktop layout */
@media (min-width: 860px) {
  .brand img {
    width: 56px;
    height: 56px;
  }

  .brand-name {
    font-size: 1.25rem;
  }

  .hero {
    padding: 3.2rem 0 3.5rem;
  }

  .hero-inner {
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
  }

  .phone {
    width: 290px;
    margin: 0;
  }

  .benefit-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.15rem;
  }

  .benefit {
    grid-column: span 2;
  }

  /* Center the last two of five cards */
  .benefit:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .benefit:nth-child(5) {
    grid-column: 4 / span 2;
  }

  .story-inner {
    grid-template-columns: 160px 1fr;
    gap: 2.2rem;
    max-width: 900px;
  }

  .story-logo {
    width: 160px;
    height: 160px;
    justify-self: start;
  }

  .plan-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
  }
}

@media (min-width: 600px) and (max-width: 859px) {
  .benefit-grid {
    grid-template-columns: 1fr 1fr;
  }

  .benefit:last-child {
    grid-column: 1 / -1;
  }

  .plan-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .story-inner {
    grid-template-columns: 120px 1fr;
    align-items: start;
  }

  .story-logo {
    justify-self: start;
  }
}

/* Narrow phones: keep the name on one line; the hero form is the CTA */
@media (max-width: 559px) {
  .header-link {
    display: none;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .brand-name {
    font-size: 1.02rem;
    white-space: nowrap;
  }

  .waitlist {
    flex-direction: column;
    max-width: none;
  }

  .waitlist input[type="email"],
  .waitlist button {
    width: 100%;
    flex: 1 1 auto;
  }
}

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