/* Poulimenos Handmade — styles for the redesigned pages (index + legal pages) */

/* Colour and spacing tokens live in header.css (loaded first) */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 116px;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--green-dark);
}

:focus-visible {
  outline: 2px solid var(--green);
  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: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--charcoal);
  color: #fff;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
}

.h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.15;
  color: var(--title);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    box-shadow 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

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

/* Main action: green, like every other primary button on the site */
.btn-primary {
  background: var(--green);
  color: #fff;
  border: 1.5px solid var(--green);
  box-shadow: 0 10px 24px -14px rgba(20, 32, 28, 0.85);
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
  box-shadow: 0 14px 28px -14px rgba(20, 32, 28, 0.9);
}

/* Secondary action: outline that stays quieter than the primary on hover */
.btn-outline {
  background: transparent;
  color: var(--green);
  border: 1.5px solid var(--green);
}

.btn-outline:hover {
  background: rgba(30, 68, 54, 0.08);
  border-color: var(--green-dark);
  color: var(--green-dark);
}

.btn-green {
  background: var(--green);
  color: #fff;
  border: 0;
  font-weight: 700;
}

.btn-green:hover {
  background: var(--green-dark);
  color: #fff;
}

.btn-light {
  background: var(--brass-light);
  color: var(--forest);
  font-weight: 700;
}

.btn-light:hover {
  background: #d9b977;
  color: var(--forest);
}

/* ---------- Hero ---------- */

.hero-media {
  position: relative;
  height: clamp(300px, 40vw, 560px);
  overflow: hidden;
}

.hero-media picture {
  display: block;
  height: 100%;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
}

/* soft dark wash at the top: tames the bright whites and lets the header stand out */
.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(15, 22, 18, 0.16) 0%,
    rgba(15, 22, 18, 0.1) 45%,
    rgba(15, 22, 18, 0) 72%
  );
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(247, 244, 238, 0) 55%,
    rgba(247, 244, 238, 0.55) 78%,
    rgba(247, 244, 238, 0.92) 93%,
    var(--ground) 100%
  );
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 8px var(--gutter) clamp(56px, 7vw, 96px);
  text-align: center;
}

.hero-copy h1 {
  margin: 0;
  max-width: 860px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 46px);
  line-height: 1.15;
  color: var(--title);
  text-wrap: balance;
}

.hero-copy .lede {
  margin: 0;
  max-width: 500px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding-top: 8px;
}

@media (max-width: 520px) {
  .hero-actions {
    align-self: stretch;
    flex-direction: column;
  }
}

/* ---------- Products ---------- */

.products {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.products .container {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-block: clamp(56px, 7vw, 104px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
}

.section-head > div {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
}

.section-head p:not(.eyebrow) {
  margin: 0;
  max-width: 380px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.product-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

/* 4 → 2 → 1 columns, so a card is never left alone on a row */
@media (max-width: 1000px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .product-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.product-card .media {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sand);
}

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover img {
  transform: scale(1.04);
}

.product-card h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  color: var(--title-2);
  font-size: 22px;
  line-height: 1.2;
}

.product-card p {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.product-card .cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
}

.product-card:hover .cta {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Split sections (workshop, helmets) ---------- */

.split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px clamp(32px, 5vw, 80px);
  padding-block: clamp(56px, 7vw, 112px);
}

.split > * {
  min-width: 0;
}

.split-text {
  flex: 1 1 420px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.split-text p:not(.eyebrow) {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.workshop-gallery {
  flex: 1 1 480px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.workshop-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
}

.workshop-gallery .wide {
  grid-column: span 2;
  aspect-ratio: 16 / 10;
  object-position: 50% 45%;
}

.workshop-gallery .facade {
  object-position: 50% 30%;
}

.stats {
  display: grid;
  /* each column as wide as it needs; captions wrap when space is short, values never do */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  text-align: center;
  column-gap: clamp(28px, 4vw, 56px);
  row-gap: 16px;
  margin: 12px 0 0;
  padding-top: 24px;
  border-top: 1px solid #ddd7ca;
}

/* each figure centred in its own equal column */
.stats div {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  /* values share one top line; captions of any length hang below */
  justify-content: flex-end;
  gap: 4px;
}

.stats dt {
  max-width: 15em;
  text-wrap: balance; /* no single word left alone on the second line */
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-muted);
}

.stats dd {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(22px, 1.7vw, 24px);
  font-weight: 400;
  color: var(--brass);
  line-height: 1.15;
  white-space: nowrap;
}

/* phone: one figure at a time, full width, sliding by itself (site.js) with dots below */
.stats-dots {
  display: none;
}

@media (max-width: 600px) {
  .stats {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    column-gap: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .stats::-webkit-scrollbar {
    display: none;
  }

  .stats div {
    align-items: center;
    text-align: center;
    scroll-snap-align: center;
  }

  .stats dt {
    max-width: none;
    font-size: 14px;
  }

  .stats dd {
    font-size: 30px;
  }

  .stats-dots {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 10px;
  }

  .stats-dots button {
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .stats-dots button::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    margin: auto;
    border-radius: 50%;
    background: var(--line-strong);
    transition: background-color 0.2s ease, transform 0.2s ease;
  }

  .stats-dots button[aria-current="true"]::before {
    background: var(--brass);
    transform: scale(1.25);
  }

  .stats-dots button:focus-visible {
    outline: 2px solid var(--brass-light);
    outline-offset: 2px;
    border-radius: 50%;
  }
}

.helmets {
  background: var(--forest);
  color: #f3f1ea;
}

.helmets .h2 {
  color: #f3f1ea;
}

.helmets .eyebrow {
  color: var(--brass-light);
}

.helmets .split-text p:not(.eyebrow) {
  color: #cbd1c9;
}

.helmets figure {
  flex: 1 1 460px;
  margin: 0;
}

.helmets figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.helmets .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
}

.text-link-light {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 12px;
  color: #f3f1ea;
  font-weight: 700;
  text-underline-offset: 5px;
}

.text-link-light:hover {
  color: #fff;
}

/* ---------- Contact ---------- */

.contact {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-block: clamp(56px, 7vw, 112px);
}

.contact-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
}

.contact-intro p:not(.eyebrow) {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.quote-form {
  flex: 1.3 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(20px, 3vw, 36px);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.field .optional {
  font-weight: 400;
  color: var(--ink-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
}

.field textarea {
  padding: 12px 14px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.form-footer p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.form-status {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
}

.contact-side {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.channels {
  overflow: hidden;
}

.channels h3 {
  padding: 20px 24px 8px;
}

.channels ul {
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
}

.channels li + li a {
  border-top: 1px solid var(--sand);
}

.channels a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 0 24px;
  color: var(--ink);
  text-decoration: none;
}

.channels a:hover {
  background: var(--sand);
}

.channels svg {
  flex: none;
  color: var(--green);
}

.channels .label {
  flex: 1;
  font-weight: 600;
}

.channels .value {
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  text-align: right;
}

@media (max-width: 480px) {
  .channels a {
    gap: 10px;
    padding: 0 16px;
  }

  .channels .value {
    font-size: 14px;
  }
}

.visit {
  overflow: hidden;
}

.visit iframe {
  display: block;
  width: 100%;
  height: 280px;
  border: 0;
}

.visit-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}

.visit-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.visit-row svg {
  flex: none;
  margin-top: 2px;
  color: var(--green);
}

.visit-row strong {
  display: block;
}

.visit-row a {
  font-size: 15px;
  font-weight: 700;
}

.hours {
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.6;
}

.hours th {
  padding-right: 16px;
  text-align: left;
  vertical-align: top;
  font-weight: 600;
}

.hours .closed {
  color: var(--ink-muted);
}

/* ---------- Legal pages ---------- */

.legal-main {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(40px, 5vw, 72px) var(--gutter) clamp(64px, 7vw, 112px);
}

.breadcrumb {
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--ink-muted);
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
}

.legal-main h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  color: var(--title);
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.1;
}

.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.legal-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.legal-tabs a:hover {
  border-color: var(--charcoal);
}

.legal-tabs a[aria-current="page"] {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: #f7f6f1;
}

.legal-text {
  margin-top: 16px;
}

.legal-text h2 {
  margin: 40px 0 14px;
  font-family: var(--display);
  font-weight: 400;
  color: var(--title-2);
  font-size: 26px;
  line-height: 1.2;
}

.legal-text p {
  margin: 0 0 14px;
  font-size: 17px;
  line-height: 1.75;
  color: #33362f;
}

/* ---------- Mobile quick-contact bar ---------- */

.quick-bar {
  display: none;
}

@media (max-width: 720px) {
  .quick-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(20, 35, 28, 0.08);
  }

  .quick-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 56px;
    border-radius: 10px;
    background: var(--ground);
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
  }

  .quick-bar a svg {
    color: var(--green);
  }

  .quick-bar a.primary {
    background: var(--green);
    color: #fff;
  }

  .quick-bar a.primary svg {
    color: #fff;
  }

  body.has-quick-bar {
    padding-bottom: 84px;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* ---------- Contact page: map card under the title ---------- */

.map-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sand);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: clamp(280px, 34vw, 440px);
  border: 0;
}

/* Contact page: form and side cards end on the same line */

.contact-grid--even {
  align-items: stretch;
}

.contact-grid--even .contact-side > .visit {
  flex: 1 1 auto;
}

/* ---------- Hero photo settles in gently on load (keyframes in header.css) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-media img {
    animation: hero-settle 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
}

/* ---------- FAQ (homepage) ---------- */

.faq {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.faq-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px clamp(40px, 6vw, 96px);
  padding-block: clamp(56px, 7vw, 104px);
}

.faq-intro {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-intro p:not(.eyebrow) {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.faq-list {
  flex: 2 1 520px;
  min-width: 0;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 16px 4px;
  list-style: none;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

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

/* brass plus that turns into a minus */
.faq-item summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--brass), var(--brass)) center / 14px 2px no-repeat,
    linear-gradient(var(--brass), var(--brass)) center / 2px 14px no-repeat;
  transition: transform 0.25s ease, background-size 0.25s ease;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
  background-size: 14px 2px, 2px 0;
}

.faq-item summary:hover {
  color: var(--green);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--brass-light);
  outline-offset: 2px;
  border-radius: 4px;
}

.faq-answer {
  padding: 0 4px 20px;
}

.faq-answer p {
  margin: 0;
  max-width: 62ch;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.faq-link {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .faq-item summary::after {
    transition: none;
  }
}

/* Hero: discreet link for philharmonic bands under the buttons */
.hero-band-link {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 6px;
  min-height: 44px;
  padding: 0 8px;
  color: var(--ink-soft);
  font-size: 15px;
  text-decoration: none;
}

.hero-band-link strong {
  color: var(--brass);
  font-weight: 700;
}

.hero-band-link span {
  text-decoration: underline;
  text-decoration-color: var(--brass-light);
  text-underline-offset: 5px;
}

.hero-band-link svg {
  color: var(--brass);
  transition: transform 0.2s ease;
}

.hero-band-link:hover {
  color: var(--green);
}

.hero-band-link:hover svg {
  transform: translateX(3px);
}

/* ---------- Phone: buttons span the width, centred (helmets section, quote form) ---------- */

@media (max-width: 600px) {
  .helmets .actions {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .helmets .actions .btn,
  .text-link-light {
    justify-content: center;
  }

  .form-footer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .form-footer .btn {
    width: 100%;
  }

  .form-status {
    text-align: center;
  }
}
