/* Plastic Pal — plain CSS, light only. No Tailwind, no theme toggle. */

/* Palette is sampled from the logo artwork, not invented: --paper is the
   logo's own background (#fdfbf8) and --ink is its ink (#232220). The logo is
   monochrome, so the site is too — there is no brand color to pull from. */
:root {
  color-scheme: light;

  --ink: #232220;
  --ink-soft: #6b655c;
  /* Values below are the lightest that still clear WCAG AA on both --paper and
     --paper-alt. Lightening them for looks reintroduces unreadable text. */
  --ink-faint: #6f6d69; /* 5.00:1 / 4.62:1 — body text minimum is 4.5:1 */
  --paper: #fdfbf8;
  --paper-alt: #f6f2ea;
  --rule: #e7e1d6; /* decorative dividers and card edges only */
  --field-border: #8f8c87; /* 3.24:1 / 3.00:1 — form controls need 3:1 */
  --accent: #232220;
  --accent-hover: #000000;
  --focus: rgba(35, 34, 32, 0.18);
  --error: #a5341f;
  --error-bg: #fdf1ee;
  --ok: #3f6212;
  --ok-bg: #f4f7ec;

  --measure: 62rem;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  margin: 0 auto;
  max-width: var(--measure);
  padding: 0 1.5rem;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
}

/* Hero — the logo is the h1, so there's no separate header. */
.hero {
  padding: 3.5rem 0 4rem;
}

.hero h1 {
  margin: 0;
}

.logo {
  display: block;
  width: clamp(230px, 34vw, 330px);
  height: auto;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 46rem;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Sections */
.section {
  border-top: 1px solid var(--rule);
  padding: 4rem 0;
}

.section-alt {
  background: var(--paper-alt);
}

.section h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

/* Product cards */
.cards {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--paper);
  padding: 1.75rem;
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.card p {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
}

.card-link {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

.section-intro {
  margin: 0.75rem 0 0;
  max-width: 40rem;
  color: var(--ink-soft);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .contact-grid {
    grid-template-columns: 5fr 7fr;
    gap: 4rem;
  }
}

.contact-grid p {
  color: var(--ink-soft);
  max-width: 34rem;
}

/* Form */
.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--field-border);
  border-radius: 8px;
  background: var(--paper);
  padding: 0.65rem 0.8rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  resize: vertical;
  min-height: 8rem;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus);
}

#submit-btn {
  margin-top: 0.5rem;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 0.7rem 1.4rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 550;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

#submit-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

#submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Honeypot — off-screen rather than display:none, so bots still fill it */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#form-status {
  margin-bottom: 1rem;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
}

#form-status.hidden {
  display: none;
}

/* Shown while a submit is slow because the API is cold-starting. */
#form-status.is-info {
  background: var(--paper);
  border: 1px solid var(--field-border);
  color: var(--ink-soft);
}

#form-status.is-success {
  background: var(--ok-bg);
  border: 1px solid var(--ok);
  color: var(--ok);
}

#form-status.is-error {
  background: var(--error-bg);
  border: 1px solid var(--error);
  color: var(--error);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
  font-size: 0.875rem;
  color: var(--ink-faint);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  margin-right: 1rem;
  text-decoration: none;
}

.footer-inner a:last-child {
  margin-right: 0;
}

.footer-inner a:hover {
  text-decoration: underline;
}
