:root {
  --dark: #1b1b1b;
  --dark-soft: #2b2b2b;
  --pink: #d31756;
  --orange: #f4801f;
  --gradient: linear-gradient(100deg, var(--orange) 0%, var(--pink) 100%);
  --text: #262626;
  --muted: #6b6b6b;
  --cream: #fdfdfc;
  --dot: #ccd0d5;
  --grey-wash: #e2e5e9;
  --ph-fill: #eef0f2;
  --ph-border: #d7dade;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header, .footer {
  flex-shrink: 0;
}

h1, h2, h3 { margin: 0; }

p, ul { margin: 0 0 0.55em; line-height: 1.4; }

ul { padding-left: 1.05em; }

li { margin-bottom: 2px; }

/* ============ HEADER ============ */

.header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--dark) 0%, var(--dark-soft) 100%);
  padding: clamp(4px, 0.5vw, 6px) clamp(20px, 5vw, 56px) clamp(12px, 1.5vw, 16px);
  display: flex;
  justify-content: center;
  z-index: 1;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.5vw, 36px);
  width: 100%;
  max-width: 1200px;
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  flex-shrink: 0;
}

.partner-logos {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(8px, 1.2vw, 14px);
  flex: 1; /* Forces both left and right groups to take up equal invisible space */
}

/* Pushes the left-hand logos flush against the center gap */
.header-row > .partner-logos:first-child {
  justify-content: flex-end;
}

/* Pushes the right-hand logos flush against the center gap */
.header-row > .partner-logos:last-child {
  justify-content: flex-start;
}

.partner-logo {
  display: block;
  line-height: 0;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.partner-logo img {
  display: block;
  height: clamp(20px, 2.4vw, 32px);
  width: auto;
  filter: grayscale(100%) opacity(60%); /* Makes them grey and slightly faded */
  transition: filter 0.3s ease; /* Adds a smooth fade effect */
}

/* Brings the color back when the user hovers over them */
.partner-logo:hover img {
  filter: grayscale(0%) opacity(100%);
}

/* shallow wave cut into the bottom edge, page-colour ellipse overlapping the panel */
.header::after {
  content: '';
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -18px;
  height: 32px;
  background: var(--cream);
  border-radius: 50%;
  z-index: 2;
}

.logo {
  position: relative;
  z-index: 3;
  display: block;
  width: auto;
  max-width: clamp(170px, 20vw, 230px);
  height: auto;
}

.tagline {
  position: relative;
  z-index: 3;
  margin: 0;
  white-space: nowrap;
  color: #f2f2f2;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: clamp(0.5rem, 0.75vw, 0.62rem);
}

/* ============ MAIN ============ */

.main {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  grid-template-rows: minmax(0, 1fr);
  column-gap: clamp(1.5rem, 3vw, 3.5rem);
  padding: clamp(10px, 1.5vw, 14px) clamp(20px, 5vw, 56px) 0;
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
  align-items: stretch;
}

.dot-field {
  position: absolute;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  top: 38%;
  bottom: 0;
  background-color: var(--grey-wash);
  background-image: radial-gradient(circle, var(--cream) 1.5px, transparent 1.7px);
  background-size: 15px 15px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 100%);
  z-index: 0;
}

.col-text, .col-media {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.col-text {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(10px, 1.6vh, 22px);
  min-width: 0;
  min-height: 0;
  height: 100%;
  margin-bottom: 0;
  padding-bottom: 0;
}

.info-sections {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: clamp(2px, 0.5vh, 7px);
  min-height: 0;
}

.text-block {
  position: relative;
  padding-left: 0px;
}

.text-body {
  position: relative;
  padding-left: 16px; 
}

.text-block h1,
.text-block h2 {
  color: var(--pink);
  /* Reduced min, scaling, and max sizes so they don't overpower the text */
  font-size: clamp(1.05rem, 1.6vw, 1.3rem); 
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 8px; /* Pulled this in slightly to match the smaller text size */
}

.tick {
  position: absolute;
  left: 0; /* Changed from -13px */
  top: 4px;
  bottom: 2px;
  width: 4px;
  background: repeating-linear-gradient(
    to bottom,
    var(--orange) 0px, var(--orange) 4px,
    transparent 4px, transparent 8px
  );
}

.text-block .brand-mission {
  font-size: clamp(1rem, 1.3vw, 1.15rem); 
  font-weight: 700; 
  line-height: 1.4;
  color: var(--text); 
  
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--ph-border); 
}

.text-block p,
.text-block li {
  font-size: clamp(0.9rem, 1.2vw, 1.15rem); /* Bumps the max size up to 1.15rem */
  line-height: 1.5; /* A standard, highly readable line height that nicely fills vertical space */
  color: var(--text);
}

.text-block p { margin: 0 0 0.45em; }
.text-block ul { margin: 0 0 0.45em; }
.text-block li { margin-bottom: 8px; }

.lead-time {
  font-weight: 700;
  margin-top: 4px;
}

/* Created-by card: second row of the col-text grid (auto height), so it
   always sits flush at the bottom of the left column, directly above
   the footer, regardless of how tall the info sections are. */

.created-by-ring-outer {
  margin: 0;
  align-self: stretch;
  background: var(--orange);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  padding: 4px 4px 0 4px;
}

.created-by-ring-mid {
  background: var(--pink);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  padding: 3px 3px 0 3px;
}

.created-by-panel {
  background: linear-gradient(160deg, var(--dark) 0%, var(--dark-soft) 100%);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  /* Balanced top and bottom padding to vertically center the text */
  padding: clamp(25px, 4vh, 45px) clamp(58px, 11vw, 115px) clamp(20px, 4vh, 35px);
  color: #fff;
  text-align: center;
}

.created-by-panel h3 {
  font-size: clamp(1.15rem, 2vw, 1.6rem); /* Increased min, scaling rate, and max size */
  font-weight: 800;
  margin-bottom: 8px; /* Slightly larger margin to match larger text */
}

/* ============ MEDIA COLUMN ============ */

.col-media {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  gap: 0;
  height: 100%;
  margin-bottom: 0;
  padding-bottom: 0;
}

.main-photo {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.detail-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
  margin-top: clamp(-70px, -8vw, -50px);
  position: relative;
  z-index: 2;
}

.ring-outer {
  width: clamp(135px, 10vw, 185px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--orange);
  padding: 5px;
  border: 3px solid var(--cream);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

.ring-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--pink);
  padding: 2px;
}

.detail-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}

.main-photo img,
.detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* back.jpeg has too much empty ceiling above the machine at a plain
   center crop — shift the visible window down to keep it centred */
.obj-pos-back {
  object-position: center 68%;
}

/* shared placeholder styling — plain, quiet, not a debug-looking box */
.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--ph-fill);
  border: 1px solid var(--ph-border);
}

.photo-placeholder span {
  color: #93989e;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 6px;
}

.ring-inner .photo-placeholder span {
  font-size: 0.6rem;
}

/* ============ FOOTER ============
   Just the contact band now — the bio card moved into the left column. */

.footer {
  width: 100%;
  background: var(--gradient);
  color: #fff;
  display: flex;
  justify-content: center;
  padding: clamp(16px, 2.4vh, 22px) clamp(20px, 5vw, 56px);
  /* forces a guaranteed tiny overlap with whatever sits above it, so
     sub-pixel rounding at odd viewport sizes can never leave a gap —
     invisible since the footer is opaque and the colours match */
  margin-top: -4px;
  position: relative;
  z-index: 5;
}

.bio-title {
  font-weight: 700;
  font-size: clamp(0.8rem, 0.95vw, 0.85rem);
  color: #ffffff; /* Changed to pure white */
  margin-bottom: 3px;
}

.bio {
  font-size: clamp(0.75rem, 0.85vw, 0.80rem);
  color: #ffffff; /* Changed to pure white */
  margin-bottom: 0;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  width: 100%;
  max-width: 1200px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-size: clamp(0.8rem, 1.05vw, 0.92rem);
  font-weight: 700;
  white-space: nowrap;
}

.contact-link:hover { text-decoration: underline; }

.icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* ============ RESPONSIVE ============
   Below this width we drop the compact single-screen constraint and
   let the page scroll naturally, restacking into one column. */

@media (max-width: 760px) {
  .page {
    height: auto;
    min-height: 100vh;
  }

  .detail-row {
      display: none;
    }

  .header-row {
    gap: 10px;
    align-items: center;
  }

  .created-by-ring-outer {
      margin-left: calc(-50vw + 50%);
      margin-right: calc(-50vw + 50%);
      width: 100vw;
      border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    }

  .created-by-panel {
      padding-left: 20px;
      padding-right: 20px;
    }

  .partner-logos {
    flex-direction: column;
    gap: 6px;
  }

  .partner-logo img {
    height: clamp(16px, 4vw, 22px);
  }

  .main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }

  .col-media {
    order: -1;
    display: flex;
    flex-direction: column;
    height: auto;
    gap: 22px;
    margin-bottom: 24px;
  }

  .col-text {
      /* This ensures the semi-circle is forced to the bottom */
      gap: 22px; 
    }

  .info-sections {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 22px;
  }

  .created-by-ring-outer {
      margin-top: 0;
    }

  .main-photo {
    height: clamp(180px, 48vw, 260px);
  }

  .dot-field { top: 55%; }

  .header {
    padding-bottom: clamp(46px, 9vw, 60px);
  }

  .header::after {
    bottom: -50px;
    height: 74px;
  }

  .footer {
    padding: 20px 24px;
  }
}

/* Shorter viewports (e.g. 1280x720 laptops): compress vertical rhythm
   so all four left-column sections comfortably fit. */
@media (min-width: 761px) and (max-height: 780px) {
  .logo {
    max-width: clamp(110px, 13vw, 150px);
  }

  .header {
    padding-top: clamp(8px, 1.2vw, 10px);
    padding-bottom: clamp(14px, 1.8vw, 18px);
  }

  .col-text {
    gap: clamp(6px, 1.4vh, 14px);
  }

  .text-block h1,
    .text-block h2 {
      font-size: clamp(0.88rem, 1.3vw, 1rem);
      margin-bottom: 5px;
    }

  .text-block p,
  .text-block li {
    font-size: clamp(0.7rem, 0.85vw, 0.78rem);
  }

  .text-block p,
  .text-block ul {
    margin: 0 0 0.35em;
  }
}
