/* ===== Shared pricing-row styles =====
     IDENTICAL in every row block (or paste once into site-level CSS).
     Each modifier class has exactly ONE meaning, so rows can't override each other:
       card:    --featured (wider 299px)  --saffron (yellow bg)
       lozenge: --blue  --saffron  --muted (sold out)
       price/per: --struck / --muted (sold out)      button: --disabled
  */
  .pricing-row {
    --pr-text: #292A2E;
    --pr-muted: #6C6F77;
    --pr-blue: #1868DB;
    --pr-white: #FFFFFF;

    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 61px;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    list-style: none;
    isolation: isolate;     /* keeps the hover ribbon (z-index:-1) behind the cards but above the section */
  }

  .pricing-row *,
  .pricing-row *::before,
  .pricing-row *::after {
    box-sizing: border-box;
  }

  /* Cards: flex-basis = design width, grow in proportion (299 : 239 : 239 : 239) */
  .pricing-row .pricing-card {
    position: relative;
    height: 299px;
    min-width: 0;
    background: var(--pr-white);
    flex: 239 1 239px;
    color: var(--pr-text);
    container-type: inline-size;   /* lets the price size itself to this card's width */
  }

  /* Width only: the wider card */
  .pricing-row .pricing-card--featured {
    flex: 299 1 299px;
  }

  /* Yellow card (Extended/Saffron/S100) */
  .pricing-row .pricing-card--saffron {
    background: #FFF5D4;
  }

  /* Lozenge (tag) - default is the neutral grey one */
  .pricing-row .pricing-lozenge {
    position: absolute;
    top: 30px;
    left: 30px;
    display: inline-flex;
    align-items: center;
    height: 20px;
    min-height: 20px;
    padding: 2px 4px;
    gap: 4px;
    border-radius: 4px;
    background: rgba(5, 21, 36, 0.06);
    border: 1px solid rgba(11, 18, 14, 0.14);
    color: var(--pr-text);
    font-family: 'Atlassian Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    font-feature-settings: 'liga' off, 'calt' off;
    white-space: nowrap;
  }
  .pricing-row .pricing-lozenge--blue {
    background: #CFE1FD;
    border-color: #8FB8F6;
    color: #123263;
  }
  .pricing-row .pricing-lozenge--saffron {
    background: #FCE4A6;
    border-color: #FBC828;
    color: #693200;
  }
  .pricing-row .pricing-lozenge--muted {
    color: #6B6E76;
  }

  /* Fine print under the lozenge */
  .pricing-row .pricing-fineprint {
    position: absolute;
    top: 62px;
    left: 30px;
    right: 30px;
    margin: 0;
    font-family: 'Charlie Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    color: #101214;
  }

  /* Price + "per pass" */
  .pricing-row .pricing-price-group {
    position: absolute;
    top: 102px;
    left: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
  }
  .pricing-row .pricing-price {
    margin: 0;
    font-family: 'Atlassian Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-style: normal;
    font-weight: 700;
    font-size: 48px;                 /* fallback for browsers without container units */
    /* Shrinks with the card: (card width - 60px padding) / 3.7, never above 48px or below 24px */
    font-size: clamp(24px, calc((100cqw - 60px) / 3.7), 48px);
    line-height: 52px;
    color: var(--pr-text);
    white-space: nowrap;
  }
  .pricing-row .pricing-price--struck,
  .pricing-row .pricing-price--struck s {
      color: #6B6E76;
      text-decoration-line: line-through;
      text-decoration-thickness: 0.06em;
      font-family: 'Atlassian Mono';
  }
  .pricing-row .pricing-per {
    margin: 0;
    font-family: 'Charlie Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.04px;
    text-transform: uppercase;
    color: var(--pr-text);
  }
  .pricing-row .pricing-per--muted {
    color: #6B6E76;
  }

  /* Primary button */
  .pricing-row .pricing-button {
--rf-comp-link-hover-color: #FFF;
    position: absolute;
    top: 229px;
    left: 30px;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 8px 22px;
    gap: 8px;
    background: var(--pr-blue);
    border: 2px solid var(--pr-blue);
    border-radius: 40px;
    color: var(--pr-white);
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    font-family: 'Charlie Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 20px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
  }
  .pricing-row .pricing-button:hover {
    background: #123263;   /* Blue 900, matches events.atlassian.com .btn-standard:hover */
    border: 2px solid #123263;
    color: #FFFFFF;
  }
  .pricing-row .pricing-button:focus-visible {
    outline: 2px solid #101214;
    outline-offset: 2px;
  }

  /* No underline on the button in any state (theme link styles can add one on hover/focus) */
  .pricing-row .pricing-button,
  .pricing-row .pricing-button:hover,
  .pricing-row .pricing-button:focus,
  .pricing-row .pricing-button:active,
  .pricing-row .pricing-button:visited {
    text-decoration: none !important;
  }

  /* Disabled ("Sold out") button - must stay after the hover rule above */
  .pricing-row .pricing-button--disabled,
  .pricing-row .pricing-button--disabled:hover {
    background: #F0F1F2;
    border-color: #F0F1F2;
    color: #B7B9BE;
    cursor: default;
  }

  /* "Prices increase soon"
     Pinned to the bottom (40px up, same spot as Figma's top: 239px for one line), so if it
     wraps it grows upward instead of running into the card's bottom edge. The font also
     shrinks with the card (16px down to 13px) so it stays on one line as long as it can
     and never goes past two lines. */
  .pricing-row .pricing-note {
    position: absolute;
    bottom: 40px;
    left: 30px;
    right: 30px;
    margin: 0;
    font-family: 'Charlie Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-weight: 400;
    font-size: 16px;                 /* fallback for browsers without container units */
    font-size: clamp(13px, calc((100cqw - 60px) / 10.2), 16px);
    line-height: 1.25;               /* 20px at 16px */
    color: var(--pr-muted);
  }

  /* Tablet (600px to 991px): two cards per row.
     In Figma the table is 12 grid cells wide: card (5 cells) + gap (2 cells) + card (5 cells).
     So each card is 5/12 of the row and the column gap is 2/12 (= 100% / 6), which keeps the left
     and right edge of every card on a grid line at any tablet width (the grid below uses
     content width / 12 as its cell width). The row gap stays 61px. */
@media (min-width: 600px) and (max-width: 991.98px) {
  .pricing-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 61px calc(100% / 6);
  }
  .pricing-row .pricing-card,
  .pricing-row .pricing-card--featured {
    flex: 0 1 calc(100% * 5 / 12);
    width: auto;
    max-width: calc(100% * 5 / 12);
  }
}

  /* Phones (under 600px): stack the cards */

  @media (max-width: 599px) {
    .pricing-row {
      flex-direction: column;
      gap: 61px;
    }
    .pricing-row .pricing-card,
    .pricing-row .pricing-card--featured {
      flex: none;
      width: 100%;
    }
  }

/* ===== Bundle row (Team pass bundle + Digital pass) =====
   Sits under the pricing row inside the same code block. Uses the "bundle-" prefix. */
  .bundle-row {
    --bd-text: #292A2E;
    --bd-black: #101214;
    --bd-muted: #6C6F77;
    --bd-blue: #1868DB;
    --bd-white: #FFFFFF;

    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 61px;
    width: 100%;            /* fills the section width */
    box-sizing: border-box;
    margin: 0;
    padding: 61px 0 0;      /* 61px space above the row (replaces the inline style) */
    isolation: isolate;     /* same as .pricing-row: hover ribbon stays behind the cards */
  }

  .bundle-row *,
  .bundle-row *::before,
  .bundle-row *::after {
    box-sizing: border-box;
  }

  /* Both cards stretch to fill the row, keeping the design ratio (599 : 539). */
  .bundle-row .bundle-card {
    position: relative;
    height: 419px;
    min-width: 0;
    background: var(--bd-white);
    color: var(--bd-text);
  }

  .bundle-row .bundle-card--team { flex: 599 1 599px; }
  .bundle-row .bundle-card--digital { flex: 539 1 539px; }

  /* Lozenge (tag) */
  .bundle-row .bundle-lozenge {
    position: absolute;
    top: 30px;
    left: 30px;
    display: inline-flex;
    align-items: center;
    height: 20px;
    min-height: 20px;
    padding: 2px 4px;
    gap: 4px;
    border-radius: 4px;
    font-family: 'Atlassian Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    font-feature-settings: 'liga' off, 'calt' off;
    white-space: nowrap;
  }

  .bundle-row .bundle-lozenge--saffron {
    background: #FCE4A6;
    border: 1px solid #FBC828;
    color: #693200;
  }

  .bundle-row .bundle-lozenge--blue {
    background: #CFE1FD;
    border: 1px solid #8FB8F6;
    color: #123263;
  }

  /* Fine print under the lozenge */
  .bundle-row .bundle-fineprint {
    position: absolute;
    top: 62px;
    left: 30px;
    right: 30px;
    margin: 0;
    font-family: 'Charlie Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    color: var(--bd-black);
  }

  /* Headline */
  .bundle-row .bundle-heading {
    margin: 0;
    font-family: 'Charlie Display', 'Charlie Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 32px;
    line-height: 36px;
    color: var(--bd-text);
  }

  .bundle-row .bundle-heading--abs {
    position: absolute;
    top: 102px;
    left: 30px;
    right: 30px;
  }

  /* Price + "per pass" (team card) */
  .bundle-row .bundle-price-group {
    position: absolute;
    top: 162px;
    left: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
  }

  .bundle-row .bundle-price {
    margin: 0;
    font-family: 'Atlassian Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-style: normal;
    font-weight: 700;
    font-size: 48px;
    line-height: 52px;
    color: var(--bd-text);
    white-space: nowrap;
  }

  .bundle-row .bundle-per {
    margin: 0;
    font-family: 'Charlie Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.04px;
    text-transform: uppercase;
    color: var(--bd-text);
  }

  /* Digital card: heading + body copy stacked */
  .bundle-row .bundle-copy {
    position: absolute;
    top: 102px;
    left: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .bundle-row .bundle-body {
    align-self: stretch;
    margin: 0;
    font-family: 'Charlie Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: var(--bd-black);
  }

  /* Primary button */
  .bundle-row .bundle-button {
    position: absolute;
    top: 302px;
    left: 30px;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 8px 22px;      /* 10px 24px minus the 2px border, so the size matches the design */
    gap: 8px;
    background: var(--bd-blue);
    border: 2px solid var(--bd-blue);
    border-radius: 40px;
    color: var(--bd-white);
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    font-family: 'Charlie Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 20px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
  }

  /* Hover matches events.atlassian.com .btn-standard:hover */
  .bundle-row .bundle-button:hover {
    background: #123263;
    border: 2px solid #123263;
    color: #FFFFFF;
  }
.bundle-row .bundle-button:focus {
     color: #FFFFFF;
}

  .bundle-row .bundle-button:focus-visible {
    outline: 2px solid #101214;
    outline-offset: 2px;
  }

  /* Disclaimer under the button (team card) */
  .bundle-row .bundle-disclaimer {
    position: absolute;
    top: 358px;
    left: 30px;
    right: 30px;
    margin: 0;
    font-family: 'Charlie Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    color: var(--bd-muted);
  }

  /* "Registration opens..." (digital card) */
  .bundle-row .bundle-note {
    position: absolute;
    top: 312px;
    left: 30px;
    right: 30px;
    margin: 0;
    font-family: 'Charlie Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    color: var(--bd-muted);
  }

  /* Small screens: stack the cards */
  @media (max-width: 991.98px) {
    .bundle-row {
      flex-direction: column;
      gap: 61px;
    }
    .bundle-row .bundle-card--team,
    .bundle-row .bundle-card--digital {
      flex: none;
      width: 100%;
    }
  }

  /* No underline on the button in any state (theme link styles can add one) */
  .bundle-row .bundle-button,
  .bundle-row .bundle-button:hover,
  .bundle-row .bundle-button:focus,
  .bundle-row .bundle-button:active,
  .bundle-row .bundle-button:visited {
    text-decoration: none !important;
  }


/* ===== Tablet (600px to 991px): match the Figma tablet frame (768px) =====
   Differences from desktop in the Figma tablet CSS:
   - prices are 44px / 48px (desktop 48px / 52px); "Per pass" lands at top 158px
   - "Prices increase soon" is 12px / 16px, 41.5px up from the bottom (top: 241.5px in Figma)
   - bundle headings are 28px / 34px (desktop 32px / 36px), bundle price is 44px / 48px
   - team card: button top 317px, disclaimer top 373px; digital card: copy top 102px (unchanged),
     "Registration opens..." top 327.5px
   The bundle row is already stacked here (it stacks below 992px), as in Figma. */
@media (min-width: 600px) and (max-width: 991.98px) {
  .pricing-row .pricing-price {
    font-size: 44px;
    line-height: 48px;
  }
  .pricing-row .pricing-note {
    font-size: 12px;
    line-height: 16px;
    bottom: 41.5px;
  }

  .bundle-row .bundle-heading {
    font-size: 28px;
    line-height: 34px;
  }
  .bundle-row .bundle-price {
    font-size: 44px;
    line-height: 48px;
  }
  .bundle-row .bundle-button {
    top: 317px;
  }
  .bundle-row .bundle-disclaimer {
    top: 373px;
  }
  .bundle-row .bundle-note {
    top: 327.5px;
  }
}

/* ===== Phones (under 600px): match the Figma mobile frame =====
   Differences from desktop in the Figma mobile CSS (375px frame):
   - prices are 44px / 44px (desktop 48px / 52px)
   - "Prices increase soon" is 12px / 16px, 41.5px up from the bottom (top: 241.5px in Figma)
   - bundle headings are 24px / 28px (desktop 32px / 36px) and the bundle price is 44px / 44px
   - bundle button top 301px, disclaimer top 357px (wraps to two lines), digital copy top 98px,
     "Registration opens..." top 327.5px
   The "Per pass" line lands at top 154px (price 44px + 8px gap), the same as the auto-layout card in Figma. */
@media (max-width: 599px) {
  .pricing-row .pricing-price {
    font-size: 44px;
    line-height: 44px;
  }
  .pricing-row .pricing-note {
    font-size: 12px;
    line-height: 16px;
    bottom: 41.5px;
  }

  .bundle-row .bundle-heading {
    font-size: 24px;
    line-height: 28px;
  }
  .bundle-row .bundle-price {
    font-size: 44px;
    line-height: 44px;
  }
  .bundle-row .bundle-button {
    top: 301px;
  }
  .bundle-row .bundle-disclaimer {
    top: 357px;
  }
  .bundle-row .bundle-copy {
    top: 98px;
  }
  .bundle-row .bundle-note {
    top: 327.5px;
  }
}

/* ===== Hover ribbon: colourful border on every card =====
   Same ribbon as the agenda cards (Figma "movement" layer): 1px larger than the card on
   every side, conic gradient, 50% opacity, 2.5px blur. Hidden until the card is hovered.
   Needs "isolation: isolate" on .pricing-row / .bundle-row (set above) so z-index:-1
   puts it behind the cards but still above the section background.

   The ":has(...)" test (only cards with a live, non-disabled button get the ribbon) is wrapped in
   :where() on purpose. :where() adds no specificity; without it the rule below outranks the
   :hover / :focus-within rules that follow, and their "opacity: 0.5" never wins. */
.pricing-row .pricing-card:where(:has(.pricing-button:not(.pricing-button--disabled)))::before,
.bundle-row .bundle-card:where(:has(.bundle-button))::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  pointer-events: none;
  background: conic-gradient(from 38.61deg at 50% 50%, #FCA700 0deg, #FCA700 72.69deg, #6A9A23 72.73deg, #6A9A23 167.89deg, #1868DB 167.93deg, #1868DB 252.67deg, #AF59E0 252.7deg, #AF59E0 360deg);
  filter: blur(2.5px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Keyboard users: show it when anything inside the card has focus */
.pricing-row .pricing-card:focus-within::before,
.bundle-row .bundle-card:focus-within::before {
  opacity: 0.5;
}

/* Pointer users only, so a tap on a phone doesn't leave it stuck on */
@media (hover: hover) {
  .pricing-row .pricing-card:hover::before,
  .bundle-row .bundle-card:hover::before {
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pricing-row .pricing-card::before,
  .bundle-row .bundle-card::before {
    transition: none;
  }
}

/* ===== Grid background + spacing for the pricing section =====
   Applies to the Rainfocus section that has the class "homepage-pricing".
   Grid cell is an SVG, embedded as a data URI (about 300 bytes), so there is no file to host and it stays
   sharp on high-DPI screens. It is Figma's own cell from the exported grid: a 60 x 60 square with a 0.5px
   dotted stroke (dash 1, gap 2) in #B7B9BE; preserveAspectRatio="none" lets the sizing rules below
   stretch it to a non-square cell.
   Only background-image/repeat/size/position are set, so the section's own background
   colour (the Rainfocus bg-color-[#F8F8F8] class) stays underneath the grid lines.

   Alignment with the page content: the site's content column is 1168px wide and centred
   (see .flex-box-section-full-interior in the main stylesheet). The Figma grid assumed
   1200px (20 x 60px cells), so with 60px cells the first and last cards missed the grid
   lines. Here the cell is 58.4px wide (1168 / 20), so 20 cells span the content column
   exactly and the outer edges of the first and last card sit on a line. Cell height stays
   60px so the rows keep their vertical alignment with the design.
   Horizontal position: a line sits at the centre of the section (50% + half a cell), which is
   also a line position at the content's left edge (10 cells to the left of centre). */
.flex-box-section-full.homepage-pricing {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60' preserveAspectRatio='none'%3E%3Crect x='.25' y='.25' width='59.5' height='59.5' fill='none' stroke='%23B7B9BE' stroke-width='.5' stroke-dasharray='1 2'/%3E%3C/svg%3E") !important;
  background-repeat: repeat !important;
  background-size: 58.4px 60px !important;
  background-position: calc(50% + 29.2px) 0 !important;
  padding-top: 61px !important;
  padding-bottom: 61px !important;
}

/* Below 1232px the content column is no longer a fixed 1168px: it fills the viewport minus the
   32px gutters (24px under 600px). So the cell width follows the content width instead of
   being fixed, which keeps the left AND right edge of the cards on a grid line at every width:
   - 992px to 1231px: desktop layout, 20 cells across the content (58.4px cells at 1232px, down to 46.4px at 992px)
   - 600px to 991px: tablet layout, 12 cells across the content (Figma: card 5 cells, gap 2, card 5)
   - under 600px: see the phone rules further down
   100% is the section width; the left edge starts at the 32px gutter. */
@media (max-width: 1231px) {
  .flex-box-section-full.homepage-pricing {
    background-size: calc((100% - 64px) / 20) 60px !important;
    background-position: 32px 0 !important;
  }
}

@media (max-width: 991.98px) {
  .flex-box-section-full.homepage-pricing {
    background-size: calc((100% - 64px) / 12) 60px !important;
  }
}
/* Phones (under 600px): the cards fill the content column (viewport minus 24px gutters), and in
   Figma that width is 6 grid cells. So here the cell width is (content width / 6) instead of a fixed
   size, which puts a grid line on both the left and the right edge of every card at any phone width.
   100% = the section width; the line at the left edge starts at the 24px gutter. */
@media (max-width: 599px) {
  .flex-box-section-full.homepage-pricing {
    background-size: calc((100% - 48px) / 6) 60px !important;
    background-position: 24px 0 !important;
  }
}

/* Large phones / small landscape (480px to 599px): 8 cells instead of 6, so the cells don't
   stretch much wider than they are tall (about 54px to 69px instead of 72px to 92px). */
@media (min-width: 480px) and (max-width: 599px) {
  .flex-box-section-full.homepage-pricing {
    background-size: calc((100% - 48px) / 8) 60px !important;
  }
}
