/* E.C. Gold Inc. — ecgold.net
   One stylesheet, mobile first. Breakpoints: 720px (tablet), 1024px (desktop). */

:root {
  --ink: #1E1C1D;
  --gold: #C9A24A;
  --gold-deep: #A9852F;
  --paper: #F6F2EA;
  --stone: #E4DCCD;
  --white: #FFFFFF;
  --ink-soft: #4A4547;        /* secondary text on light backgrounds (AA on paper/white) */
  --paper-soft: #CFC8BC;      /* secondary text on ink (AA) */

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --space: clamp(72px, 10vw, 128px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--gold-deep); }
h1, h2, h3 { font-weight: 800; line-height: 1.08; letter-spacing: -.025em; margin: 0; }
p { margin: 0 0 1em; }
address { font-style: normal; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-ink :focus-visible, .site-footer :focus-visible { outline-color: var(--gold); }

.sr-only {
  position: absolute !important; 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: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--white); padding: 12px 18px; font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  font: 600 .8125rem/1 var(--font); letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; border: 2px solid transparent; border-radius: 0;
  cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn-gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-deep); border-color: var(--gold-deep); color: var(--white); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.btn-outline:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-ink { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-ink:hover { background: transparent; color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--stone);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255,255,255,.88); backdrop-filter: blur(8px); }
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: block; flex: none; }
.brand img { width: 132px; height: auto; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 10px 0 10px 10px; margin-right: -2px;
  font: 600 .75rem/1 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--ink);
  cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 22px; height: 2px; background: var(--ink); position: relative;
  transition: transform .25s var(--ease), background-color .25s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white); border-bottom: 1px solid var(--stone);
  padding: 8px var(--gutter) 24px;
}
@media (max-width: 719.98px) { .js .site-nav:not(.is-open) { display: none; } }
.site-nav a {
  display: block; padding: 14px 0;
  font-size: .8125rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; border-bottom: 1px solid var(--stone);
}
.site-nav li:last-child a { border-bottom: 0; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--gold-deep); text-decoration-thickness: 2px; text-underline-offset: .5em; }

/* Without JS the menu is simply shown inline */
.no-js .nav-toggle { display: none; }
.no-js .site-nav { position: static; padding: 0; border: 0; background: none; }
.no-js .site-nav ul { display: flex; gap: 18px; }
.no-js .site-nav a { border: 0; padding: 8px 0; font-size: .6875rem; }

@media (min-width: 720px) {
  .header-inner { height: 84px; }
  .brand img { width: 152px; }
  .nav-toggle { display: none; }
  .site-nav { display: block; position: static; padding: 0; border: 0; background: none; }
  .site-nav ul { display: flex; gap: clamp(24px, 3vw, 40px); }
  .site-nav a { padding: 8px 0; border: 0; font-size: .75rem; }
  .site-nav a:hover { text-decoration: underline; text-decoration-color: var(--gold-deep); text-underline-offset: .5em; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--white);
  isolation: isolate;
}
.hero-art { position: absolute; inset: 0; z-index: -1; }
.hero-art img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 78% 50%;
  opacity: .3;
}
.hero::after { /* keeps text legible where the artwork sits behind it */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(30,28,29,.92) 0%, rgba(30,28,29,.6) 55%, rgba(30,28,29,0) 100%);
}
.hero-inner { padding-top: clamp(88px, 14vw, 168px); padding-bottom: clamp(88px, 14vw, 168px); }
.hero .label { color: var(--gold); margin-bottom: 24px; }
.hero h1 { font-size: clamp(2.5rem, 7vw, 5.25rem); max-width: 11.5em; }
.hero-sub { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--paper-soft); max-width: 34em; margin: 28px 0 40px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

@media (min-width: 720px) {
  .hero-art img { opacity: .55; object-position: 100% 50%; }
}
@media (min-width: 1024px) {
  /* The artwork's left half is plain ink, so "contain" lets the type sit there untouched */
  .hero-art img { opacity: 1; object-fit: contain; object-position: 100% 50%; }
  .hero::after { display: none; }
  .hero-copy { max-width: 46%; }
  .hero h1 { font-size: clamp(3.25rem, 5vw, 4.5rem); }
}

/* ---------- Sections ---------- */
.section { padding: var(--space) 0; }
.section-paper { background: var(--paper); }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head .label { color: var(--ink-soft); margin-bottom: 16px; }
.section-title { font-size: clamp(2rem, 4.6vw, 3.5rem); }

/* ---------- Company cards ---------- */
.cards { display: grid; gap: clamp(56px, 8vw, 72px); }
.card-media { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.card-media picture { display: block; overflow: hidden; aspect-ratio: 1 / 1; background: var(--stone); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.03); }
.card-body { padding-top: 24px; }
.card-tag { color: var(--ink-soft); margin-bottom: 14px; }
.card-name { font-size: 1.5rem; letter-spacing: -.02em; margin-bottom: 14px; }
.card-name img { height: 56px; width: auto; }
.card-desc { color: var(--ink-soft); font-size: 1rem; max-width: 36em; }
.card-meta {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--stone);
}
.card-url { font-size: .875rem; color: var(--ink-soft); }
.link-caps {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .75rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; padding: 6px 0;
}
.link-caps::after { content: "→"; letter-spacing: 0; transition: transform .25s var(--ease); }
.link-caps:hover { text-decoration: underline; text-decoration-color: var(--gold-deep); text-underline-offset: .45em; }
.link-caps:hover::after { transform: translateX(4px); }

@media (min-width: 720px) and (max-width: 1023.98px) {
  .card { display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; align-items: center; }
  .card-body { padding-top: 0; }
}
@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .card { display: flex; flex-direction: column; }
  .card-body { display: flex; flex-direction: column; flex: 1; }
  .card-meta { margin-top: auto; }
  .card-desc { margin-bottom: 24px; }
}

/* ---------- Who we are ---------- */
.about { display: grid; gap: 24px; }
.about .label { color: var(--ink-soft); }
.about-text { font-size: clamp(1.1875rem, 2.1vw, 1.5rem); line-height: 1.55; font-weight: 400; letter-spacing: -.01em; max-width: 40em; }
.about-text p:last-child { margin-bottom: 0; }
@media (min-width: 1024px) {
  .about { grid-template-columns: 1fr 3fr; gap: 40px; }
  .about .label { padding-top: .6em; }
}

/* ---------- Why work with us (ink) ---------- */
.why { background: var(--ink); color: var(--white); }
.why .section-head .label { color: var(--paper-soft); }
.why-grid { display: grid; gap: 48px; counter-reset: why; }
.why-item { border-top: 1px solid rgba(255,255,255,.18); padding-top: 24px; }
.why-item .why-num { color: var(--gold); margin-bottom: 14px; }
.why-item h3 { font-size: 1.375rem; letter-spacing: -.015em; margin-bottom: 12px; line-height: 1.2; }
.why-item p { color: var(--paper-soft); margin: 0; font-size: 1rem; }
@media (min-width: 720px) { .why-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; } }

/* ---------- CTA band ---------- */
.cta { background: var(--stone); text-align: center; padding: clamp(80px, 11vw, 136px) 0; }
.cta h2 { font-size: clamp(2.25rem, 5.5vw, 4rem); margin-bottom: 36px; }

/* ---------- Contact block ---------- */
.contact-grid { display: grid; gap: 40px; }
.contact-col h3, .contact-col .label { color: var(--ink-soft); margin-bottom: 14px; }
.contact-col p, .contact-col address, .contact-col li { font-size: 1rem; margin: 0; }
.contact-col a { text-decoration-color: var(--stone); }
.contact-col a:hover { text-decoration-color: var(--gold-deep); }
.hours li { display: flex; justify-content: space-between; gap: 16px; max-width: 280px; }

.newsletter { margin-top: clamp(56px, 8vw, 88px); padding-top: 40px; border-top: 1px solid var(--stone); display: grid; gap: 20px; }
.newsletter h3 { font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.2; }
.newsletter p { color: var(--ink-soft); margin: 8px 0 0; font-size: 1rem; }
.inline-form { display: flex; gap: 0; max-width: 520px; width: 100%; }
.inline-form input { flex: 1; min-width: 0; border-right: 0; }
.inline-form .btn { flex: none; }
.form-status { min-height: 1.6em; font-size: .9375rem; font-weight: 600; margin: 10px 0 0; }
.form-status.is-error { color: #A12A1F; }

@media (min-width: 720px) {
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .newsletter { grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; }
  .newsletter-form { justify-self: end; width: 100%; max-width: 520px; }
}

/* ---------- Forms ---------- */
input, textarea, select {
  font: inherit; font-size: 1rem; color: var(--ink);
  width: 100%; min-height: 52px; padding: 12px 16px;
  background: var(--white); border: 1px solid #8F877D; border-radius: 0;
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
input:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--ink); }
input[type="checkbox"] {
  width: 20px; height: 20px; min-height: 0; padding: 0; flex: none; margin: 2px 0 0;
  border: 1.5px solid var(--ink); display: grid; place-content: center; cursor: pointer;
}
input[type="checkbox"]::before { content: ""; width: 10px; height: 10px; transform: scale(0); background: var(--ink); transition: transform .12s; }
input[type="checkbox"]:checked::before { transform: scale(1); }

.field { display: grid; gap: 8px; }
.field label, .field legend { font-size: .75rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.req { color: #A12A1F; }
.field-hint { font-size: .9375rem; color: var(--ink-soft); margin: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset legend { padding: 0; margin-bottom: 12px; }
.checks { display: grid; gap: 12px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Contact page ---------- */
.page-head { background: var(--paper); padding: clamp(64px, 10vw, 120px) 0 clamp(48px, 7vw, 80px); }
.page-head .label { color: var(--ink-soft); margin-bottom: 20px; }
.page-head h1 { font-size: clamp(2.5rem, 6.4vw, 4.75rem); max-width: 12em; }
.page-head p { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: 34em; margin: 24px 0 0; }

.contact-layout { display: grid; gap: 64px; }
.form-grid { display: grid; gap: 24px; }
.form-alert { padding: 16px 20px; background: #FBEDEA; border-left: 4px solid #A12A1F; margin-bottom: 8px; font-size: 1rem; }
.form-alert[hidden] { display: none; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form-actions p { margin: 0; font-size: .9375rem; color: var(--ink-soft); }

.contact-aside { display: grid; gap: 32px; align-content: start; }
.contact-aside .label { color: var(--ink-soft); margin-bottom: 10px; }
.contact-aside p, .contact-aside address { margin: 0; }
.map { aspect-ratio: 4 / 3; background: var(--stone); border: 0; width: 100%; height: auto; filter: grayscale(.35); }

@media (min-width: 720px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-2 { grid-column: span 2; }
}
@media (min-width: 1024px) {
  .contact-layout { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 80px; }
  .contact-aside { position: sticky; top: 112px; }
}

/* ---------- Simple pages (thank-you, 404) ---------- */
.simple { min-height: 62vh; display: flex; align-items: center; background: var(--paper); }
.simple .wrap { padding-top: var(--space); padding-bottom: var(--space); }
.simple .label { color: var(--ink-soft); margin-bottom: 20px; }
.simple h1 { font-size: clamp(2.5rem, 6.4vw, 4.75rem); max-width: 12em; }
.simple p { font-size: 1.1875rem; color: var(--ink-soft); max-width: 34em; margin: 24px 0 40px; }
.simple .actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper-soft); padding: 64px 0 40px; font-size: .9375rem; }
.footer-top { display: grid; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.14); }
.footer-logo img { width: 140px; height: auto; }
.footer-top address { color: var(--paper-soft); }
.footer-top a { color: var(--white); text-decoration-color: rgba(255,255,255,.3); }
.social { display: flex; gap: 10px; }
.social a {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid rgba(255,255,255,.28); color: var(--white);
  transition: background-color .2s, border-color .2s, color .2s;
}
.social a:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 28px; font-size: .875rem; }
.footer-bottom p { margin: 0; }
.footer-brandline { letter-spacing: .2em; text-transform: uppercase; font-size: .75rem; font-weight: 600; color: var(--gold); }
@media (min-width: 720px) {
  .footer-top { grid-template-columns: auto 1fr auto; align-items: center; gap: 48px; }
}

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .card:hover .card-media img { transform: none; }
}

@media print {
  .site-header, .site-nav, .hero-art, .newsletter, .social, .map { display: none !important; }
  .hero, .why, .site-footer { background: none; color: var(--ink); }
}

/* ---------- Additions ---------- */
.btn-outline-ink { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline-ink:hover { background: var(--ink); color: var(--white); }
.field-optional { font-weight: 400; letter-spacing: .05em; text-transform: none; color: var(--ink-soft); }
.contact-aside a { text-decoration-color: var(--stone); }
.contact-aside a:hover { text-decoration-color: var(--gold-deep); }
.field .check { font-size: 1rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.social { flex-wrap: wrap; }
.social a { display: inline-flex; gap: 10px; width: auto; padding: 0 14px; font-size: .875rem; text-decoration: none; }
