/* =========================================================
   AX Racing Tech — Modern Base CSS (v2025)
   - Design tokens (CSS variables)
   - Fluid responsive (clamp)
   - Flex/Grid layout (tanpa float)
   - Dark mode & reduced motion
   - A11y focus states
   NOTE: Kompatibel dengan struktur HTML lama (kelas dipertahankan)
========================================================= */

/* --------------------------
   0) Design Tokens
--------------------------- */
:root {
  /* Colors */
  --bg: #ffffff;
  --surface: #0b0b0b;
  --surface-2: #111111;
  --text: #161616;
  --text-2: #4a4a4a;
  --muted: #b3b3b3;
  --line: #e9e9e9;
  --accent: #ba0000;
  --accent-2: #ff2a2a;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.08);
  --shadow-md: 0 6px 20px rgba(0,0,0,.12);
  --shadow-lg: 0 18px 40px rgba(0,0,0,.18);

  /* Radius */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-full: 999px;

  /* Spacing scale (fluid) */
  --space-1: clamp(6px, 0.35vw, 8px);
  --space-2: clamp(10px, 0.7vw, 14px);
  --space-3: clamp(14px, 1vw, 18px);
  --space-4: clamp(18px, 1.4vw, 24px);
  --space-5: clamp(24px, 2vw, 32px);
  --space-6: clamp(32px, 3vw, 48px);
  --space-7: clamp(48px, 5vw, 80px);
  --space-8: clamp(72px, 8vw, 120px);

  /* Typography */
  --ff: 'Rubik', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --fs-12: clamp(11px, .75vw, 12px);
  --fs-14: clamp(12px, .9vw, 14px);
  --fs-16: clamp(14px, 1.1vw, 16px);
  --fs-18: clamp(16px, 1.2vw, 18px);
  --fs-20: clamp(18px, 1.4vw, 20px);
  --fs-24: clamp(20px, 1.8vw, 24px);
  --fs-32: clamp(24px, 2.4vw, 32px);
  --fs-40: clamp(28px, 3vw, 40px);
  --fs-56: clamp(36px, 4vw, 56px);
  --fs-72: clamp(44px, 6vw, 72px);
  --lh: 1.6;

  /* Container */
  --container: 1170px;
  --container-narrow: 960px;
  --container-tight: 700px;

  /* Transitions */
  --tr-fast: 120ms ease;
  --tr: 220ms ease;
}

/* Dark Mode (auto) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --surface: #0f0f0f;
    --surface-2: #141414;
    --text: #f0f0f0;
    --text-2: #c9c9c9;
    --muted: #9f9f9f;
    --line: #2a2a2a;
    --accent: #ff3333;
    --accent-2: #ff5858;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* --------------------------
   1) Global Reset-ish
--------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff);
  font-size: var(--fs-18);
  line-height: var(--lh);
  font-weight: 400;
  color: var(--text-2);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--tr);
}
a:hover { color: var(--accent-2); }
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 60%, white);
  outline-offset: 2px;
  border-radius: 6px;
}

p, pre { margin: 0 0 var(--space-2); }

/* Containers */
.content-1170, .content-960, .content-570, .blog-holder, .footer-content,
.portfolio-load-content-holder {
  width: min(var(--container), 95vw);
  margin-inline: auto;
}
.content-960  { width: min(var(--container-narrow), 95vw); }
.content-570  { width: min(570px, 95vw); }

/* Loader */
.doc-loader {
  position: fixed; inset: 0; z-index: 99999;
  background: #000;
  display: grid; place-items: center;
}
.doc-loader img { width: 88px; height: 88px; }

/* Sections */
.section { position: relative; }
.section-wrapper {
  position: relative;
  padding-block: clamp(80px, 12vw, 160px) clamp(56px, 8vw, 120px);
}

/* Page Title ribbon (dipertahankan, dibersihkan) */
.page-title-holder{
  position:absolute; inset-block-start:0; inset-inline-start:0;
  background: var(--accent); width: 285px; height: 130px; z-index: 2;
  clip-path: polygon(0 0, 85% 0, 100% 100%, 0 100%);
}
.section h3.entry-title{
  color:#fff; font-size: var(--fs-16); text-align:center;
  letter-spacing: 2px; margin: 32px 0 0;
}

/* Typography helpers */
.medium-text { color: var(--text); font-size: var(--fs-56); font-weight: 700; line-height: 1.2; padding-bottom: var(--space-4); }
.title-description-up { font-size: var(--fs-14); letter-spacing: 2px; margin: 0; color: var(--text-2); }
.info-text { font-size: var(--fs-20); line-height: 1.9; color: var(--text); }
.info-code-title { font-size: var(--fs-14); letter-spacing: 2px; margin: 0; color: var(--text); }
.info-code-content, .info-code-content a { color: var(--muted); margin-bottom: var(--space-3); }

/* Social */
.social { display:inline-flex; gap: var(--space-2); font-size: 24px; }
.social a { color: var(--text) !important; opacity: .9; transition: opacity var(--tr); }
.social a:hover { opacity: .6; }

/* --------------------------
   2) Header / Nav (modern)
--------------------------- */
.header-holder{
  position: sticky; inset-block-start:0; z-index: 100;
  backdrop-filter: saturate(140%) blur(10px);
  background: color-mix(in srgb, var(--surface), transparent 30%);
  border-bottom: 1px solid var(--line);
}
.menu-wrapper{
  width: min(1450px, 98vw);
  min-height: 72px;
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--space-3);
}
.header-logo{ display:flex; align-items:center; gap: var(--space-2); }
.header-logo img{ width: 88px; height: 50px; object-fit: contain; }

.menu-holder{
  display: flex; align-items: center; gap: var(--space-2);
}

/* Main menu (sm-clean compatible) */
#header-main-menu { display: block; }
.main-menu, .sm-clean { display:flex; gap: var(--space-2); align-items:center; padding: var(--space-2) 0; background: transparent; }
.sm-clean li{ margin:0; list-style:none; }
.sm-clean li a.menu-item-link{
  color:#fff; font-size: var(--fs-14);
  letter-spacing: .5px; padding: .75rem 1rem; border-radius: var(--r-sm);
  transition: background var(--tr), color var(--tr);
}
body .sm-clean li a:hover,
body .sm-clean li.active > a,
body .sm-clean li.current_page_item > a{
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
/* Dropdown */
.sm-clean ul{
  background: #000;
  padding: .5rem 0;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}
.sm-clean ul a{ font-size: var(--fs-13); line-height: 1.2; padding: .6rem .9rem; }

/* Mobile Toggle */
.toggle-holder{ display:none; position: relative; }
#toggle{ display:grid; gap:6px; }
#toggle div{ width: 24px; height: 2px; background:#fff; transition: transform var(--tr-fast); }
#toggle.on .second-menu-line{ transform: translateX(-8px); }

/* Mobile Nav */
@media (max-width: 1020px){
  .toggle-holder{ display:block; }
  .menu-holder{
    position: fixed; inset-block-start:72px; inset-inline-end:0;
    width:min(82vw, 320px); height: calc(100dvh - 72px);
    background: #000; flex-direction: column; align-items: stretch;
    padding: var(--space-4) var(--space-3); gap:0;
    transform: translateX(100%); transition: transform var(--tr);
    overflow:auto;
  }
  .menu-holder.show{ transform: translateX(0); }
  .sm-clean{ flex-direction: column; align-items: stretch; gap: 4px; }
  .sm-clean li a{ padding: .9rem 1rem; }
}

/* --------------------------
   3) Buttons
--------------------------- */
a.button, .blog-item-holder a.item-button, .contact-form input[type=submit]{
  display:inline-flex; align-items:center; justify-content:center;
  gap: .5rem; min-height: 44px;
  padding: .65rem 1.4rem;
  color:#fff; background: var(--accent); border:2px solid var(--accent);
  border-radius: var(--r-full); font-size: var(--fs-14); letter-spacing: 2px;
  transition: background var(--tr), color var(--tr), transform var(--tr-fast), box-shadow var(--tr);
  box-shadow: var(--shadow-sm);
}
a.button:hover,
.blog-item-holder a.item-button:hover,
.contact-form input[type=submit]:hover{
  background: transparent; color: var(--accent); transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
a.button-dot{
  position:relative; font-size: var(--fs-16);
}
a.button-dot span{ margin-inline-start: 2.6rem; transition: transform var(--tr); }
a.button-dot:hover span{ transform: translateX(-6px); }
a.button-dot::before{
  content:""; position:absolute; inset-block:-7px auto; inset-inline-start:0;
  width: 30px; height: 30px; border:2px solid #fff; border-radius: var(--r-full);
  transition: all var(--tr);
}
a.button-dot:hover::before{
  width: calc(100% + 30px); height: 50px; border-radius: var(--r-full);
  inset-block:-16px auto;
}

/* --------------------------
   4) Utility Layout (Grid/Flex)
--------------------------- */
/* Modern pengganti float columns */
.columns{
  --gap: clamp(14px, 2vw, 24px);
  display:grid; gap: var(--gap);
  grid-template-columns: repeat(12, 1fr);
  align-items: start;
}
.one       { grid-column: 1 / -1; }
.one_half  { grid-column: span 6; }
.one_third { grid-column: span 4; }
.two_third { grid-column: span 8; }
.one_fourth{ grid-column: span 3; }
.three_fourth{ grid-column: span 9; }
.last{}

/* full-bleed variants */
.margin-0 > * img{ width:100%; height:auto; }

/* Responsif kolom */
@media (max-width: 1020px){
  .columns{ grid-template-columns: repeat(6, 1fr); }
  .one_half,.one_third,.two_third,.one_fourth,.three_fourth{ grid-column: 1 / -1; }
}

/* --------------------------
   5) Sliders (owl minimal tweaks)
--------------------------- */
.image-slider-wrapper{ margin-bottom: var(--space-2); }
.owl-theme .owl-dots{ padding-top: var(--space-3); line-height:0; }
.owl-theme .owl-dots .owl-dot{ border:2px solid #000; margin:3px; border-radius: 999px; }
.owl-theme .owl-dots .owl-dot span{
  width: 14px; height: 14px; background: rgba(255,255,255,.5); border-radius:999px;
  transition: all var(--tr);
}
.owl-theme .owl-dots .owl-dot:hover span{ background:#fff; }
.owl-theme .owl-dots .owl-dot.active{ background:#000; }
.owl-theme .owl-dots .owl-dot.active span{ background:transparent; }

.text-slider-wrapper{
  background: #000; color:#fff;
  font-size: var(--fs-20); line-height: 1.7;
  padding: clamp(28px, 8vw, 130px);
  border-radius: var(--r-lg);
}
.text-slide-content{ margin-bottom: var(--space-4); }
.text-slider-wrapper img.text-slide-img{
  inline-size: 70px; block-size: 70px; border-radius: 999px; margin-inline-end: var(--space-3);
}

/* --------------------------
   6) Hero (Home)
--------------------------- */
#home{
  min-height: calc(100dvh - 72px);
  display:grid; place-items:center;
  background: center/cover no-repeat url("images/axbanner.png");
}
#home .section-wrapper{ padding: 0; }
h1.big-text{
  color:#fff; font-size: var(--fs-72); line-height: 1.2; margin: 0 0 var(--space-4);
  text-shadow: 0 6px 24px rgba(0,0,0,.5);
}

/* --------------------------
   7) Themed Sections
--------------------------- */
#services{
  background: var(--surface) left bottom / auto no-repeat url("images/on_black_left.png");
  color:#fff;
}
#about{
  background: var(--bg) right center / auto no-repeat url("images/on_white_right.png");
}
#clients{
  background: center/cover no-repeat url("images/quote_image_01.jpg");
}
#news{
  background: var(--bg) left center / auto no-repeat url("images/on_white_left.png");
}
#pricing{
  background: var(--bg) right bottom / auto no-repeat url("images/on_white_right.png");
}
#team{
  background: #000 left center / auto no-repeat url("images/on_black_left.png");
  color:#fff;
}
#millstones{
  background: #000 left bottom / auto no-repeat url("images/on_black_left.png");
  color:#fff;
}

/* --------------------------
   8) Blog Cards (ringkas)
--------------------------- */
.blog-holder{ width: min(var(--container), 95vw); }
.blog-item-holder{
  margin-block: var(--space-6);
  text-align: center;
}
.blog-item-holder .post-thumbnail{
  overflow:hidden; border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.post-thumbnail-image{ transition: transform var(--tr), opacity var(--tr); }
.post-thumbnail-image:hover{ transform: scale(1.03); opacity:.95; }

.blog-item-holder h2.entry-title{
  font-weight: 700; font-size: var(--fs-40);
  line-height: 1.2; letter-spacing: -0.02em; margin: var(--space-3) 0 var(--space-2);
}
.blog-item-holder h2.entry-title a{ color: var(--text) !important; }

.blog-item-holder .excerpt{
  width: min(var(--container-tight), 95%);
  margin-inline: auto; margin-bottom: var(--space-3);
  color: var(--text-2);
}

.blog-item-holder .entry-date.published,
.blog-item-holder .cat-links{
  display:inline-flex; gap: .4rem; align-items:center;
  font-size: var(--fs-12); letter-spacing: 2px; text-transform: uppercase; color: var(--muted);
}

/* --------------------------
   9) Portfolio Grid (CSS Grid)
--------------------------- */
.grid{
  --gap: clamp(10px, 1.6vw, 24px);
  display:grid; gap: var(--gap);
  grid-template-columns: repeat(12, 1fr);
}
.grid-item{ position: relative; overflow:hidden; border-radius: var(--r-md); box-shadow: var(--shadow-md); }
.grid-item img{ width:100%; height:auto; display:block; }
.grid-item .entry-holder{ text-align:center; background: var(--bg); padding: var(--space-4) var(--space-3); }

.grid-item.p_one_fourth{ grid-column: span 3; }
.grid-item.p_one_half{ grid-column: span 6; }
.grid-item.p_three_fourth{ grid-column: span 9; }
.grid-item.p_one{ grid-column: 1 / -1; }

@media (max-width: 1020px){
  .grid{ grid-template-columns: repeat(6, 1fr); }
  .grid-item.p_one_fourth,
  .grid-item.p_one_half,
  .grid-item.p_three_fourth{ grid-column: 1 / -1; }
}

/* Hover overlay text */
.grid-item a.item-link::after{
  content:""; position:absolute; inset:0; background:#000; opacity:0;
  transition: opacity var(--tr);
}
.portfolio-text-holder{
  position:absolute; inset-block-end: 32px; inset-inline-start:32px;
  color:#fff; opacity:0; transform: translateY(8px);
  transition: transform var(--tr), opacity var(--tr);
}
.grid-item a.item-link:hover::after{ opacity:.28; }
.grid-item a.item-link:hover .portfolio-text-holder{ opacity:1; transform: translateY(0); }
.portfolio-title{ font-size: var(--fs-24); color: #f0f0f0; margin:0; }
.portfolio-desc{ font-size: var(--fs-12); letter-spacing: 2px; color:#e0e0e0; margin: 4px 0 0; }

/* --------------------------
   10) Pricing
--------------------------- */
.pricing-wrapper{ padding-inline: 8%; }
.pricing-table{
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--space-5) var(--space-4) var(--space-4);
  max-width: 360px; margin-inline: auto; position: relative;
  text-align: left; box-shadow: var(--shadow-sm);
}
.pricing-table-title{ color: var(--text); font-size: var(--fs-20); font-weight: 600; margin-bottom: var(--space-3); }
.pricing-table-price{ font-size: clamp(44px, 6vw, 72px); line-height: 1; color: var(--accent); font-weight: 800; }
.pricing-table-desc{ font-size: var(--fs-14); letter-spacing: 2px; color: var(--muted); }
.pricing-table ul{ list-style:none; padding:0; margin: var(--space-3) 0 0; }
.pricing-table li{ padding-block: .55rem; color: var(--text); display:flex; gap:.6rem; align-items:baseline; }

/* --------------------------
   11) Team
--------------------------- */
.member{ text-align:center; margin: var(--space-6) 0; }
.member img{ width: min(700px, 100%); border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
.member-info{
  width: min(520px, 90%); background: #fff; color:#000; padding: clamp(28px, 7vw, 64px);
  margin: calc(-40px) auto 0; border-radius: var(--r-lg); position: relative; z-index: 2; text-align:left;
  box-shadow: var(--shadow-lg);
}
.member-postition{ font-size: var(--fs-14); letter-spacing: 2px; margin:0; color:#333; }
.member-name{ font-size: var(--fs-40); font-weight: 800; line-height: 1.3; margin: var(--space-2) 0 var(--space-3); }
.member-social-holder{
  background: var(--accent); color:#fff; display:inline-flex; gap: var(--space-2);
  padding: .9rem 1.6rem; border-radius: var(--r-full);
  position: absolute; inset-inline-start: 50%; transform: translateX(-50%); inset-block-end: -22px;
}

/* --------------------------
   12) Skills
--------------------------- */
.skills-holder{ margin: var(--space-4) 0; }
.skill-holder{ margin-bottom: var(--space-3); }
.skill-percent{ font-size: var(--fs-32); font-weight: 400; width: 96px; display:inline-block; }
.skill{
  width: 100%; height: 8px; background: color-mix(in srgb, #cacaca 30%, transparent);
  border-radius: 999px; overflow:hidden;
}
.skill-fill{ height:100%; background: var(--text); }

/* --------------------------
   13) Single / Post
--------------------------- */
.single .site-content{ background: var(--bg); }
.single h1.entry-title{
  font-weight: 800; font-size: var(--fs-40); line-height: 1.2;
  color: var(--text); text-align:center; width: min(720px, 95%); margin: var(--space-4) auto var(--space-2);
}
.single-post-featured-image{
  text-align:center; width: min(1300px, 95%); margin-inline:auto; padding-bottom: var(--space-4);
}
.single .entry-content{
  font-size: var(--fs-16); line-height: 1.9; color: var(--text);
  width: min(760px, 95%); margin-inline:auto;
}
.single .nav-links{
  display:flex; justify-content: center; gap: var(--space-2);
  margin: var(--space-4) 0 var(--space-5);
}
.single .nav-links > a{ background: var(--accent); color:#fff !important; padding: .9rem 1.1rem; border-radius: var(--r-full); }

/* --------------------------
   14) Contact
--------------------------- */
.contact-form{
  width: min(900px, 100%); margin-inline:auto; font-size: var(--fs-20); color: var(--text);
}
.contact-form input[type=text],
.contact-form input[type=email],
.contact-form textarea{
  width:100%; background: transparent; color: var(--text);
  font-family: var(--ff); font-weight: 500; font-size: var(--fs-16);
  padding: .65rem .2rem; margin-bottom: var(--space-3);
  border: 0; border-bottom: 2.5px solid currentColor;
}
.contact-form textarea{ min-height: 160px; resize: vertical; }

/* --------------------------
   15) Footer
--------------------------- */
.footer{
  color:#fff; text-align:center;
  background: var(--surface-2);
  padding-block: var(--space-6) var(--space-5);
}
.footer a{ color:#fff; }
.footer-logo img{ width: 88px; height: 50px; margin-bottom: var(--space-3); }
.footer-mail{ font-size: var(--fs-32); font-weight: 800; line-height:1; margin-bottom: var(--space-3); }
.social-holder{ display:flex; justify-content:center; gap: var(--space-2); margin-bottom: var(--space-3); }
.footer-content{ width: min(900px, 100%); }

/* --------------------------
   16) Responsive tweaks
--------------------------- */
@media (max-width: 1366px){
  .pricing-wrapper{ padding-inline: 5%; }
}
@media (max-width: 767px){
  .section-wrapper{ padding-block: clamp(56px, 12vw, 100px) clamp(28px, 8vw, 60px); }
  .page-title-holder{ width: 220px; height: 100px; }
  .footer-mail{ font-size: var(--fs-24); }
  .text-slider-wrapper{ width: 90%; }
  h1.big-text{ font-size: var(--fs-56); }
}
@media (max-width: 420px){
  .page-title-holder{ width: 200px; }
}

/* --------------------------
   17) Helpers / States
--------------------------- */
.hide{ display:none !important; }
.center{ text-align:center !important; }
.m-auto{ margin-inline:auto !important; }
.max-w-tight{ width: min(var(--container-tight), 95%); margin-inline:auto; }
.border{ border:1px solid var(--line); border-radius: var(--r-md); }
.card{ background: var(--bg); border:1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
