/* home.css
   Homepage styles, responsive from phones to wide monitors.
   Expects the colour variables (--red-1, --red-2, --white-1, --white-2, --cream-1, --black-1) in layout.css. */

/* ---------- Global ---------- */

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

body {
  margin: 0;
  padding: 0;
  background-color: var(--white-2);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  overflow-x: hidden;
}

main {
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: var(--white-1);
}

h1,
h2,
h3,
p {
  margin: 0;
  padding: 0;
}

h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
}

h2 {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.1;
}

h3 {
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.25;
}

p {
  font-size: clamp(15px, 1.1vw, 17px);
  max-width: 60ch;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
button:hover {
  cursor: pointer;
}

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

/* ---------- Nav ---------- */

nav {
  width: 100vw;
  height: 75px;
  background-color: var(--red-1);
  position: fixed;
  top: 0;
  left: 0;
  box-shadow: 0px 4px 4px 4px rgba(0, 0, 0, 0.25);
  z-index: 100;   /* stays above positioned elements further down the page */
  display: grid;
  place-content: center;
}

#nav_logo_card {
  height: 60px;
  width: 120px;
  border-radius: 5px;
  background-color: white;
  display: grid;
  place-content: center;
}

#nav_logo {
  width: 100px;
  height: 50px;
}

/* ---------- Sections and containers ---------- */

/* Full-width background and vertical spacing */
.page-section {
  width: 100%;
  padding-block: clamp(60px, 8vw, 100px);
}

/* Centred content column. Horizontal padding only, so it never overrides section spacing. */
.content {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.cards {
  border-radius: 26px;
  border: 2px solid var(--white-2);
  background-color: #fff;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
  padding: clamp(20px, 2.5vw, 26px);
}

/* Buttons. The border sits inside the set size. */
.links {
  display: grid;
  place-content: center;
  height: 50px;
  padding: 0 24px;
  border: 4px solid transparent;
  border-radius: 999em;
  font-weight: 600;
  text-align: center;
}

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

#landing {
  padding-block: clamp(100px, 12vh, 120px) clamp(48px, 6vw, 80px); /* top clears the fixed nav */
  background-color: var(--white-1);
}

#landing > .content {
  display: flex;
  align-items: stretch;
  gap: clamp(32px, 4vw, 60px);
}

#landing-main {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
}

#landing-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}

#landing-hdr > span {
  color: var(--red-1);
}

#landing-para-text {
  max-width: 52ch;
}

#landing-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(12px, 2vw, 30px);
}

#lnk-design-enquiry,
#lnk-lc-products {
  width: min(300px, 100%);
  background-color: var(--red-1);
  color: #fff;
}

#lnk-browse-cat {
  width: min(250px, 100%);
  background-color: transparent;
  border-color: var(--red-2);
  color: var(--red-2);
}

#landing-card {
  flex: 0 1 40%;
  min-width: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

#lnk-lc-products {
  align-self: center;
}

/* ---------- Ticker ---------- */

#ticker {
  background-color: var(--black-1);
  padding-block: 20px;
}

#ticker-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  color: #fff;
}

.ticker-tags {
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 600;
  max-width: none;
}

/* ---------- What we do ---------- */

#gallery {
  background-color: var(--cream-1);
}

#gallery > .content {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 40px);
}

#gallery-hdr {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 560px;
}

#gallery-title {
  color: var(--red-1);
}

#gallery-tagline {
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 600;
  max-width: 60ch;
}

#gallery-body {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 32px);
}

.gallery-rows {
  min-height: 120px;
}

.gal-row-labels {
  color: var(--red-2);
}

.gal-item-rows {
  display: flex;
  justify-content: space-between;
  gap: 5px;
}

.gal-image-cards {
  width: fit-content;
  padding: 13px;
}

.gal-image-cards > img {
  max-height: 210px;
}

/* ---------- Why us ---------- */

#breakdown {
  background-color: var(--white-1);
}

#breakdown > .content {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 40px);
}

#breakdown-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 30px);
}

.breakdown-cards {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-height: 260px;
  text-align: center;
}

.breakdown-card-labels {
  color: var(--red-1);
}

.breakdown-card-para {
  max-width: none; /* let the text fill the card instead of the 60ch default */
}

/* ---------- Custom order ---------- */

#order {
  width: 100%;
  display: flex;
  justify-content: center;
  background-color: var(--red-1);
  color: #fff;
  padding-block: clamp(56px, 6vw, 80px);
}

#order-content {
  width: 100%;
  max-width: 1400px;
  background-color: transparent;
  box-shadow: none;
}

#order-title {
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 48px);
}

#order-body {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(32px, 4vw, 48px);
}

#order-text {
  flex: 1 1 280px;
  min-width: 0;
}

#order-tagline {
  font-size: clamp(20px, 2.4vw, 28px);
  margin-bottom: 20px;
}

#order-para {
  max-width: 46ch;
}

#order-steps-title {
  font-size: clamp(20px, 2.2vw, 26px);
  margin-top: clamp(28px, 3vw, 40px);
  margin-bottom: 16px;
}

#order-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  counter-reset: step;
}

#order-steps li {
  position: relative;
  counter-increment: step;
  padding-left: 44px;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.5;
}

#order-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background-color: #fff;
  color: var(--red-1);
  font-weight: 700;
  font-size: 15px;
}

#order-form {
  flex: 1.4 1 340px;
  min-width: 0;
}

.order-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
  padding: clamp(20px, 3vw, 32px);
  border-radius: 26px;
  background-color: #f4f4f4;
  color: #1a1a1a;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.form-field.full {
  grid-column: 1 / -1; /* spans both columns */
}

.form-field label {
  font-size: 15px;
  font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #bdbdbd;
  border-radius: 13px;
  background-color: #fff;
  font: inherit;
  font-size: 16px; /* 16px stops iPhones zooming in on focus */
  color: inherit;
}

.form-field textarea {
  min-height: 160px;
  resize: vertical;
}

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

.btn-submit {
  grid-column: 1 / -1;
  justify-self: center;
  min-width: min(220px, 100%);
  height: 50px;
  padding: 0 32px;
  border: none;
  border-radius: 999em;
  background-color: #2b2b2b;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-submit:hover {
  opacity: 0.85;
}

/* ---------- See our... ---------- */

#collections > .content {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 40px);
}

#collections-title {
  color: var(--red-1);
}

#collections-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}

.collection-cards {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(160px, 22vw, 240px);
  padding: clamp(16px, 2.5vw, 26px);
  border-radius: clamp(16px, 2vw, 26px);
  overflow: hidden;
  background-color: #3a3a3a;
  background-size: cover;
  background-position: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* Placeholder colours until real photos are added */
#collection-card-1 {
  background-image:
      url("../../images/plates/plate_sport_chiefs.png"),
      linear-gradient(135deg, var(--red-2) 0%, var(--red-1) 100%);
}

#collection-card-2 {
  background-image:
      url("../../images/plates/plate_dest_uluru.png"),
      linear-gradient(135deg, #b9b755 0%, #169155 100%);
}

#collection-card-3 {
  background-image:
      url("../../images/plates/plate_bus_dare_1.png"),
      linear-gradient(135deg, #3e43e0 0%, #917417 100%);
}

#collection-card-4 {
  background-image: linear-gradient(135deg, #5ac6e6 0%, #5a1454 100%);
}

/* Darkens the image so the white label stays readable */
.collection-cards::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.15));
}

.collection-cards:hover,
.collection-cards:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.collection-card-labels {
  position: relative; /* sits above the overlay */
  color: #fff;
  font-size: clamp(18px, 2.6vw, 34px);
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .collection-cards {
    transition: none;
  }
}

/* ---------- Tablet and below ---------- */

@media (max-width: 1024px) {
  .collection-cards {
    min-height: 180px;
  }
}

@media (max-width: 960px) {
  .order-form {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  #landing > .content {
    flex-direction: column;
    justify-content: center;
  }

  #landing-main {
    flex: none;
    text-align: center;
  }
 

  #landing-links{
    justify-content: center;
  }

  #landing-card {
    flex: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  #landing-para,
  #l-c-para{
    place-self: center;

  }

  /* Gallery rows stay in one line above 900px, then wrap and centre */
  .gal-item-rows {
    flex-wrap: wrap;
    justify-content: center;
  }
}



/* ---------- Phones ---------- */

@media (max-width:836px) {
  #ticker-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    text-align: center;
  }
  
}

/* Honeypot: hidden from people, bots still fill it in */
.hp {
  position: absolute;
  left: -9999px;
}

/* Status message from js/form.js, under the submit button */
#order-status {
  grid-column: 1 / -1;
  text-align: center;
  min-height: 1.5em;
}

/* Order: text stacks above the form at the same width as the ticker change */
@media (max-width: 836px) {
  #order-body {
    flex-direction: column;
  }

  #order-text,
  #order-form {
    flex: none;
    width: 100%;
  }
}

@media (max-width: 640px) {
  #landing-links {
    flex-direction: column;
  }

  #lnk-design-enquiry,
  #lnk-browse-cat,
  #lnk-lc-products {
    width: 100%;
  }


  #breakdown-body {
    grid-template-columns: 1fr;
  }

  .breakdown-cards {
    min-height: 0;
  }

  #collections-body {
    grid-template-columns: 1fr;
  }

  /* Ticker: long tags span the full row, the two short ones share a row */


  #ticker-tag-1,
  #ticker-tag-4 {
    grid-column: 1 / -1;
  }
}
