/*
 * ============================================================
 *  TOP 1 OIL — GLOBAL COMPONENT STYLES
 *  File: assets/css/global.css
 *  Version: 2.1
 *  Depends on: tokens.css
 *
 *  PURPOSE
 *  Reusable global design system classes for the entire site.
 *
 *  IMPORTANT
 *  - Never hardcode colours or spacing values
 *  - Always use CSS variables from tokens.css
 *  - Elementor should handle layout only
 *  - CSS handles design system + components
 *
 *  SECTIONS
 *  1.  Base / Reset
 *  2.  Layout Utilities
 *  3.  Hero System
 *  4.  Buttons
 *  5.  Badges
 *  6.  Alerts
 *  7.  Cards
 *  8.  Typography
 *  9.  Utilities
 * ============================================================
 */



/* ============================================================
   1. BASE / RESET
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--t1-font-body);
  font-size: var(--t1-text-body);
  line-height: 1.6;
  color: var(--t1-neutral-600);
  background: var(--t1-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

a:hover {
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}



/* ============================================================
   2. LAYOUT UTILITIES
   ============================================================ */

/* Standard content container */
.t1-container {
  width: 100%;
  max-width: var(--t1-max-width);
  margin-inline: auto;
  padding-inline: var(--t1-gutter-desktop);
}

@media (max-width: 1024px) {
  .t1-container {
    padding-inline: var(--t1-gutter-tablet);
  }
}

@media (max-width: 767px) {
  .t1-container {
    padding-inline: var(--t1-gutter-mobile);
  }
}

/* Section spacing */
.t1-section {
  padding-block: var(--t1-space-20);
}

@media (max-width: 767px) {
  .t1-section {
    padding-block: var(--t1-space-12);
  }
}

/* Full viewport breakout */
.t1-full-width {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc((100% - 100vw) / 2) !important;
}



/* ============================================================
   3. HERO SYSTEM
   Reusable responsive hero with R2 <picture> support.

   Confirmed DOM structure from page inspection:
   div.elementor-element.e-con-full.t1-hero.e-flex.e-con.e-parent
     div.elementor-element.elementor-widget-html
       div.elementor-widget-container
         <picture class="t1-hero-bg">
     div.elementor-element.e-con-full.e-con.e-child  ← text
   ============================================================ */

/* HERO CONTAINER
   Elementor sets --min-height: initial on .e-con.
   We need higher specificity than .e-con to override it.
   .e-con has specificity (0,1,0) — we use .t1-hero.t1-hero
   which is (0,2,0) — beats it without Elementor classes
   and without !important. */
.t1-hero.t1-hero {
  --min-height: clamp(600px, 82vh, 1100px);
  --overflow: hidden;
  --position: relative;
  position: relative !important;
  overflow: hidden !important;
  min-height: clamp(600px, 82vh, 1100px) !important;
}

/* MOBILE — 78svh excludes browser address bar height */
@media (max-width: 767px) {
  .t1-hero.t1-hero {
    --min-height: 78svh;
    min-height: 78svh !important;
  }
}

/* HTML WIDGET — absolute, fills entire hero behind content */
.e-con.t1-hero > .elementor-widget-html,
.e-con-full.t1-hero > .elementor-widget-html,
[class*="elementor-element"].t1-hero > .elementor-widget-html {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0;
}

/* ELEMENTOR WRAPPER — single .elementor-widget-container confirmed */
.t1-hero > .elementor-widget-html > .elementor-widget-container {
  width: 100%;
  height: 100%;
}

/* PICTURE */
.t1-hero .t1-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* IMAGE — object-fit: cover replicates background-size: cover */
.t1-hero .t1-hero-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* OVERLAY — light default for pale/sky images */
.t1-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--t1-overlay-light);
  z-index: 1;
  pointer-events: none;
}

/* DARK MODIFIER — add t1-hero-dark class for complex images */
.t1-hero.t1-hero-dark::after {
  background: var(--t1-overlay-dark);
}

/* CONTENT — child containers and text sit above overlay */
.t1-hero > .e-con,
.t1-hero > .e-con-full {
  position: relative;
  z-index: 2;
}



/* ============================================================
   4. BUTTONS
   ============================================================ */

.t1-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 9px 18px;

  border: none;
  border-radius: var(--t1-radius-md);

  font-family: var(--t1-font-body);
  font-size: var(--t1-text-btn-md);
  font-weight: 500;
  line-height: 20px;
  letter-spacing: var(--t1-tracking-btn);

  cursor: pointer;

  transition:
    background-color var(--t1-transition),
    color var(--t1-transition),
    border-color var(--t1-transition),
    transform var(--t1-transition);
}

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

/* PRIMARY */
.t1-btn-primary {
  background: var(--t1-red);
  color: var(--t1-white);
}

.t1-btn-primary:hover {
  background: var(--t1-red-dark);
  color: var(--t1-white);
}

/* SECONDARY */
.t1-btn-secondary {
  background: var(--t1-blue);
  color: var(--t1-white);
}

.t1-btn-secondary:hover {
  background: var(--t1-blue-dark);
  color: var(--t1-white);
}

/* ACCENT */
.t1-btn-accent {
  background: var(--t1-yellow);
  color: var(--t1-blue);
  font-weight: 600;
}

.t1-btn-accent:hover {
  background: var(--t1-yellow-dark);
}

/* OUTLINE RED */
.t1-btn-outline-red {
  background: transparent;
  border: 1.5px solid var(--t1-red);
  color: var(--t1-red);
}

.t1-btn-outline-red:hover {
  background: var(--t1-red);
  color: var(--t1-white);
}

/* OUTLINE BLUE */
.t1-btn-outline-blue {
  background: transparent;
  border: 1.5px solid var(--t1-blue);
  color: var(--t1-blue);
}

.t1-btn-outline-blue:hover {
  background: var(--t1-blue);
  color: var(--t1-white);
}

/* GHOST */
.t1-btn-ghost {
  background: transparent;
  border: 1px solid var(--t1-neutral-200);
  color: var(--t1-neutral-600);
}

.t1-btn-ghost:hover {
  background: var(--t1-neutral-50);
  color: var(--t1-neutral-900);
}

/* SMALL */
.t1-btn-sm {
  padding: 6px 12px;
  font-size: var(--t1-text-btn-sm);
  line-height: 16px;
}

/* LARGE */
.t1-btn-lg {
  padding: 13px 28px;
  font-size: var(--t1-text-btn-lg);
  line-height: 24px;
  font-weight: 600;
}



/* ============================================================
   5. BADGES
   ============================================================ */

.t1-badge {
  display: inline-flex;
  align-items: center;

  padding: 3px 10px;

  border-radius: var(--t1-radius-pill);

  font-family: var(--t1-font-body);
  font-size: var(--t1-text-btn-sm);
  font-weight: 600;
  line-height: 16px;
  letter-spacing: var(--t1-tracking-badge);
}

.t1-badge-red {
  background: var(--t1-red);
  color: var(--t1-white);
}

.t1-badge-blue {
  background: var(--t1-blue);
  color: var(--t1-white);
}

.t1-badge-yellow {
  background: var(--t1-yellow);
  color: var(--t1-blue);
}

.t1-badge-neutral {
  background: var(--t1-neutral-50);
  border: 1px solid var(--t1-neutral-200);
  color: var(--t1-neutral-600);
}

.t1-badge-dark {
  background: var(--t1-neutral-900);
  color: var(--t1-yellow);
}



/* ============================================================
   6. ALERTS
   ============================================================ */

.t1-alert {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 12px 16px;

  border-radius: var(--t1-radius-md);

  font-family: var(--t1-font-body);
  font-size: var(--t1-text-body);
  font-weight: 600;
  line-height: 20px;
}

.t1-alert::before {
  content: '';

  width: 8px;
  height: 8px;

  border-radius: 999px;

  flex-shrink: 0;
}

.t1-alert-error {
  background: var(--t1-error-bg);
  color: var(--t1-error-text);
}

.t1-alert-error::before {
  background: var(--t1-red);
}

.t1-alert-warning {
  background: var(--t1-warning-bg);
  color: var(--t1-warning-text);
}

.t1-alert-warning::before {
  background: var(--t1-yellow-dark);
}

.t1-alert-info {
  background: var(--t1-info-bg);
  color: var(--t1-info-text);
}

.t1-alert-info::before {
  background: var(--t1-blue);
}

.t1-alert-success {
  background: var(--t1-success-bg);
  color: var(--t1-success-text);
}

.t1-alert-success::before {
  background: var(--t1-success-accent);
}



/* ============================================================
   7. CARDS
   ============================================================ */

.t1-card {
  background: var(--t1-white);

  border: 1px solid var(--t1-neutral-200);
  border-radius: var(--t1-radius-lg);

  box-shadow: var(--t1-shadow-card);
}

/* ACCENT RED */
.t1-card-accent-red {
  border-left: 3px solid var(--t1-red);
}

/* ACCENT BLUE */
.t1-card-accent-blue {
  border-left: 3px solid var(--t1-blue);
}

/* SOLID BLUE */
.t1-card-blue {
  background: var(--t1-blue);
  color: var(--t1-white);
}

/* PRODUCT CARD */
.t1-product-card {
  background: var(--t1-blue);
  border-radius: var(--t1-radius-xl);
  box-shadow: var(--t1-shadow-card);
}



/* ============================================================
   8. TYPOGRAPHY
   ============================================================ */

.t1-display {
  font-family: var(--t1-font-display);
  font-size: var(--t1-text-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: var(--t1-tracking-display);
  color: var(--t1-neutral-900);
}

.t1-h1 {
  font-family: var(--t1-font-display);
  font-size: var(--t1-text-h1);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: var(--t1-tracking-h1);
  color: var(--t1-neutral-900);
}

.t1-h2 {
  font-family: var(--t1-font-display);
  font-size: var(--t1-text-h2);
  font-weight: 700;
  line-height: 1.3;
  color: var(--t1-neutral-900);
}

.t1-h3 {
  font-family: var(--t1-font-display);
  font-size: var(--t1-text-h3);
  font-weight: 500;
  line-height: 1.4;
  color: var(--t1-neutral-900);
}

.t1-body {
  font-family: var(--t1-font-body);
  font-size: var(--t1-text-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--t1-neutral-600);
}

/* HERO TITLE */
.t1-hero-title {
  font-family: var(--t1-font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  font-style: italic;
  line-height: 1.05;
  text-transform: uppercase;
  text-align: center;

  color: var(--t1-yellow);
}

/* HERO SUBTITLE */
.t1-hero-subtitle {
  max-width: 800px;
  margin-inline: auto;

  font-family: var(--t1-font-body);
  font-size: clamp(1rem, 2.5vw, 1.375rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.6;
  text-align: center;

  color: var(--t1-white);
}

/* LABEL */
.t1-label {
  font-family: var(--t1-font-ui);
  font-size: var(--t1-text-label);
  font-weight: 600;
  line-height: 15px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.t1-label-red {
  color: var(--t1-red);
}

.t1-label-blue {
  color: var(--t1-blue);
}

.t1-label-gray {
  color: var(--t1-neutral-400);
}



/* ============================================================
   9. UTILITIES
   ============================================================ */

/* TEXT ALIGN */
.t1-text-center {
  text-align: center;
}

.t1-text-left {
  text-align: left;
}

.t1-text-right {
  text-align: right;
}

/* FLEX */
.t1-flex {
  display: flex;
}

.t1-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* VISIBILITY */
.t1-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;
}

@media (max-width: 767px) {
  .t1-hide-mobile {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .t1-hide-desktop {
    display: none !important;
  }
}