/* Layout for the ARAYOLA website. Colours and fonts come from arayola-web.css. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; line-height: 1.6; font-size: 16px;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.25; font-weight: 500; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; color: var(--teal); }
p { margin: 0 0 1em; }

.wrap {
  width: min(1120px, 100% - 2.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  margin-inline: auto;
}
.narrow { max-width: 760px; }
.stack > * + * { margin-top: 1.4rem; }
.muted { color: #8a919c; }
.lead { font-size: 1.1rem; color: #d6dae0; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.78rem;
  color: var(--teal); margin-bottom: 0.8rem;
}
.eyebrow a { text-decoration: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--bg-raised);
}
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.co { text-decoration: none; }
.co-name { font-size: 15px; }
.co-name.small { font-size: 13px; }
.site-nav { margin-left: auto; display: flex; gap: 0.3rem; }
.site-nav a {
  color: var(--text); text-decoration: none; padding: 0.45rem 0.8rem;
  border-radius: var(--radius); font-size: 0.92rem;
}
.site-nav a:hover { background: var(--teal); color: var(--text); }
.site-nav a.current { color: var(--teal); box-shadow: inset 0 -2px 0 var(--teal); }
.site-nav a.current:hover { color: var(--text); }
.nav-toggle, .nav-toggle-label { display: none; }

/* Buttons */
.button {
  display: inline-block; padding: 0.7rem 1.3rem; border-radius: var(--radius);
  text-decoration: none; font-size: 0.95rem; letter-spacing: 0.04em;
}
.button:hover { color: var(--text); }
.button-outline {
  background: transparent; border: 1px solid var(--teal); color: var(--teal);
}
.button-outline:hover { background: var(--teal); color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }

/* Home: logo only, centred in the viewport */
.home-center { position: fixed; inset: 0; display: grid; place-items: center; }
.home-logo { display: block; width: 100px; height: 100px; object-fit: contain; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Sections */
.section { padding: 3.5rem 0; }
.section-raised { background: var(--bg-raised); }
.section-title {
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--teal); margin-bottom: 1.6rem;
}
.page-head { padding: clamp(2rem, 6vw, 3.5rem) 0 1rem; border-bottom: 1px solid var(--bg-raised); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 1.2rem; }
.card {
  display: block; padding: 1.4rem; border-radius: var(--radius);
  background: var(--bg-raised); border: 1px solid #323946;
  color: var(--text); text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.section-raised .card { background: var(--bg); }
.card:hover { border-color: var(--teal); transform: translateY(-2px); color: var(--text); }
.card p { color: #c3c8cf; font-size: 0.92rem; margin-bottom: 0; }
.card .meta { color: #8a919c; font-size: 0.8rem; margin-bottom: 0.5rem; }
.card-img {
  display: block; width: calc(100% + 2.8rem); max-width: none; margin: -1.4rem -1.4rem 1rem;
  aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0;
}
.card-img.placeholder {
  display: grid; place-items: center; background: var(--bg-teal-deep);
}
.card-img.placeholder img { width: 64px; opacity: 0.5; }

.service { padding-left: 1.2rem; border-left: 2px solid var(--teal); scroll-margin-top: 90px; }

/* Project page */
.project-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; align-items: start; }
.facts {
  margin: 0; padding: 1.2rem 1.4rem; background: var(--bg-raised);
  border-radius: var(--radius); border-top: 2px solid var(--teal);
}
.facts dt { color: #8a919c; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; }
.facts dd { margin: 0 0 0.9rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 1.2rem; margin-top: 2.5rem; }
.gallery figure { margin: 0; }
.gallery img { border-radius: var(--radius); display: block; }
.gallery figcaption { color: #8a919c; font-size: 0.85rem; margin-top: 0.4rem; }

/* Contact */
.contact-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; align-items: start; }
.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: 0.35rem; font-size: 0.85rem; color: #c3c8cf; }
.form input, .form textarea {
  font: inherit; color: var(--text); background: var(--bg-raised);
  border: 0; border-bottom: 1px solid var(--line-input); border-radius: var(--radius) var(--radius) 0 0;
  padding: 0.65rem 0.75rem;
}
.form input:focus, .form textarea:focus { outline: none; border-bottom-color: var(--teal); }
.form .button { justify-self: start; }
.form-error { color: #fff; background: var(--red-deep); border-left: 3px solid var(--red); padding: 0.7rem 1rem; margin: 0; }
.hp { position: absolute; left: -9999px; }
.contact-details { padding: 1.4rem; background: var(--bg-raised); border-radius: var(--radius); }
.contact-details h2 { font-size: 1rem; color: var(--teal); }

/* Footer */
.site-footer { border-top: 1px solid var(--bg-raised); padding-top: 2rem; font-size: 0.88rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.footer-row p { margin: 0.4rem 0 0; }
.footer-contact { display: grid; gap: 0.3rem; text-align: right; }
.footer-base { padding: 1.5rem 0; font-size: 0.78rem; }

/* Small screens */
@media (max-width: 820px) {
  .project-layout, .contact-layout { grid-template-columns: 1fr; gap: 2rem; }
  .section { padding: 2.5rem 0; }
  .footer-contact { text-align: left; }

  .nav-toggle-label {
    display: block; margin-left: auto; width: 38px; height: 38px; cursor: pointer; position: relative;
  }
  .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
    position: absolute; left: 8px; width: 22px; height: 2px; background: var(--text); content: "";
  }
  .nav-toggle-label span { top: 18px; }
  .nav-toggle-label span::before { left: 0; top: -7px; }
  .nav-toggle-label span::after { left: 0; top: 7px; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; padding: 0.5rem 1.25rem 1rem;
    background: var(--bg); border-bottom: 1px solid var(--bg-raised);
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-nav a { padding: 0.75rem 0.8rem; }
}

@media (max-width: 380px) {
  .co-name { font-size: 12.5px; }
  .co-logo { height: 30px; }
  .header-row { gap: 0.8rem; }
}
