/* ========== Base / reset ========== */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

:root {
  --card-height-desktop: 360px;

  /* Soft outline color (grey, blended) */
  --outline-grey: rgba(180, 180, 180, 0.65);
  --outline-grey-soft: rgba(180, 180, 180, 0.35);
  --outline-grey-edge: rgba(180, 180, 180, 0.30);

  /* Premium motion settings */
  --lift: 10px;
  --press: 2px;
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-soft: 0 10px 22px rgba(0,0,0,0.14);
  --shadow-strong: 0 18px 40px rgba(0,0,0,0.20);
}

body {
  font-family: Arial, sans-serif;
  background: #ededed;
  color: #111;
  line-height: 1.5;
}

/* ========== Layout helpers ========== */
.container {
  width: min(1100px, 100% - 32px);
  margin: 0 auto;
}

/* ========== Header ========== */
.site-header {
  position: relative;
  height: 88px;
  overflow: visible;
}

.header-bg {
  position: absolute;
  inset: 0;

  background-image: url("assets/header.jpeg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center -40px;

  transform: scaleX(-1);
  z-index: 0;
}

.header-inner {
  position: relative;
  z-index: 1;

  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 16px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 240px;
  width: auto;
  display: block;
}

/* Nav */
.nav {
  display: flex;
  gap: 14px;
}

.nav a {
  color: #fff;
  font-weight: bold;
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
}

/* Hamburger default (desktop hidden) */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 26px;
  color: #fff;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* ========== Hero ========== */
.hero {
  padding: 56px 0;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.1;
}

.hero p {
  margin: 0 0 18px;
  font-size: 16px;
  color: #333;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 14px;
  border-radius: 10px;
}

.btn.primary {
  background: #111;
  color: #fff;
}

.btn.ghost {
  border: 2px solid #111;
  color: #111;
}

/* ========== Image sections ("cards") ========== */
.section {
  position: relative;
  padding: 80px 0;

  /* Premium base */
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  z-index: 0;

  /* premium motion: background zoom on hover */
  transform: scale(1);
  transition: transform 500ms var(--ease-premium), filter 500ms var(--ease-premium);
}

.section > .container {
  position: relative;
  z-index: 1;
}

/* Products — white text by default (homepage look) */
.section-products { color: #fff; }
.section-products::before { background-image: url("assets/products.jpg"); }

/* About — black text (homepage look) */
.section-about { color: #111; }
.section-about::before { background-image: url("assets/about.jpeg"); }

/* Contact — white text by default (homepage look) */
.section-contact { color: #fff; }
.section-contact::before { background-image: url("assets/contact.jpeg"); }

/* Bold text on cards */
.section-products,
.section-about,
.section-contact {
  font-weight: 700;
}

/* Whole-card link (homepage) */
.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* Focus ring looks premium */
.card-link:focus-visible {
  outline: 3px solid rgba(255,255,255,0.80);
  outline-offset: 6px;
  border-radius: 14px;
}

/* ========== Subpage: bottom “two cards” grid ========== */
.subcards {
  padding: 50px 0 70px;
}

.subcards h2 {
  margin: 0 0 14px;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.mini-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 44px 22px;

  color: #fff;
  font-weight: 700;

  min-height: 220px;

  /* Premium base */
  box-shadow: var(--shadow-soft);
}

.mini-card::before {
  content: "";
  position: absolute;
  inset: 0;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  z-index: 0;

  transform: scale(1);
  transition: transform 500ms var(--ease-premium);
}

.mini-card > .mini-inner {
  position: relative;
  z-index: 1;
}

.mini-card a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.mini-card a:focus-visible {
  outline: 3px solid rgba(255,255,255,0.80);
  outline-offset: 6px;
  border-radius: 14px;
}

/* Mini-card variants */
.mini-products { color: #fff; }
.mini-products::before { background-image: url("assets/products.jpg"); }

.mini-about { color: #111; }
.mini-about::before { background-image: url("assets/about.jpeg"); }

.mini-contact { color: #fff; }
.mini-contact::before { background-image: url("assets/contact.jpeg"); }

/* ========== Readable main body section ========== */
.page-body {
  padding: 40px 0 70px;
}

.body-panel {
  background: #f9f9f9;
  color: #111;
  padding: 26px;
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

.body-panel h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.body-panel p {
  margin: 0 0 14px;
  font-weight: 400;
  font-size: 16px;
  color: #222;
}

.body-panel p:last-child {
  margin-bottom: 0;
}

/* ========== Footer ========== */
.footer {
  background: #f5f5f5;
  padding: 18px;
  text-align: center;
  color: #333;
}

/* ========== Softer blended outline (grey) ========== */
.text-outline-black {
  color: #111 !important;
  text-shadow:
    0 0 2px var(--outline-grey),
    0 0 6px var(--outline-grey-soft),
    1px 1px 0 var(--outline-grey-edge),
    -1px -1px 0 var(--outline-grey-edge);
}

/* Apply outline to ALL about.jpeg uses (main about card + mini about card anywhere) */
.section-about,
.mini-about {
  color: #111;
  text-shadow:
    0 0 2px var(--outline-grey),
    0 0 6px var(--outline-grey-soft),
    1px 1px 0 var(--outline-grey-edge),
    -1px -1px 0 var(--outline-grey-edge);
}

/* ========== Premium motion system ========== */
/* Base transitions */
.section,
.mini-card {
  transition: transform 350ms var(--ease-premium), box-shadow 350ms var(--ease-premium);
  will-change: transform;
}

/* Desktop/laptop hover (true hover devices) */
@media (hover: hover) and (pointer: fine) {
  .section:hover,
  .mini-card:hover {
    transform: translateY(calc(-1 * var(--lift)));
    box-shadow: var(--shadow-strong);
  }

  .section:hover::before,
  .mini-card:hover::before {
    transform: scale(1.04);
  }
}

/* Mobile/touch “press” feedback */
.section:active,
.mini-card:active {
  transform: translateY(var(--press));
  box-shadow: 0 8px 16px rgba(0,0,0,0.16);
}

.section:active::before,
.mini-card:active::before {
  transform: scale(1.02);
}

/* If user taps a link inside the card, still show feedback */
.card-link:active,
.mini-card a:active {
  opacity: 0.98;
}

/* ========== Mobile ========== */
@media (max-width: 600px) {
  .site-header { height: 78px; }

  .header-inner {
    padding: 0 12px;
    gap: 10px;
    position: relative; /* anchor for absolute hamburger */
  }

  .brand-logo { height: 200px; }

  /* Hamburger: no pill, icon in upper-right */
  .nav-toggle {
    display: block;
    position: absolute;
    top: 6px;
    right: 6px;

    background: transparent;
    border: none;
    padding: 0;
    line-height: 1;
  }

  /* Dropdown: 50% transparent background, moved up under icon */
  .nav {
    position: absolute;
    top: 40px;
    right: 6px;

    background: rgba(0, 0, 0, 0.50);
    flex-direction: column;
    display: none;
    padding: 10px;
    gap: 8px;

    border-radius: 12px;
    z-index: 10;
    min-width: 180px;
  }

  .nav.is-open { display: flex; }

  .nav a {
    width: 100%;
    font-size: 13px;
    padding: 10px 10px;
  }

  .header-bg {
    background-position: center -70px;
  }

  /* Pull Explore up on mobile */
  .page-body {
    padding: 26px 0 30px;
  }

  .subcards {
    padding: 28px 0 50px;
  }

  /* Slightly reduce lift on mobile so it feels snappy */
  :root { --lift: 6px; }
}

/* Portrait-only logo shift */
@media (max-width: 600px) and (orientation: portrait) {
  .brand { transform: translateX(-25px); }
}

/* Portrait: card height reduced */
@media (orientation: portrait) {
  .section { padding: 48px 0; }
}

/* Landscape header image raise */
@media (max-width: 900px) and (orientation: landscape) {
  .header-bg { background-position: center -170px; }
}

/* ========== Desktop ========== */
@media (min-width: 900px) {
  .site-header { height: 104px; }
  .brand-logo { height: 260px; }

  .section { min-height: var(--card-height-desktop); }

  .hero {
    min-height: calc(var(--card-height-desktop) * 2);
    padding: 72px 0;
    display: flex;
    align-items: center;
  }

  .section-products,
  .section-about,
  .section-contact {
    font-size: 2em;
  }

  .section h2 {
    margin-top: 0;
    font-size: 1.2em;
  }

  .section p { font-size: 1em; }

  .hero h1 { font-size: 44px; }
  .hero p  { font-size: 18px; }

  .card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 44px;
  }

  .mini-card { min-height: 260px; }
  .body-panel { padding: 32px; }
  .body-panel p { font-size: 17px; }
}

/* ========== Page-specific image overrides ========== */
.page-products .section-products::before {
  background-image: url("assets/products2.jpg");
}

.page-contact .section-contact::before {
  background-image: url("assets/contact2.jpeg");
}

/* Subpage MAIN cards: force black text + soft grey outline on their title card only */
.page-products .section-products,
.page-contact .section-contact,
.page-about .section-about {
  color: #111;
  text-shadow:
    0 0 2px var(--outline-grey),
    0 0 6px var(--outline-grey-soft),
    1px 1px 0 var(--outline-grey-edge),
    -1px -1px 0 var(--outline-grey-edge);
}
